# Upper Tail Analysis of Bucket Sort and Random Tries

Ioana O. Bercea*, Guy Even

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

## Abstract

Bucket Sort is known to run in expected linear time when the input keys are distributed independently and uniformly at random in the interval [0, 1). The analysis holds even when a quadratic time algorithm is used to sort the keys in each bucket. We show how to obtain linear time guarantees on the running time of Bucket Sort that hold with very high probability. Specifically, we investigate the asymptotic behavior of the exponent in the upper tail probability of the running time of Bucket Sort. We consider large additive deviations from the expectation, of the form cn for large enough (constant) c, where n is the number of keys that are sorted. Our analysis shows a profound difference between variants of Bucket Sort that use a quadratic time algorithm within each bucket and variants that use a Θ(blog b) time algorithm for sorting b keys in a bucket. When a quadratic time algorithm is used to sort the keys in a bucket, the probability that Bucket Sort takes cn more time than expected is exponential in Θ(nlogn). When a Θ(blog b) algorithm is used to sort the keys in a bucket, the exponent becomes Θ(n). We prove this latter theorem by showing an upper bound on the tail of a random variable defined on tries, a result which we believe is of independent interest. This result also enables us to analyze the upper tail probability of a well-studied trie parameter, the external path length, and show that the probability that it deviates from its expected value by an additive factor of cn is exponential in Θ(n).

Original language English Algorithms and Complexity - 12th International Conference, CIAC 2021, Proceedings Tiziana Calamoneri, Federico Corò Springer Science and Business Media Deutschland GmbH 116-129 14 9783030752415 https://doi.org/10.1007/978-3-030-75242-2_8 Published - 2021 12th International Conference on Algorithms and Complexity, CIAC 2021 - Virtual, OnlineDuration: 10 May 2021 → 12 May 2021

### Publication series

Name Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 12701 LNCS 0302-9743 1611-3349

### Conference

Conference 12th International Conference on Algorithms and Complexity, CIAC 2021 Virtual, Online 10/05/21 → 12/05/21

## Keywords

• Bucket Sort
• Running time
• Upper tail analysis

## Fingerprint

Dive into the research topics of 'Upper Tail Analysis of Bucket Sort and Random Tries'. Together they form a unique fingerprint.