Self-organizing List - Analysis of Running Times For Access/ Search in A List - Average Case

Average Case

It can be shown that in the average case, the time required to a search on a self-organizing list of size n is

where p(i) is the probability of accessing the ith element in the list, thus also called the access probability. If the access probability of each element is the same (i.e. p(1) = p(2) = p(3) = ... = p(n) = 1/n) then the ordering of the elements is irrelevant and the average time complexity is given by

and T(n) does not depend on the individual access probabilities of the elements in the list in this case. However in the case of searches on lists with non uniform record access probabilities (i.e. those lists in which the probability of accessing one element is different from another), the average time complexity can be reduced drastically by proper positioning of the elements contained in the list.
This is done by pairing smaller i with larger access probabilities so as to reduce the overall average time complexity.
This may be demonstrated as follows:
Given List: A(0.1), B(0.1), C(0.3), D(0.1), E(0.4)
Without rearranging, average search time required is:

Now suppose the nodes are rearranged so that those nodes with highest probability of access are placed closest to the front so that the rearranged list is now:
E(0.4), C(0.3), D(0.1), A(0.1), B(0.1)
Here, average search time is:

Thus the average time required for searching in an organized list is (in this case) around 40% less than the time required to search a randomly arranged list.
This is the concept of the self-organized list in that the average speed of data retrieval is increased by rearranging the nodes according to access frequency.

Read more about this topic:  Self-organizing List, Analysis of Running Times For Access/ Search in A List

Famous quotes containing the words average and/or case:

    The allurement that women hold out to men is precisely the allurement that Cape Hatteras holds out to sailors: they are enormously dangerous and hence enormously fascinating. To the average man, doomed to some banal drudgery all his life long, they offer the only grand hazard that he ever encounters. Take them away, and his existence would be as flat and secure as that of a moo-cow.
    —H.L. (Henry Lewis)

    I never forget a face, but in your case I’ll be glad to make an exception.
    Groucho Marx (1895–1977)