コンテンツにスキップ

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

出典: フリー百科事典『ウィキペディア(Wikipedia)』
削除された内容 追加された内容
VolkovBot (会話 | 投稿記録)
m ロボットによる 追加: ru:Список с пропусками
ウィリアム・ピューをリンク化
 
(23人の利用者による、間の34版が非表示)
1行目: 1行目:

{{翻訳中途|[[:en:Skip list]] 2006-08-23 20:43 UTC|date=2006年8月}}

'''スキップリスト'''('''skip list''')は[[確率的アルゴリズム]]のための[[データ構造]]であり、並列な[[連結リスト]]に基づいている。効率は2分探索木と同等である(大半の操作について平均O(log ''n'')である。

{| class="infobox" style="width: 22em"

! colspan="3" style="font-size: 125%; text-align: center;" | スキップリスト

|-

! 種類

| colspan="2" | [[リスト (抽象データ型)|リスト]]

|-

! 考案者

{{!}} colspan="2" {{!}} William Pugh

|-

! 発表年

| colspan="2" | [[1989年]]

|-

! colspan="3" class="navbox-abovebelow" | [[計算複雑性理論|計算量]]([[ランダウの記号|ビッグ・オー記法]])

|-

|

| 平均

| 最悪

|-

! 空間計算量

| <math>\mathcal{O}(n)</math>

| <math>\mathcal{O}(n \log n)</math>

|-

! 探索の時間計算量

| <math>\mathcal{O}(\log n)</math>

| <math>\mathcal{O}(n)</math>

|-

! 挿入の時間計算量

| <math>\mathcal{O}(\log n)</math>

| <math>\mathcal{O}(n)</math>

|-

! 削除の時間計算量

| <math>\mathcal{O}(\log n)</math>

| <math>\mathcal{O}(n)</math>

|}



'''スキップリスト'''({{lang-en-short|skip list}})は、[[平衡二分探索木]]と似た用途に使う[[乱択アルゴリズム]]の[[データ構造]]。[[連結リスト]]を並列に連結させて作る。比較により順序づけ可能な要素を挿入し、スキップリスト内では[[ソート]]された状態で保持される。ソートされた[[連想配列]]や[[集合]]の実装などに使える。挿入と探索と削除は平均O(log ''n'')である。1989年に[[ウィリアム・ピュー (計算機科学者)|ウィリアム・ピュー]]が発表した<ref>{{cite journal

基本的にスキップリストは順序つきの[[連結リスト]]の前向きのリンクを追加したものである。Pughによる原著論文によると、前向きのリンクは''Geometric/Negative Binomial distribution''という乱数を用いた手法で追加されていて、リスト上の探索においてリストの一部を高速に飛ばすことができる。挿入と探索と削除は対数の乱数時間で行われる。

| last=Pugh

| first=William

| title=Skip lists: a probabilistic alternative to balanced trees

| journal=Proceedings of the Workshop on Algorithms and Data Structures, Ottawa Canada

| year=1989

| month=August

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

| last=Pugh

| first=William

| title=Skip lists: a probabilistic alternative to balanced trees

| journal=Communications of the ACM

| volume=33

| year=1990

| month=June

| pages=668-676

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

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

| last=Pugh

| first=William

| title = Concurrent Maintenance of Skip Lists

| year = 1990

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

| publisher = University of Maryland at College Park

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

}}</ref><ref name="cookbook">{{cite journal

| 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>。



スキップリストは順序つきの[[連結リスト]]の前向きの飛び越しのリンクを追加したものである。ノードは[[幾何分布]]や[[負の二項分布]]にてランダムに高さを設定して追加され(高さ1が確率50%、高さ2が25%、高さ3が12.5%など)、リスト上の探索において連結リストの一部を高速に飛ばすことができる。

1990年に[[:en:William Pugh|William Pugh]]によって発明されたスキップリストは[[計算機科学]]における重要なアルゴリズムのうち最も年代の浅いものである。


[[File:Skip list.svg|thumb|center|500px|スキップリストの例。1〜10を追加し、ソートされた状態で保持されている。]]



== 説明 ==

== 説明 ==

スキップリストはリストの階層になっている。最下層は通常のソートされた[[連結リスト]]である。それより上の層は、それぞれ下のリストに対する「急行列車」のように働き、層''i'' に存在するリストの要素は層''i+1'' においては固定の確率''p''(良く使われる ''p'' の値は 1/2 と 1/4)で存在する。各要素は平均で 1/(1-''p'')個のリストに属し、最も背の高い要素、つまり普通スキップリストの先頭の特別扱いされる要素はすべてのリストに属する。スキップリストは <math> \log_{1/p} n \,</math>個の連結リストを含む<!-- $1+\log_{1/p}n$では? $p\to 0$の極限で最も背の高い要素の高さが1でないとおかしいと思う。



第$i(>1)$層に存在する要素の数の期待値が$np^{i-1}$となり、層を上がる毎に要素の数が減るから、最上層の高さの期待値を$h$とすると$np^{h-1} \leq 1$すなわち$h \leq 1+\log_{1/p}n$ が成り立つように思う。 -->。

スキップリストはリストの階層になっている。最下層は通常のソートされた[[連結リスト]]である。上層はそれぞれ下記のリストに示すように「急行列車」のように働き、層''i''に存在するリストの要素は層''i+1''においては固定の確率''p''で存在する。平均すると、それぞれの要素は1/(1-''p'')の高さとなり、最も高い要素(普通スキップリストの先頭の特別扱いされる要素)はO(log<sub>1/''p''</sub> ''n'')高さである。



目的の要素を探索するには、まず、最上層の連結リストの先頭の要素から(水平方向に)スキャンして、目的の要素と同じかそれより大きい要素を探し出す。もし、探し出した要素が目的の要素と等しいならば、探索は完了。もし、探し出した要素が目的の要素より大きいならば、あるいは、リストの最後の要素に到達してしまった場合は、一つ前の要素に戻ってから一つ下の層の連結リストに(垂直方向に)降り、そのリストに対して同じ操作を繰り返す。各連結リストにおいてリンクを辿る数の期待値は最大でも 1/''p'' となる。これは目的の要素から逆向きに戻って上層のリストにつながる要素に到達するまでの期待値であることから理解できる。従って探索の総コストは <math>(\log_{1/p} n)/p\,</math>で、''p''を固定すれば<math>\mathcal{O}(\log n)\,</math>である。''p''にさまざまな値を選ぶことで、探索時間とメモリ使用量の[[トレードオフ]]をとることが可能である。

1

1-----4---6

1---3-4---6-----9

1-2-3-4-5-6-7-8-9-10



=== 実装の詳細 ===

目的の要素を探すために、最上層のリストの先頭の要素から始めて、目的の要素と同じかそれ以下の要素のうち最後のものまでスキャンする。各連結リストのリンクを辿る数の期待値は1/''p''となる。これは目的の要素から後ろに戻って上層のリストにつながる要素に到達するまでの期待値であることから理解できる。従って探索の総コストはO(log<sub>1/''p''</sub> n / p)で、''p''を固定すればO(log ''n'')である。''p''にさまざまな値を選ぶことで、探索時間とメモリ使用量の[[トレードオフ]]をとることが可能である。

スキップリストで用いられる要素は1つ以上のポインタを含む可能性があるが、それは、1つ以上のリストに属している可能性があるからである。



挿入と削除[[連結リスト]]の対応する操作と同様の実装になるが、高い要素は2つ以上の連結リストに対して挿入及び削除する必要がある。

挿入と削除は、[[連結リスト]]の対応する操作と同様の実装になるが、"背の高い"要素は2つ以上の連結リストに対して挿入及び削除する必要がある。




(PrintEntireListToScreen())O(n)(ii=m*2^n(m)n1)

<!--PrintEntireListToScreen()--><math>\mathcal{O}(n)</math><math>\mathcal{O}(\log n)</math>ii=m*2^nmn1i=0 



1i2222

その代わりに、次のように高さを擬似的にランダマイズすることができる。最初に全てのノードの高さを1にする。次にi番目のノードについて、奇数ならば高さを2にするかどうかをランダムに決める。偶数ならば直前のノードの高さが2になっていないときのみ高さを2にする。高くなったノードの数が2以上なら高さを上げてこれを繰り返す。

ランダム性の削除と同様に、この擬似的なランダマイズはノードを全て訪れる場合にのみ実行する。



擬似的なランダマイズを行う利点は、ランダム性の無い場合と違い、敵意のあるユーザーに高さに関する情報を漏らさないことである。悪意あるユーザが高さに関する情報を知っていると、レベルの高いノードを削除するだけで性能を悪化させことができるため、この性質は望ましい。(これに対し、BetheaとReiterは、悪意あるユーザが性能劣化を起こすために、確率的タイミング方法を使用できると主張している<ref>{{cite conference |first1=Darrell |last1=Bethea |first2=Michael K. |last2=Reiter |title=Data Structures with Unpredictable Timing |url=https://www.cs.unc.edu/~djb/papers/2009-ESORICS.pdf#page=5 |at=pp. 456–471, §4 "Skip Lists" |doi=10.1007/978-3-642-04444-1_28 |conference=ESORICS 2009, 14th European Symposium on Research in Computer Security |location=Saint-Malo, France |date=September 21–23, 2009 |isbn=3-642-04443-3}}</ref>。)

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).

検索時間については、ランダム性の無い場合と同様、対数時間であることが保証されている。



以下の「最適化」を考えてみよう。「次に, 各i番目のノードに対して・・・」の部分で、各奇数と偶数のペアに対するコイン投げをするのをやめ、その替わり、コインを1回だけ振って、全てのペアに対して偶数番目のノードの高さを上げるか、あるいは奇数の方の高さを上げるかを決める。これで、コイン投げの回数は、<math> \mathcal{O} ( n \log n ) </math> でなく <math> \mathcal{O} ( \log n ) </math> に削減できる。この方法では、悪意を持ったユーザが、ある1つのノードの高さを正しく推測できる確率は非常に低いにも関わらず、「全ての偶数番目のノードは高さが'''1より大きい'''だろう」という推測が50%の確率で当たってしまう。

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つの主張を説明しよう。まず、検索が対数時間で終わることを示す。高さが1以上である全てのノードの中でn番目のノードを見つけることを考える。nが偶数であれば、その高さが1より大きい確率は1/2であるが、もしノードの高さが1であるならばn-1番目のノードの高さは1より大きいことが保証される。nが奇数であれば、その高さが1より大きい確率は1/2である。このときn番目のノードの高さが1でかつn-1番目のノードの高さも1であるとすると、n-2番目のノードの高さは1より大きいことが保証される。この解析を高さが2以上のノード、3以上のノード……と繰り返していく。それぞれの解析でnは高さがk以上であるようなノードの中で何番目であるかということを注意しておく。以上から、検索時間はランダマイズされていないスキップリストと比べて最良の場合(探しているノードが考えうる限り最も高さが高いとき)は同じで、最悪でも2倍となる(左に1回ではなく2回動かなければならないため)。-->

スキップリストは上述のバランスとりを最近行っている場合でも、伝統的な平衡木と同じ最悪の場合のパフォーマンスを保証しない。なぜなら、確率はとても低いがバランスの悪い構造になる場合が常にあるからである。しかしながら実際にはよく動作し、ランダム化されたバランスとりの仕組みは平衡2分木の決定論的なバランスとりの仕組みより実装が容易であることが示されている。スキップリストは並列計算においても有用で、それは挿入において全体のリバランスが不要でスキップリストの違う場所において並列に行われるからである。

<!-- ランダマイズされていない場合は高さが1, 2, 1, 2といった具合に配置されているが、ランダマイズされている場合は2, 1, 1, 2と配置されることがある。 -->




<!-- k21/2222231/231/4k1/(2^(k-1))-->

メモリアクセスの局所性の問題やその他の問題のため、スキップリストが実際の性能とメモリ効率において[[B木]]より悪いという証拠が存在する([http://resnet.uoregon.edu/~gurney_j/jmpc/skiplist.html])。



スキップリストは、より伝統的な[[木構造 (データ構造)|平衡木]]と同じ最悪時のパフォーマンスを保証しない。なぜなら、(確率はとても低いが)バランスの悪い構造になる場合が常にあるからである。しかし実際にはよく動作し、ランダム化されたバランスとりの仕組みは平衡二分探索木の決定論的なバランスとりの仕組みより実装が容易であることが示されている。スキップリストは[[並列計算]]においても有用で、挿入はスキップリストのいくつかの部分で並列に実施でき、全体のリバランスが不要である。この並列化は、アドホック無線ネットワークでのリソース探索において特に有用となりうる。なぜなら、ランダム性のあるスキップリストは単一ノード損失に対して堅牢にすることができるからである。

==歴史==



<!-- メモリアクセスの局所性の問題やその他の問題のため、スキップリストが実際の性能とメモリ効率において[[B木]]より悪いという証拠が存在する([http://resnet.uoregon.edu/~gurney_j/jmpc/skiplist.html])。-->


=== Indexable skiplist ===


上で述べられているように、スキップリストでは、データ系列への値の挿入や削除は高速に(<math>\mathcal{O}(\log n)</math>で)可能であるが、系列の中のある指定した場所の値の取り出し(例えば、500番目の値を返す)は遅く、<math>\mathcal{O}(n)</math> の時間がかかる。しかし、少し変更を加えることで、[[ランダムアクセス]] の実行時間は<math>\mathcal{O}(\log n)</math>にまで改良することができる。


すべてのリンクに対し、リンクの「幅」も格納することにする。ここでリンクの「幅」とは、「急行列車」のリンクが飛ばす(最下層での)リンクの数である。


例として、上で挙げた例のリンクの幅を次に示す。


1 10

o---> o---------------------------------------------------------> o 最上層

1 3 2 5

o---> o---------------> o---------> o---------------------------> o 第3層

1 2 1 2 3 2

o---> o---------> o---> o---------> o---------------> o---------> o 第2層

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'' 番目の値を探すには、スキップリスト内を、進んだリンクの幅の分だけ必要ステップ数を減らしながら、リンクを辿っていけばよい。次のリンク幅が大きすぎる場合には、下の層へ降りる。


例えば、上の例で5番目の値を得たい場合には、まず最上位層の幅1のリンクを進む。残りの必要ステップ数は 4=5-1 であるが、次のステップ幅は10であり大きすぎるので、第3層へ降りる。この層で、幅3のリンクを進む。 残りの必要ステップ数は1で、次のリンク幅は2のため大きすぎ、下の層へ降りる。第2層の次のリンクも幅が2で大きすぎるため、最下層に降りる。最後に幅1のリンクを1つ進めば、5(=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'''


このインデクス付けの実装方法については、[http://cg.scs.carleton.ca/~morin/teaching/5408/refs/p90b.pdf Section 3.4 Linear List Operations in "A skip list cookbook" by William Pugh]に詳細がある。


==歴史==

スキップリストはWillam Pughによって発明され、下記の参照に示される論文に詳細が記載されている。下記の外部リンクを辿って原著論文を読むこともできる。

スキップリストはWillam Pughによって発明され、下記の参照に示される論文に詳細が記載されている。下記の外部リンクを辿って原著論文を読むこともできる。



38行目: 152行目:

:''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.''

:''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.''



しかしながら、速度と使用メモリの利点についてはその後に議論があるようだ[http://resnet.uoregon.edu/~gurney_j/jmpc/skiplist.html]。

しかし、速度と使用メモリの利点についてはその後に議論があるようだ[http://resnet.uoregon.edu/~gurney_j/jmpc/skiplist.html]。


== 拡張 ==

1990年に William Pugh は論文 A Skip List Cookbook<ref name="cookbook"/> にて下記の拡張を書いている。

* 検索指 - 指定した要素から距離 k 以内を O(log k) で検索

* スキップリストの分割・結合

* インデックスを指定して要素を取得 - O(log n)

* キーの比較回数の削減の改良

* キーの重複の許可

* ノードの高さの確率分布に他の物を使用


== スキップ四分木 ==

スキップリストはリストのため1次元だが、これを2次元やそれ以上に拡張した物を'''スキップ[[四分木]]'''({{lang-en-short|skip quadtree}})・'''スキップ[[八分木]]'''({{lang-en-short|skip octree}})という。一番下の階層は連結リストに相当する部分に圧縮四分木<ref>{{cite journal

|title=Compressed Quad Trees

|author=J. R. Woodwark

|journal=Computer journal

|volume=27

|issue=3

|pages=225-229

|year=1984

|url=http://comjnl.oxfordjournals.org/content/27/3/225.full.pdf

}}</ref>を使い、要素にランダムに高さをふり、各高さで圧縮四分木を作る。四分木の同じ分割点に当たる部分は隣の高さの四分木の分割点同士でリンクを張りたどれるようにする。探索・挿入・削除の計算量はスキップリスト同様に平均 O(log n)。圧縮四分木を使った事により空間計算量は平均 O(n)。2005年に David Eppstein らが発表した<ref>{{cite journal

|author=David Eppstein

|author2=Michael T. Goodrich

|author3=Jonathan Z. Sun

|title=The Skip Quadtree: A Simple Dynamic Data Structure for Multidimensional Data

|year=2005

|url=http://arxiv.org/abs/cs/0507049

|journal=SCG '05 Proceedings of the twenty-first annual symposium on Computational geometry

|pages=296-305

|doi=10.1145/1064092.1064138

}}</ref>。


なお、[[kd木]]でも類似の事が出来る。


== スキップグラフ ==

スキップグラフとは、スキップリストを元に、P2Pネットワーク環境を想定した分散データ構造。スキップリスト上の1つのノードが1つのマシンに対応し、連結を双方向連結リストにする。2003年に James Aspnes らが発表した<ref>{{cite journal

|title=Skip graphs

|year=2003

|author=James Aspnes

|author2=Gauri Shah

|journal=Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms

|pages=384–393

|url=http://arxiv.org/abs/cs/0306043

}}</ref>。



==参考資料==

== 実装 ==

Java では Java 6 より標準ライブラリに java.util.concurrent.ConcurrentSkipListSet<ref>[https://docs.oracle.com/javase/jp/8/api/java/util/concurrent/ConcurrentSkipListSet.html ConcurrentSkipListSet (Java Platform SE 8 )]</ref> や ConcurrentSkipListMap<ref>[https://docs.oracle.com/javase/jp/8/api/java/util/concurrent/ConcurrentSkipListMap.html ConcurrentSkipListMap (Java Platform SE 8 )]</ref> が追加になっている。



==参照==

* {{cite journal | last=Pugh | first=William | title=Skip lists: a probabilistic alternative to balanced trees | journal=Communications of the ACM | volume=33 | year=1990 | month=June | pages=668-676 }}

{{Reflist}}



{{データ構造}}

==外部リンク==

*[ftp://ftp.cs.umd.edu/pub/skipLists/skiplists.pdf William Pughによる原著論文]



{{Computer-stub}}

{{Computer-stub}}



[[Category:データ構造|すきつふりすと]]

{{フォルトソト:すきつふりすと}}

[[Category:データ構造]]



[[de:Liste (Datenstruktur)#Skip-Liste]]

[[en:Skip list]]

[[es:Skip list]]

[[fr:Skip-list]]

[[pt:Skiplist]]

[[ru:Список с пропусками]]

[[zh:跳跃列表]]


2021年10月26日 (火) 11:53時点における最新版

スキップリスト
種類 リスト
考案者 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 )