Verified Analysis of Random Binary Tree Structures

This work is a case study of the formal verification and complexity analysis of some famous probabilistic algorithms and data structures in the proof assistant Isabelle/HOL. In particular, we consider the expected number of comparisons in randomised quicksort, the relationship between randomised quicksort and average-case deterministic quicksort, the expected shape of an unbalanced random Binary Search Tree, and the expected shape of a Treap. The last two have, to our knowledge, not been analysed using a theorem prover before and the last one is of particular interest because it involves continuous distributions.

[1]  Johannes Hölzl,et al.  A Verified Compiler for Probability Density Functions , 2015, ESOP.

[2]  Tobias Nipkow,et al.  Treaps , 2018, Arch. Formal Proofs.

[3]  David A. Basin,et al.  CryptHOL: Game-Based Proofs in Higher-Order Logic , 2020, Journal of Cryptology.

[4]  Roman Fric,et al.  A Categorical Approach to Probability Theory , 2010, Stud Logica.

[5]  Manuel Eberl Expected Shape of Random Binary Search Trees , 2017, Arch. Formal Proofs.

[6]  Johannes Hölzl,et al.  Three Chapters of Measure Theory in Isabelle/HOL , 2011, ITP.

[7]  Thomas Ottmann,et al.  Algorithmen und Datenstrukturen, 5. Auflage , 2012 .

[8]  Krishnendu Chatterjee,et al.  Automated Recurrence Analysis for Almost-Linear Expected-Runtime Bounds , 2017, CAV.

[9]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[10]  M. V. Wilkes,et al.  The Art of Computer Programming, Volume 3, Sorting and Searching , 1974 .

[11]  Richard M. Karp,et al.  Probabilistic recurrence relations , 1994, JACM.

[12]  Tobias Nipkow Amortized Complexity Verified , 2015, ITP.

[13]  Bruce A. Reed,et al.  The height of a random binary search tree , 2003, JACM.

[14]  Manuel Eberl The number of comparisons in QuickSort , 2017, Arch. Formal Proofs.

[15]  Robert Sedgewick,et al.  The analysis of Quicksort programs , 1977, Acta Informatica.

[16]  Joseph Tassarotti,et al.  Verified Tail Bounds for Randomized Programs , 2018, ITP.

[17]  Philippe Flajolet,et al.  Lambda - Upsilon - Omega: An Assistant Algorithms Analyzer , 1988, AAECC.

[18]  Benjamin Grégoire,et al.  Formal certification of code-based cryptographic proofs , 2009, POPL '09.

[19]  Tobias Nipkow,et al.  Verified Root-Balanced Trees , 2017, APLAS.

[20]  James McKinna,et al.  A Machine-Checked Proof of the Average-Case Complexity of Quicksort in Coq , 2009, TYPES.

[21]  Markus Wenzel,et al.  Isabelle, Isar - a versatile environment for human readable formal proof documents , 2002 .

[22]  Cecilia R. Aragon,et al.  Randomized search trees , 1989, 30th Annual Symposium on Foundations of Computer Science.

[23]  Christine Paulin-Mohring,et al.  Proofs of randomized algorithms in Coq , 2006, Sci. Comput. Program..

[24]  J. Gregory Morrisett,et al.  The Foundational Cryptography Framework , 2014, POST.

[25]  Tobias Nipkow,et al.  Concrete Semantics: With Isabelle/HOL , 2014 .

[26]  Thomas Ottmann,et al.  Algorithmen und Datenstrukturen , 1990, Reihe Informatik.

[27]  Jean Vuillemin,et al.  A unifying look at data structures , 1980, CACM.

[28]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[29]  Tobias Nipkow,et al.  A Proof Assistant for Higher-Order Logic , 2002 .

[30]  Joe Hurd,et al.  Formal verification of probabilistic algorithms , 2003 .

[31]  Johannes Hölzl,et al.  Formalising Semantics for Expected Running Time of Probabilistic Programs , 2016, ITP.

[32]  Marta Z. Kwiatkowska,et al.  Quantitative Analysis With the Probabilistic Model Checker PRISM , 2006, QAPL.

[33]  Tobias Nipkow,et al.  Automatic Functional Correctness Proofs for Functional Search Trees , 2016, ITP.

[34]  Conrado Martínez,et al.  Randomized binary search trees , 1998, JACM.

[35]  Johannes Hölzl,et al.  Markov Chains and Markov Decision Processes in Isabelle/HOL , 2017, Journal of Automated Reasoning.

[36]  Andreas Lochbihler,et al.  Probabilistic Functions and Cryptographic Oracles in Higher Order Logic , 2016, ESOP.

[37]  C. Caramanis What is ergodic theory , 1963 .

[38]  Joost-Pieter Katoen,et al.  Weakest Precondition Reasoning for Expected Run-Times of Probabilistic Programs , 2016, ESOP.