On the Hardness of Almost–Sure Termination

  • Benjamin Lucien KaminskiEmail author
  • Joost-Pieter KatoenEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9234)


This paper considers the computational hardness of computing expected outcomes and deciding (universal) (positive) almost–sure termination of probabilistic programs. It is shown that computing lower and upper bounds of expected outcomes is \(\varSigma _1^0\)– and \(\varSigma _2^0\)–complete, respectively. Deciding (universal) almost–sure termination as well as deciding whether the expected outcome of a program equals a given rational value is shown to be \(\varPi ^0_2\)–complete. Finally, it is shown that deciding (universal) positive almost–sure termination is \(\varSigma _2^0\)–complete (\(\varPi _3^0\)–complete).


Probabilistic programs Expected outcomes Almost–sure termination Positive almost–sure termination Computational hardness 



We would like to thank Luis María Ferrer Fioriti (Saarland University) and Federico Olmedo (RWTH Aachen) for the fruitful discussions on the topics of this paper. Furthermore, we are very grateful for the valuable and constructive comments we received from the anonymous referees on an earlier version of this paper.


  1. 1.
    Kozen, D.: Semantics of Probabilistic Programs. J. Comput. Syst. Sci. 22(3), 328–350 (1981)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Barthe, G., Köpf, B., Olmedo, F., Béguelin, S.Z.: Probabilistic relational reasoning for differential privacy. ACM Trans. Program. Lang. Syst. 35(3), 9 (2013)CrossRefGoogle Scholar
  3. 3.
    Borgström, J., Gordon, A., Greenberg, M., Margetson, J., van Gael, J.: Measure transformer semantics for Bayesian machine learning. LMCS 9(3), 1–39 (2013). Paper Number 11Google Scholar
  4. 4.
    McIver, A., Morgan, C.: Abstraction, Refinement and Proof for Probabilistic Systems. Springer, New York (2004)Google Scholar
  5. 5.
    Gretz, F., Katoen, J.P., McIver, A.: Operational versus weakest pre-expectation semantics for the probabilistic guarded command language. Perform. Eval. 73, 110–132 (2014)CrossRefGoogle Scholar
  6. 6.
    Fioriti, L.M.F., Hermanns, H.: Probabilistic termination: Soundness, completeness, and compositionality. In: POPL 2015, pp. 489–501. ACM (2015)Google Scholar
  7. 7.
    Sneyers, J., De Schreye, D.: Probabilistic termination of CHRiSM programs. In: Vidal, G. (ed.) LOPSTR 2011. LNCS, vol. 7225, pp. 221–236. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  8. 8.
    Arons, T., Pnueli, A., Zuck, L.D.: Parameterized verification by probabilistic abstraction. In: Gordon, A.D. (ed.) FOSSACS 2003. LNCS, vol. 2620, pp. 87–102. Springer, Heidelberg (2003) CrossRefGoogle Scholar
  9. 9.
    Esparza, J., Gaiser, A., Kiefer, S.: Proving termination of probabilistic programs using patterns. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 123–138. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  10. 10.
    Morgan, C.: Proof rules for probabilistic loops. In: Proceedings of the BCS-FACS 7th Refinement Workshop, Workshops in Computing. Springer (1996)Google Scholar
  11. 11.
    Tiomkin, M.L.: Probabilistic termination versus fair termination. TCS 66(3), 333–340 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Kleene, S.C.: Recursive predicates and quantifiers. Trans. AMS 53(1), 41–73 (1943)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Odifreddi, P.: Classical Recursion Theory: The Theory of Functions and Sets of Natural Numbers. Elsevier, Amsterdam (1992) Google Scholar
  14. 14.
    Post, E.L.: Recursively enumerable sets of positive integers and their decision problems. Bull. AMS 50(5), 284–316 (1944)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Davis, M.D.: Computability, Complexity, and Languages: Fundamentals of Theoretical Computer Science. Academic Press, Cambridge (1994)Google Scholar
  16. 16.
    Odifreddi, P.: Classical Recursion Theory, vol. II. Elsevier, Amsterdam (1999)zbMATHGoogle Scholar
  17. 17.
    Kaminski, B.L., Katoen, J.P.: On the Hardness of Almost-Sure Termination. ArXiv e-prints, June 2015Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  1. 1.Software Modeling and Verification GroupRWTH Aachen UniversityAachenGermany

Personalised recommendations