コンテンツにスキップ

スキップリスト

出典: フリー百科事典『ウィキペディア(Wikipedia)』
スキップリスト
種類 リスト
考案者 William Pugh
発表年 1989年
計算量ビッグ・オー記法
平均 最悪
空間計算量
探索の時間計算量
挿入の時間計算量
削除の時間計算量

: skip list使使O(log n)1989[1][2][3][4]

150%225%312.5%
110

[]


i i+1 p使 p 1/2  1/4 1/(1-p) 

辿 1/p  pp使

[]


11

""2

ii=m*2^nmn1i=0 

1i2222

(BetheaReiter使[5])

, i1  1150








Indexable skiplist[]


500  




   1                               10
 o---> o--------------------------------------------------------->o最上層
   1           3              2                    5
 o---> o---------------> o---------> o--------------------------->o3層
   1        2        1        2              3              2
 o---> o---------> o---> o---------> o---------------> o--------->o2層
   1     1     1     1     1     1     1     1     1     1     1
 o---> o---> o---> o---> o---> o---> o---> o---> o---> o---> o--->o最下層
                                         
Head  1st   2nd   3rd   4th   5th   6th   7th   8th   9th   10th  NIL
      Node  Node  Node  Node  Node  Node  Node  Node  Node  Node

2103325 (10 + 1 = 1 + 3 + 2 + 5 = 1 + 2 + 1 + 2 + 5)

 i辿

51 4=5-1 1033 1222115(=1+3+1)
 function lookupByPositionIndex(i)
     node ← head
     i ← i + 1                           # don't count the head as a step
     for level from top to bottom do
          while i ? node.width[level] do # if next step is not too far
              i ← i - node.width[level]  # subtract the current width
              node ← node.next[level]    # traverse forward at the current level
          repeat
     repeat
     return node.value
 end function

Section 3.4 Linear List Operations in "A skip list cookbook" by William Pugh

[]


Willam Pugh辿



Skip lists are a probabilistic data structure that seem likely to supplant balanced trees as the implementation method of choice for many applications. Skip list algorithms have the same asymptotic expected time bounds as balanced trees and are simpler, faster and use less space.

使[1]

[]


1990 William Pugh  A Skip List Cookbook[4] 

 - k O(log k) 



 - O(log n)





使

[]


12: skip quadtree: skip octree[6]使 O(log n)使 O(n)2005 David Eppstein [7]

kd

[]


P2P112003 James Aspnes [8]

[]


Java  Java 6  java.util.concurrent.ConcurrentSkipListSet[9]  ConcurrentSkipListMap[10] 

参照[編集]

  1. ^ Pugh, William (August 1989). “Skip lists: a probabilistic alternative to balanced trees”. Proceedings of the Workshop on Algorithms and Data Structures, Ottawa Canada. 
  2. ^ Pugh, William (June 1990). “Skip lists: a probabilistic alternative to balanced trees”. Communications of the ACM 33: 668-676. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.9380. 
  3. ^ Pugh, William (1990). “Concurrent Maintenance of Skip Lists”. Univ. of Maryland Institute for Advanced Computer Studies Report No. UMIACS-TR-90-80 (University of Maryland at College Park). http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.8201. 
  4. ^ a b Pugh, William (1990). “A Skip List Cookbook”. Univ. of Maryland Institute for Advanced Computer Studies Report No. UMIACS-TR-89-72.1 (University of Maryland at College Park). http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.524. 
  5. ^ Bethea, Darrell; Reiter, Michael K. (21–23 September 2009). Data Structures with Unpredictable Timing (PDF). ESORICS 2009, 14th European Symposium on Research in Computer Security. Saint-Malo, France. pp. 456–471, §4 "Skip Lists". doi:10.1007/978-3-642-04444-1_28. ISBN 3-642-04443-3
  6. ^ J. R. Woodwark (1984). “Compressed Quad Trees”. Computer journal 27 (3): 225-229. http://comjnl.oxfordjournals.org/content/27/3/225.full.pdf. 
  7. ^ David Eppstein; Michael T. Goodrich; Jonathan Z. Sun (2005). “The Skip Quadtree: A Simple Dynamic Data Structure for Multidimensional Data”. SCG '05 Proceedings of the twenty-first annual symposium on Computational geometry: 296-305. doi:10.1145/1064092.1064138. http://arxiv.org/abs/cs/0507049. 
  8. ^ James Aspnes; Gauri Shah (2003). “Skip graphs”. Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms: 384–393. http://arxiv.org/abs/cs/0306043. 
  9. ^ ConcurrentSkipListSet (Java Platform SE 8 )
  10. ^ ConcurrentSkipListMap (Java Platform SE 8 )