Journal of Automated Reasoning

, Volume 58, Issue 4, pp 483–508 | Cite as

Proving Divide and Conquer Complexities in Isabelle/HOL

  • Manuel EberlEmail author


The Akra–Bazzi method (Akra and Bazzi in Comput Optim Appl 10(2):195–210, 1998. doi: 10.1023/A:1018373005182), a generalisation of the well-known Master Theorem, is a useful tool for analysing the complexity of Divide and Conquer algorithms. This work describes a formalisation of the Akra–Bazzi method (as generalised by Leighton in Notes on better Master theorems for divide-and-conquer recurrences, 1996. in the interactive theorem prover Isabelle/HOL and the derivation of a generalised version of the Master Theorem from it. We also provide some automated proof methods that facilitate the application of this Master Theorem and allow mostly automatic verification of \(\varTheta \)-bounds for these Divide and Conquer recurrences. To our knowledge, this is the first formalisation of theorems for the analysis of such recurrences.


Isabelle/HOL Master Theorem Akra–Bazzi Divide and Conquer algorithms Recurrences Complexity Landau symbols 



Tobias Nipkow and Johannes Hölzl commented on an early draft of this work. Louay Bazzi made a very helpful suggestion that allowed us to fix the missing case in Leighton’s proof. We also thank the anonymous reviewers for their helpful suggestions and insightful questions.


  1. 1.
    Akra, M., Bazzi, L.: On the solution of linear recurrence equations. Comput. Optim. Appl. 10(2), 195–210 (1998). doi: 10.1023/A:1018373005182 MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Avigad, J., Donnelly, K.: Formalizing \(O\) notation in Isabelle/HOL. In: Basin, D., Rusinowitch, M. (eds.) Automated Reasoning, Lecture Notes in Computer Science, pp. 357–371. Springer, Berlin (2004). doi: 10.1007/978-3-540-25984-8_27 Google Scholar
  3. 3.
    Avigad, J., Hölzl, J., Serafin, L.: A formally verified proof of the central limit theorem. CoRR abs/1405.7012 (2014). Presented at the Isabelle Workshop 2014Google Scholar
  4. 4.
    Ballarin, C.: Locales: a module system for mathematical theories. J. Autom. Reason. 52(2), 123–153 (2014). doi: 10.1007/s10817-013-9284-7 MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Bazzi, L., Mitter, S.K.: The solution of linear probabilistic recurrence relations. Algorithmica 36(1), 41–57 (2003). doi: 10.1007/s00453-002-1003-4 MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Boncelet Jr., C.G.: Block arithmetic coding for source compression. IEEE Trans. Inf. Theory 39(5), 1546–1554 (1993). doi: 10.1109/18.259639 CrossRefzbMATHGoogle Scholar
  7. 7.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 4th printing, 3rd edn. The MIT Press, Cambridge (2009)zbMATHGoogle Scholar
  8. 8.
    Drmota, M., Szpankowski, W.: A Master theorem for discrete divide and conquer recurrences. J. ACM 60(3), 16:1–16:49 (2013). doi: 10.1145/2487241.2487242 MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Eberl, M.: The Akra–Bazzi Theorem and the Master Theorem. Archive of Formal Proofs (2015)., Formal proof development
  10. 10.
    Eberl, M.: Landau Symbols. Archive of Formal Proofs (2015)., Formal proof development
  11. 11.
    Haftmann, F., Nipkow, T.: Code generation via higher-order rewrite systems. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) Functional and Logic Programming. Lecture Notes in Computer Science, vol. 6009, pp. 103–117. Springer, Berlin (2010). doi: 10.1007/978-3-642-12251-4_9 CrossRefGoogle Scholar
  12. 12.
    Hölzl, J.: Proving inequalities over reals with computation in Isabelle/HOL. In: Reis, G.D., Théry, L. (eds.) Proceedings of the ACM SIGSAM 2009 International Workshop on Programming Languages for Mechanized Mathematics Systems (PLMMS’09), pp. 38–45. Munich (2009)Google Scholar
  13. 13.
    Krauss, A.: Automating Recursive Definitions and Termination Proofs in Higher-Order Logic. Ph.D. thesis, Technische Universität München, Institut für Informatik (2009).
  14. 14.
    Leighton, T.: Notes on Better Master Theorems for Divide-and-Conquer Recurrences (1996).

Copyright information

© Springer Science+Business Media Dordrecht 2016

Authors and Affiliations

  1. 1.Fakultät für InformatikTechnische Universität MünchenGarchingGermany

Personalised recommendations