Digital Search Tree ConstantsPrior acquaintance with binary search tree constants is recommended before reading this essay. Let be a random binary nxn matrix with n distinct rows, and let x denote a binary n-vector. We are interested in the probability distribution of the path length f(x,M,1) in two regimes:
Let denote the Euler-Mascheroni constant and define a new constant Then the expected number of comparisons in a successful search (random, for some i) of a random tree is and in an unsuccessful search (random for all i) is The function , along with function needed later, are small amplitude periodic functions which can essentially be disregarded.
The corresponding variances are, for searching,
The Mathcad PLUS 6.0 file digit0.mcd gives an algorithm for generating and plotting random digital search trees, and verifies the asymptotic results given above via simulation. For more about a certain q-analog of Wallis' formula, look at the 6.0 file digit1.mcd. (Click here if you have 6.0 and don't know how to view web-based Mathcad files).
AcknowledgementsI am grateful to Philippe Flajolet, who provided most of the references and a sense of direction, and also to Tomaz Slivnik, Simon Plouffe, Victor Adamchik and James Whitenton.
More details and references (contact Steven Finch).
Copyright © 1995-2001 Steven Finch
|