OFFSET
0,2
COMMENTS
A probabilistic skip list is a data structure for sorted elements with O(log n) average time complexity for most operations. The probability p is a fixed internal parameter of the skip list.
n fair coins are flipped in a single toss. Those that show tails are collected and reflipped in another single toss. The process is repeated until all the coins show heads. H(n) is the discrete random variable that denotes the number of tosses required. P(H(n)<= k) = (1-(1/2)^k)^n. - Geoffrey Critzer, Dec 13 2009
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..100
P. V. Poblete, J. I. Munro and T. Papadakis, The binomial transform and the analysis of skip lists, Theor. Comput. Sci. 352, 1 (Mar. 2006), 136-158.
William Pugh, Skip lists: a probabilistic alternative to balanced trees, Communications of the ACM, v.33 n.6, 668-676, June 1990
Wikipedia, Skip list
FORMULA
EH(n) = Sum_{k>0} k * ((1-(1/2)^k)^n - (1-(1/2)^(k-1))^n).
EH(n) = -Sum_{k=1..n} (-1)^k * C(n,k) / (1-(1/2)^k).
EXAMPLE
MAPLE
EH:= n-> -add((-1)^k *binomial(n, k) /(1-(1/2)^k), k=1..n):
seq(numer(EH(n)), n=0..20);
MATHEMATICA
Table[Sum[x*((1-2^(-x))^n-(1-2^-(x-1))^n), {x, 1, Infinity}], {n, 0, 20}] (* Geoffrey Critzer, Dec 13 2009 *)
CROSSREFS
KEYWORD
frac,nonn
AUTHOR
Alois P. Heinz, Mar 19 2009
STATUS
approved