Self Organising Lists - Data Structures
Click here to load reader
-
Upload
drishti-bhalla -
Category
Engineering
-
view
198 -
download
1
Transcript of Self Organising Lists - Data Structures
![Page 1: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/1.jpg)
![Page 2: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/2.jpg)
The concept of self-organizing lists was introduced by McCabe in 1965.
If a particular node is to be searched for in the list,each node in the
list must be sequentcially compared till the desired node is reached. In
a link list , retreving the nth element is an O(n) operation . This is highly
inefficient when compared to an array for example , where accessing
the nth element is an O(1) operation .
![Page 3: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/3.jpg)
A self-organizing list is a list that reorders its elements dynamically to improve average
access time. The aim of a self-organizing list is to improve efficiency of linear search by
moving more frequently accessed items towards the head of the list. A self organizing list
rearranges the nodes keeping the most frequently accessed ones at the head of the list.
Generally, in a particular query, the chances of accessing a node which has been accessed
many times before are higher than the chances of accessing a node which historically has
not been so frequently accessed. As a result, keeping the commonly accessed nodes at the
head of the list results in reducing the number of comparisons required in an average case
to reach the desired node. This leads to better efficiency and generally reduced query
times.
![Page 4: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/4.jpg)
❖ Move-to-front method - After the desired element is located ,put it at the beginning of the list.
❖ Transpose method - After the desired element is located , swap it with its predecessor unless it is at the head of the list.
❖ Count method - Order the list by the number of times elements are being accessed.
❖ Ordering method -Order the list using certain criteria natural for the information under scrutiny.
![Page 5: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/5.jpg)
![Page 6: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/6.jpg)
In the first three methods , new information is stored in a node stored in a node added to the end of the list . However , in the fourth method , new information is stored in a node inserted somewhere in the list to maintain the order of the list .
![Page 7: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/7.jpg)
![Page 8: Self Organising Lists - Data Structures](https://reader038.fdocuments.in/reader038/viewer/2022100807/58ad9e4e1a28abde5e8b579d/html5/thumbnails/8.jpg)