Patricia tries again revisited

  • Authors:
  • Wojciech Szpankowski

  • Affiliations:
  • Department of Computer Science, Purdue University, West Lafayette, IN

  • Venue:
  • Journal of the ACM (JACM)
  • Year:
  • 1990

Quantified Score

Hi-index 0.01

Visualization

Abstract

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 successful search and an unsuccessful search in the Patricia tries. It is shown that for the Patricia containing n records the average of the successful search length Sn asymptotically becomes 1/h1 · ln n + O(1), and the variance of Sn is either var Sn = c · ln n + 0(1) for an asymmetric Patricia or var Sn = 0(1) for a symmetric Patricia, where h1 is the entropy of the alphabet over which the Patricia is built and c is an explicit constant. Higher moments of Sn are also assessed. The number of nodes examined in an unsuccessful search Un is studied only for binary symmetric Patricia tries. We prove that the mth moment of the unsuccessful search length EUmn satisfies limn→∞ EUmn/logm2n = 1, and the variance of Un is var Un = 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.