Digital Search Tree Constants

Prior 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:

  • random x satisfying for some i, (successful search)
and
  • random x satisfying for all i, (unsuccessful search).
There is double-randomness here as in binary search tree constants, but note that x depends on M more intricately than before. The expected value of f(x,M,1) is, in the language of computer science,
  • the average number of comparisons required to find an existing random record x in a data structure with n records
and
  • the average number of comparisons required to insert a new random record x into a data structure with n records
where it is presumed the data structure follows that of a digital search tree. The following figure shows how such a tree is built starting with M as prescribed:



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,



and, for inserting,



where the new constant is given by

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

Acknowledgements
I 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).
Return to the MathSoft Constants page.
Return to the MathSoft Unsolved Problems page.
Return to the MathSoft home page.

Copyright © 1995-2001 Steven Finch
MathSoft Engineering & Education, Inc.
All rights reserved.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy