UCL Discovery
UCL home » Library Services » Electronic resources » UCL Discovery

A Calculus for Amortized Expected Runtimes

Batz, Kevin; Kaminski, Benjamin Lucien; Katoen, Joost-Pieter; Matheja, Christoph; Verscht, Lena; (2023) A Calculus for Amortized Expected Runtimes. Proceedings of the ACM on Programming Languages , 7 (POPL) , Article 67. 10.1145/3571260. Green open access

[thumbnail of 3571260.pdf]
Preview
Text
3571260.pdf - Published Version

Download (375kB) | Preview

Abstract

We develop a weakest-precondition-style calculus à la Dijkstra for reasoning about amortized expected runtimes of randomized algorithms with access to dynamic memory — the aert calculus. Our calculus is truly quantitative, i.e. instead of Boolean valued predicates, it manipulates real-valued functions. En route to the aert calculus, we study the ert calculus for reasoning about expected runtimes of Kaminski et al. [2018] extended by capabilities for handling dynamic memory, thus enabling compositional and local reasoning about randomized data structures. This extension employs runtime separation logic, which has been foreshadowed by Matheja [2020] and then implemented in Isabelle/HOL by Haslbeck [2021]. In addition to Haslbeck’s results, we further prove soundness of the so-extended ert calculus with respect to an operational Markov decision process model featuring countably-branching nondeterminism, provide extensive intuitive explanations, and provide proof rules enabling separation logic-style verification for upper bounds on expected runtimes. Finally, we build the so-called potential method for amortized analysis into the ert calculus, thus obtaining the aert calculus. Soundness of the aert calculus is obtained from the soundness of the ert calculus and some probabilistic form of telescoping. Since one needs to be able to handle changes in potential which can in principle be both positive or negative, the aert calculus needs to be — essentially — capable of handling certain signed random variables. A particularly pleasing feature of our solution is that, unlike e.g. Kozen [1985], we obtain a loop rule for our signed random variables, and furthermore, unlike e.g. Kaminski and Katoen [2017], the aert calculus makes do without the need for involved technical machinery keeping track of the integrability of the random variables. Finally, we present case studies, including a formal analysis of a randomized delete-insert-find-any set data structure [Brodal et al. 1996], which yields a constant expected runtime per operation, whereas no deterministic algorithm can achieve this.

Type: Article
Title: A Calculus for Amortized Expected Runtimes
Open access status: An open access version is available from UCL Discovery
DOI: 10.1145/3571260
Publisher version: https://doi.org/10.1145/3571260
Language: English
Additional information: © 2023 Copyright held by the owner/author(s). This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Keywords: Quantitative verification, randomized data structures, amortized analysis
UCL classification: UCL
UCL > Provost and Vice Provost Offices > UCL BEAMS
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science
URI: https://discovery.ucl.ac.uk/id/eprint/10163423
Downloads since deposit
23Downloads
Download activity - last month
Download activity - last 12 months
Downloads by country - last 12 months

Archive Staff Only

View Item View Item