Abstract

Invented by William Pugh in 1989, a Skip List is a space-efficient probabilistic data structure that uses multiple layers of forward pointers to simulate a binary search over a linked list. It avoids the data-shifting penalty of sorted array lists while bypassing the search constraints of standard sequential linked lists.

  • Category: Probabilistic Linked Architecture
  • Structural Composition: Multiple stacked layers of sorted nodes connected via skip pointers.
  • Average-Case Search Complexity: performance.

Core Layered Topology

A Skip List organizes sorted data nodes into a vertical hierarchy of express lanes:

  • Layer 0 (The Base Link): The bottom-most layer is a complete, standard, sorted Linked List tracking every element in the collection.
  • Express Layers (Layers 1 to ): Each higher level tracks a sparser subset of the nodes below it, acting as shortcuts to skip over wide blocks of data during searches.
  • The Head Node Array: The sentinel head node holds an array of forward-facing pointers, with one pointer dedicated to each level of the hierarchy.

Algorithmic Operations

Find(element)

Starts at the highest level of the head node sentinel. It steps forward along the current layer until the next node’s key is larger than the target or hits NULL, at which point it drops down one level to repeat the process.

  • Time Complexity: average-case; degrades to in the worst case if coin-flip distributions fail.

Algorithm 18 Skip List Search Routine

procedure Find(element,headelement, head)

currentheadcurrent \gets head

layerhead.heightlayer \gets head.height

while layer0layer \ge 0 do

if current.key==elementcurrent.key == element then

return true\text{true}

if current.next[layer]==NULLcurrent.next[layer] == \text{NULL} or current.next[layer].key>elementcurrent.next[layer].key > element then

layerlayer1layer \gets layer - 1

else

currentcurrent.next[layer]current \gets current.next[layer]

return false\text{false}

Insert(key) & Remove(key)

  • Insertion Steps: The system runs the search routine to identify the correct insertion slot at the base layer. It then uses a randomized coin-flip game to determine the vertical height of the new node, updating the forward-facing pointers of preceding neighbors across all assigned levels.
  • Removal Steps: The system uses the search routine to locate the target node, tracks its predecessors across all levels it occupies, and updates their pointers to bypass the removed item.

Probability Mechanics & Node Height Sizing

The vertical node height distribution is managed dynamically via an internal randomized coin-flip routine to avoid requiring complex structural rebalancing operations:

The Coin-Flip Game Strategy

  1. Start tracking at a baseline height of 0.
  2. Flip a random coin with a success probability metric (Heads).
  3. If Heads manifests, increment the tracking height by 1 and execute another flip step.
  4. If Tails manifests, stop flipping and assign the accumulated height value to the node.

This operational process fits a Geometric Distribution:

where represents the number of sequential successes completed before encountering the first failure.

Selecting the Probability Metric

  • Average Search Boundary: time.
  • Worst-Case Boundary: time (manifests if coin flips fail to generate express layers, leaving only the base layer).
  • Optimal Height Bound: Typically defined as .
  • Design Tuning: While is standard, reducing saves memory by decreasing pointer overhead at the cost of slightly increasing the average number of search comparisons.

Architectural Performance Matrix

Metric PerformanceSorted Array ListStandard Linked ListSkip List (Average)
Search / Find
Insert Operation
Remove Operation
Space Overhead

Core Comparison Details

Standard Linked List insertions and removals run in constant time only if the system already holds a direct pointer to the target edit location. Locating that specific node profile using standard list searching still introduces an linear traversal cost. The Skip List avoids this bottleneck, matching the fast search speed of a sorted array while keeping modifications efficient.


Related Notes