Encoding Arguments
Total Page:16
File Type:pdf, Size:1020Kb
ENCODING ARGUMENTS by Tommy Reddad A thesis submitted to the Faculty of Graduate and Postdoctoral Affairs in partial fulfillment of the requirements for the degree of Master of Computer Science at Carleton University Ottawa, Ontario November 2015 c Copyright by Tommy Reddad, 2015 ⃝ Abstract We study encoding arguments using partial prefix-free codes, which allow usto prove probabilistic statements using the basic fact that uniformly chosen elements from a set of size n cannot be encoded with fewer than log2 n bits on average. This technique, in the end, is a more direct version of the incompressibility method from the study of Kolmogorov complexity. We use our technique to produce short original proofs for several results. We also explore extensions of the technique to non-uniform input distributions. Finally, we offer a new manner of encoding which allows for real-valued codeword lengths, thereby refining every other result obtained through encoding. ii Acknowledgements Firstly, I would would like to express my gratitude to my supervisors, Prof. Pat Morin, Prof. Vida Dujmovi´c,and Prof. \Jit" Bose, for welcoming me to Ottawa and Carleton University, and helping me work on and study other topics before settling on the study of encoding arguments as the subject of my thesis. I am especially grateful to Prof. Morin, whose insight, knowledge, and personal supervision have been absolutely invaluable. I am also indebted to the examiners of my thesis, Prof. Jean-Lou De Carufel and Prof. Daniel Panario, for their meticulous and careful reading of my work, and for their helpful comments. Thanks to Prof. Luc Devroye at McGill University for teaching a wonderful class in the study of algorithms and data structures, which sparked my interest in information theory. Of course, I would like to thank my fellow labmates and researchers working in the Computational Geometry Lab at Carleton University, whose company I found to be appropriately motivating whenever I felt inspired, and appropriately distracting whenever I felt overwhelmed. I am convinced that the rare atmosphere sustained in our lab is precious. Finally, I thank my family and friends, since without them I would be nowhere. I am most grateful to my parents who have supported me throughout all of my studies and all of my life. A thousand thanks go out to my girlfriend Emily, for her support and encouragement. Special thanks go out to my friend Costin B˘adescu,who drew me into research and the study of mathematics and computer science. I would also like to thank my friends Ash Chapman, Troy Hildebrandt, and Darryl Hill, whose solidarity as fellow students has been a great comfort. I am glad that we could confront the looming presence of graduate research together. And lastly, thanks to Bavaria Brewery, for offering the most drinkable cheap beer in Ottawa. iii Table of Contents Abstract ...................................... ii Acknowledgements ............................... iii Table of Contents ................................ v List of Figures .................................. vi Chapter 1 Introduction .......................... 1 1.1 Contributions...............................2 1.2 Overview..................................3 Chapter 2 Background ........................... 5 2.1 Prefix-Free Codes.............................5 2.2 Entropy.................................. 10 2.3 Shannon-Fano Codes........................... 13 2.4 Elias Codes................................ 15 2.5 Kolmogorov Complexity......................... 17 Chapter 3 Uniform Encoding and Applications ............ 20 3.1 The Uniform Encoding Lemma..................... 20 3.2 Permutations and Binary Search Trees................. 20 3.2.1 Records.............................. 21 3.2.2 Tree Height............................ 22 3.3 Hashing.................................. 24 iv 3.3.1 Balls in Urns........................... 25 3.3.2 Linear Probing.......................... 26 3.3.3 Cuckoo Hashing.......................... 28 3.3.4 2-Choice Hashing......................... 30 3.4 Bipartite Expanders........................... 32 Chapter 4 Non-Uniform Encoding and Applications ........ 35 4.1 The Non-Uniform Encoding Lemma................... 35 4.2 The Erd}os-R´enyi Random Graph.................... 36 4.3 Percolation on the Torus......................... 41 Chapter 5 Encoding with Kraft's Condition .............. 44 5.1 Chernoff Bound.............................. 46 Chapter 6 Conclusion ............................ 48 6.1 Contributions............................... 48 6.2 Future Work and Open Problems.................... 49 Bibliography ................................... 51 v List of Figures 2.1 A prefix-free code C for the set a; b; c; d; e; f with its corre- sponding binary tree........................f g 6 2.2 The composition of prefix-free codes is prefix-free........7 2.3 Comparison between H(α) and its approximation from (2.3).. 11 2.4 The Shannon-Fano code and corresponding tree for a set and probability distribution as given by the construction in Lemma 2.9. Notice the values log(1=px) and C(x) .............. 13 j j 2.5 Some Elias codes for small integers................ 17 3.1 The tree BST(σ), where σ = (10; 12; 3; 7; 1; 2; 5; 11; 9; 6; 13; 4; 8). σ has records 10; 12; 13. The nodes 5; 7; 12 are balanced.... 23 3.2 A linear probing hash table undergoing the sequential insertion of elements x1; : : : ; x6. In the end, we see that x2 and x6 are in a block of size 2; x1 in a block of its own; and x3; x4; x5 are in a block of size 3............................ 26 3.3 The potential minimal subgraphs of the cuckoo graph..... 30 4.1 The random graph Gn;c=n has triangles when c is large enough. The depicted zero bits in the adjacency matrix can be deduced from the first n=2 rows....................... 39 4.2 Random subgraphs of the 20 20 torus grid graph....... 43 × vi Chapter 1 Introduction Techniques from the study of information theory have long been used to produce original or elementary proofs of results in discrete mathematics and computer science. Encoding arguments, now commonly framed under the so-called incompressibility method, sprouted from the study of information complexity as introduced by Kol- mogorov, Solomonoff, and Chaitin. This technique has been fruitful in recent history, perhaps most famously being used to give the first nontrivial lower bound for the average running time of Shellsort, and for providing a constructive version of the Lov´aszlocal lemma [5,6, 20, 28, 39]. An encoding argument transforms the problem of upper-bounding the probability of some event into the problem of devising short encodings for elements of this event, typically through the Incompressibility Theorem of Kolmogorov complexity. In many cases, it is advantageous to use an encoding argument to solve this kind of problem, rather than the traditional probabilistic analysis. Indeed, encoding arguments are generally intuitive for computer scientists, and their strength relies only on the algorithmic construction of a code, rather than on a careful understanding of probability theory. Moreover, encoding arguments give strong results, and the probability in question often decreases exponentially in the parameter of interest. Such results can otherwise be difficult to obtain without relying on concentration inequalities in probability. We give a simple example illustrating the basic technique of encoding. Since we are overwhelmingly concerned with the binary encoding, we will agree now that the base of logarithms in log x is 2, except when explicitly stated otherwise. Define a run of t ones in a binary string x1 xn to be a sequence of t bits ··· xi = = xi+t−1 = 1 for some i 1; : : : ; n t + 1 . Note that 1 i n. We ··· 2 f − g ≤ ≤ will show that a uniformly random bit string is unlikely to contain a run of length significantly greater than log n. 1 2 Proposition 1.1. A uniformly random bit string x1 xn contains a run of at least ··· log n + s ones with probability at most 2−s. d e Proof. Suppose that x1 xn contains a run of t log n + s ones. By definition, ··· ≥ d e there exists some i 1; : : : ; n t + 1 such that xi = = xi+t−1 = 1. Therefore, 2 f − g ··· we can represent any such string by writing the value i 1 in binary, followed by the − bits x1; : : : ; xi−1; xi+t; : : : ; xn. Since 0 i n 1, then the binary encoding of the ≤ ≤ − value of i 1 uses log(n 1) + 1 = log n bits. − b − c d e In total, the given representation uses log n + n t n s d e − ≤ − bits, by the choice of t, and allows us to represent any n-bit binary string having a run of t or more ones. Therefore, the number of n-bit binary strings with a run of t ones is at most 2n−s, so the probability that a uniformly random n-bit binary string contains a run of t ones is at most 2n−s=2n = 2−s, as required. The proof of Proposition 1.1 is basic, yet still it serves as a typical example of an encoding argument. The general approach is as follows: we give an encoding of the elementary events which we care about; usually, the objects we encode are forced to have a relatively large substructure which becomes easy to describe. Accordingly, we devise a code which begins with a concise description of this substructure, and then a straightforward encoding of the remaining information which cannot be deduced from this substructure. The fact that this encoding is short proves that there are not very many such events, which upper bounds their probability. The result of Proposition 1.1 is loose; we can show, appealing directly to probability, that a uniformly random bit string contains a run of length at least log n + s with probability at most 2−s. In Chapter5 , we will show how our encoding argument can be refined to recover exactly the same result. 1.1 Contributions Though the study of Kolmogorov complexity is in itself interesting, it carries a certain amount of excess baggage since it makes reference to a description language, such as a Turing machine, and an input for this language.