コンテンツにスキップ

「スキップリスト」の版間の差分

出典: フリー百科事典『ウィキペディア(Wikipedia)』
削除された内容 追加された内容
Abionab (会話 | 投稿記録)
en:skip list 2015年11月2日 (月) 23:46‎ より翻訳
Abionab (会話 | 投稿記録)
編集の要約なし
56行目: 56行目:

| publisher = University of Maryland at College Park

| publisher = University of Maryland at College Park

| url = http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.8201

| url = http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.8201

}}</ref><ref>{{cite journal

}} </ref>。スキップリストは[[計算機科学]]における重要なアルゴリズムのうち最も年代の浅いものである。

| last=Pugh

| first=William

| title = A Skip List Cookbook

| year = 1990

| journal = Univ. of Maryland Institute for Advanced Computer Studies Report No. UMIACS-TR-89-72.1

| publisher = University of Maryland at College Park

| url = http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.524

}}</ref>。スキップリストは[[計算機科学]]における重要なアルゴリズムのうち最も年代の浅いものである。



[[File:Skip list.svg|thumb|center|500px|スキップリストの例]]

[[File:Skip list.svg|thumb|center|500px|スキップリストの例]]


2015年11月6日 (金) 02:13時点における版

スキップリスト
種類 リスト
考案者 William Pugh
発表年 1990年
計算量ビッグ・オー記法
平均 最悪
空間計算量
探索の時間計算量
挿入の時間計算量
削除の時間計算量

: skip list2O(log n)

PughGeometric/Negative Binomial distribution

1990William Pugh[1][2][3]


ii+1p1/(1-p)O(log1/p n)

辿1/pO(log1/p n / p)pO(log n)p使

2

O(n)ii=m*2^nmn1

1i2222

Let us prove these two claims. First, to prove that the search time is guaranteed to be logarithmic. Suppose we search for and find node n where n is the position of the found node among the nodes of level 1 or higher. If n is even, then there is a 50/50 chance that it is higher than level 1. This time, though, if it is not higher than level 1 then node n-1 is guaranteed to be higher than level 1. If n is odd, then there is a 50/50 chance that it is higher than level 1. Given that it is not, there is a 50/50 chance that node n-1 is higher than level 1. Given that this is not either, we are guaranteed that node n-2 is higher than level 1. We repeat the analysis for nodes of level 2 or higher, level 3 or higher, etc. always keeping in mind that n is the position of the node among the ones of level k or higher for integer k. So the search time if constant in the best case (if the found node is the highest possible level) and 2 times the worst case for the search time for the totally derandomized skip-list (because we have to keep moving left twice rather than keep moving left once).

Next, let's prove something about the probability of an adversarial user's guess of a node being level k or higher being correct. First, the adversarial user has a 50/50 chance of correctly guessing that a particular node is level 2 or higher. If he/she knows the positions of two consecutive nodes of level 2 or higher, and knows that the one on the left is in an odd numbered position among the nodes of level 2 or higher, he/she has a 50/50 chance of correctly guessing which one is of level 3 or higher. So, his/her probibility of being correct, when guessing that a node is level 3 or higher, is 1/4. Inductively continuing this analysis, we see that his/her probability of guessing that a particular node is level k or higher is 1/(2^(k-1)).

2

B[1]


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.

使[2]

参照

  1. ^ 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. 
  2. ^ 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. 
  3. ^ 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.