The Computational Complexity of Evil Hangman

Authors Jérémy Barbay , Bernardo Subercaseaux

Thumbnail PDF


  • Filesize: 0.56 MB
  • 12 pages

Document Identifiers

Author Details

Jérémy Barbay
  • Department of Computer Science, University of Chile, Santiago, Chile
Bernardo Subercaseaux
  • Department of Computer Science, University of Chile, Santiago, Chile
  • Millennium Institute for Foundational Research on Data, Santiago, Chile


We want to thank Robinson Castro, who first introduced us to this problem. We also thank Nicolás Sanhueza-Matamala, Alex Meiburg and the anonymous reviewers for their insightful comments and discussion.

Cite AsGet BibTex

Jérémy Barbay and Bernardo Subercaseaux. The Computational Complexity of Evil Hangman. In 10th International Conference on Fun with Algorithms (FUN 2021). Leibniz International Proceedings in Informatics (LIPIcs), Volume 157, pp. 23:1-23:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


The game of Hangman is a classical asymmetric two player game in which one player, the setter, chooses a secret word from a language, that the other player, the guesser, tries to discover through single letter matching queries, answered by all occurrences of this letter if any. In the Evil Hangman variant, the setter can change the secret word during the game, as long as the new choice is consistent with the information already given to the guesser. We show that a greedy strategy for Evil Hangman can perform arbitrarily far from optimal, and most importantly, that playing optimally as an Evil Hangman setter is computationally difficult. The latter result holds even assuming perfect knowledge of the language, for several classes of languages, ranging from Finite to Turing Computable. The proofs are based on reductions to Dominating Set on 3-regular graphs and to the Membership problem, combinatorial problems already known to be computationally hard.

Subject Classification

ACM Subject Classification
  • Theory of computation → Problems, reductions and completeness
  • Theory of computation → Complexity classes
  • combinatorial game theory
  • computational complexity
  • decidability
  • hangman


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Derek G. Corneil and Lorna K. Stewart. Dominating sets in perfect graphs. In Topics on Domination, pages 145-164. Elsevier, 1991. Google Scholar
  2. Rod G. Downey and Michael R. Fellows. Fixed-parameter tractability and completeness II: On completeness for W[1]. Theoretical Computer Science, 141(1-2):109-131, April 1995. Google Scholar
  3. Eliot D. Feldman and James C. Owings. A class of universal linear bounded automata. Inf. Sci., 6:187-190, 1973. Google Scholar
  4. Jörg Flum and Martin Grohe. Parameterized Complexity Theory (Texts in Theoretical Computer Science. An EATCS Series). Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2006. Google Scholar
  5. P. Hall. On representatives of subsets. Journal of the London Mathematical Society, s1-10(1):26-30, January 1935. Google Scholar
  6. John E. Hopcroft and Richard M. Karp. An $n^{5/2} $ algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing, 2(4):225-231, December 1973. Google Scholar
  7. Richard M. Karp. Reducibility among combinatorial problems. In Complexity of Computer Computations, pages 85-103. Springer US, 1972. Google Scholar
  8. Tohru Kikuno, Noriyoshi Yoshida, and Yoshiaki Kakuda. The np-completeness of the dominating set problem in cubic planer graphs. IEICE TRANSACTIONS (1976-1990), 63(6):443-444, 1980. Google Scholar
  9. S.-Y. Kuroda. Classes of languages and linear-bounded automata. Information and Control, 7(2):207-223, June 1964. Google Scholar
  10. Peter Linz. An Introduction to Formal Languages and Automata, Fifth Edition. Jones and Bartlett Publishers, Inc., USA, 5th edition, 2011. Google Scholar
  11. Nick Parlante, Julie Zelenski, Keith Schwarz, Dave Feinberg, Michelle Craig, Stuart Hansen, Michael Scott, and David J. Malan. Nifty assignments. In Proceedings of the 42nd ACM technical symposium on Computer Science Education - SIGCSE quotesingle11. ACM Press, 2011. Google Scholar
  12. Jan Arne Telle and Yngve Villanger. FPT algorithms for domination in biclique-free graphs. In Algorithms endash ESA 2012, pages 802-812. Springer Berlin Heidelberg, 2012. Google Scholar
  13. Iverson bracket notation. Last accessed on 2020-02-06.
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail