HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Expected space consumption of skip lists

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
spaceexpectedskiplistsconsumption

Problem

What is the expected space used by the skip list after inserting $n$ elements?

I expect that in the worst case the space consumption may grow indefinitely.

Wikipedia says space $O(n)$.

How can this be proven one way or another?

Solution

In this paper it is proven that there exists a constant $\alpha$ such that the probability of the space exceeding $\alpha n$, is less than $1/2^{\Omega(\sqrt{n})}$. Thefore, the more elements there are, the less likely it is to exceed this space bound.

Context

StackExchange Computer Science Q#1713, answer score: 8

Revisions (0)

No revisions yet.