Smoothed heights of tries and patricia tries

Published: 01 Jan 2016, Last Modified: 13 Nov 2024Theor. Comput. Sci. 2016EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Tries and patricia tries are two popular data structures for storing strings. Let Hn<math><msub is="true"><mrow is="true"><mi is="true">H</mi></mrow><mrow is="true"><mi is="true">n</mi></mrow></msub></math> denote the height of the trie (the patricia trie, respectively) on a set of n strings. Under the uniform distribution model on the strings, it is well known that Hn/log⁡n→2<math><msub is="true"><mrow is="true"><mi is="true">H</mi></mrow><mrow is="true"><mi is="true">n</mi></mrow></msub><mo stretchy="false" is="true">/</mo><mi mathvariant="normal" is="true">log</mi><mo is="true">⁡</mo><mi is="true">n</mi><mo stretchy="false" is="true">→</mo><mn is="true">2</mn></math> for tries and Hn/log⁡n→1<math><msub is="true"><mrow is="true"><mi is="true">H</mi></mrow><mrow is="true"><mi is="true">n</mi></mrow></msub><mo stretchy="false" is="true">/</mo><mi mathvariant="normal" is="true">log</mi><mo is="true">⁡</mo><mi is="true">n</mi><mo stretchy="false" is="true">→</mo><mn is="true">1</mn></math> for patricia tries, when n approaches infinity. Nevertheless, in the worst case, the height of a trie can be unbounded and the height of a patricia trie is in Θ(n)<math><mi mathvariant="normal" is="true">Θ</mi><mo stretchy="false" is="true">(</mo><mi is="true">n</mi><mo stretchy="false" is="true">)</mo></math>. To better understand the practical performance of both tries and patricia tries, we investigate these two classical data structures in a smoothed analysis model. Given a set S={s1,s2,…,sn}<math><mi mathvariant="script" is="true">S</mi><mo is="true">=</mo><mo stretchy="false" is="true">{</mo><msub is="true"><mrow is="true"><mi is="true">s</mi></mrow><mrow is="true"><mn is="true">1</mn></mrow></msub><mo is="true">,</mo><msub is="true"><mrow is="true"><mi is="true">s</mi></mrow><mrow is="true"><mn is="true">2</mn></mrow></msub><mo is="true">,</mo><mo is="true">…</mo><mo is="true">,</mo><msub is="true"><mrow is="true"><mi is="true">s</mi></mrow><mrow is="true"><mi is="true">n</mi></mrow></msub><mo stretchy="false" is="true">}</mo></math> of n binary strings, we perturb the set by adding an i.i.d. Bernoulli random noise to each bit of every string. We show that the resulting smoothed heights of the trie and the patricia trie are both in Θ(log⁡n)<math><mi mathvariant="normal" is="true">Θ</mi><mo stretchy="false" is="true">(</mo><mi mathvariant="normal" is="true">log</mi><mo is="true">⁡</mo><mi is="true">n</mi><mo stretchy="false" is="true">)</mo></math>.
Loading