The Patricia trie is a simple modification of a regular trie. By eliminating unary branching nodes, the Patricia achieves better performance than regular tries. However, the question is: how much on the average is the Patricia better? This paper offers a thorough answer to this question by considering some statistics of the number of nodes examined in a <italic>successful search</italic> and an <italic>unsuccessful search</italic> in the Patricia tries. It is shown that for the Patricia containing <italic>n</italic> records the average of the successful search length <italic>S<subscrpt>n</subscrpt></italic> asymptotically becomes 1/<italic>h</italic><subscrpt>1</subscrpt> · ln <italic>n</italic> + <italic>O</italic>(1), and the variance of <italic>S<subscrpt>n</subscrpt></italic> is either var <italic>S<subscrpt>n</subscrpt></italic> = <italic>c</italic> · ln <italic>n</italic> + <italic>0</italic>(1) for an asymmetric Patricia or var <italic>S<subscrpt>n</subscrpt></italic> = <italic>0</italic>(1) for a symmetric Patricia, where <italic>h</italic><subscrpt>1</subscrpt> is the entropy of the alphabet over which the Patricia is built and <italic>c</italic> is an explicit constant. Higher moments of <italic>S<subscrpt>n</subscrpt></italic> are also assessed. The number of nodes examined in an unsuccessful search <italic>U<subscrpt>n</subscrpt></italic> is studied only for binary symmetric Patricia tries. We prove that the <italic>m</italic>th moment of the unsuccessful search length <italic>EU<supscrpt>m</supscrpt><subscrpt>n</subscrpt></italic> satisfies lim<subscrpt><italic>n</italic>→∞</subscrpt> <italic>EU<supscrpt>m</supscrpt><subscrpt>n</subscrpt></italic>/log<supscrpt><italic>m</italic></supscrpt><subscrpt>2</subscrpt><italic>n</italic> = 1, and the variance of <italic>U<subscrpt>n</subscrpt></italic> is var <italic>U<subscrpt>n</subscrpt></italic> = 0.87907. These results suggest that Patricia tries are very well balanced trees in the sense that a random shape of Patriciatries resembles the shape of complete trees that are ultimately balanced trees.
[1]
Mireille Régnier,et al.
Limiting distributions for trie parameters
,
1986
.
[2]
N. E. Nörlund,et al.
Mémoire sur les polynomes de bernoulli
,
1922
.
[3]
Edmund Taylor Whittaker,et al.
A Course of Modern Analysis
,
2021
.
[4]
Ronald Fagin,et al.
Extendible hashing—a fast access method for dynamic files
,
1979,
ACM Trans. Database Syst..
[5]
B. Berndt.
Ramanujan's Notebooks
,
1985
.
[6]
Helmut Prodinger,et al.
Some Further Results on Digital Search Trees
,
1986,
ICALP.
[7]
B. Pittel.
Paths in a random digital tree: limiting distributions
,
1986,
Advances in Applied Probability.
[8]
T. MacRobert.
Higher Transcendental Functions
,
1955,
Nature.
[9]
Gaston H. Gonnet,et al.
Handbook of Algorithms
,
1984
.
[10]
Journal of the Association for Computing Machinery
,
1961,
Nature.
[11]
Wojciech Szpankowski,et al.
Some Results on V-ary Asymmetric Tries
,
1988,
J. Algorithms.
[12]
Philippe Flajolet,et al.
The Complexity of Generating an Exponentially Distributed Variate
,
1986,
J. Algorithms.
[13]
Donald E. Knuth,et al.
The art of computer programming: sorting and searching (volume 3)
,
1973
.
[14]
Gaston H. Gonnet,et al.
Handbook Of Algorithms And Data Structures
,
1984
.
[15]
W. Szpankowski.
Solution of a linear recurrence equation arising in the analysis of some algorithms
,
1987
.
[16]
Philippe Flajolet,et al.
Digital Search Trees Revisited
,
1986,
SIAM J. Comput..
[17]
Wojciech Szpankowski,et al.
The Evaluation of an Alternative Sum With Applications to the Analysis of Some Data Structures
,
1988,
Inf. Process. Lett..
[18]
A. Erdélyi,et al.
Higher Transcendental Functions
,
1954
.
[19]
Henry C. Thacher,et al.
Applied and Computational Complex Analysis.
,
1988
.
[20]
Wojciech Szpankowski,et al.
On a Recurrence Equation Arising in the Analysis of Conflict Resolution Algorithms
,
1987
.
[21]
B. Pittel.
Asymptotical Growth of a Class of Random Trees
,
1985
.
[22]
SzpankowskiWojciech.
Patricia tries again revisited
,
1990
.