Abstract
A cryptarithm is a mathematical puzzle where given an arithmetic equation written with letters rather than numerals, a player must discover an assignment of numerals on letters that makes the equation hold true. In this paper, we propose a method to construct a DFA that accepts cryptarithms that admit (unique) solutions for each base. We implemented the method and constructed a DFA for bases \(k \le 7\). Those DFAs can be used as complete catalogues of cryptarithms, whose applications include enumeration of and counting the exact numbers \(G_k(n)\) of cryptarithm instances with n digits that admit base-k solutions. Moreover, explicit formulas for \(G_2(n)\) and \(G_3(n)\) are given.
Keywords
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
For readability a small space is inserted in every three letters.
References
Abbasian, R., Mazloom, M.: Solving cryptarithmetic problems using parallel genetic algorithm. In: Second International Conference on Computer and Electrical Engineering, pp. 308–312 (2009)
Collins, T.: Alphametic puzzle solver. http://www.tkcs-collins.com/truman/alphamet/alpha_solve.shtml. Accessed 01 May 2018
Dudeney, H.E.: Strand Magazine, vol. 68, pp. 97–214. George Newnes, London (1924)
Endoh, H.: Automata-theoretic approaches to puzzle analysis. Master’s thesis, Graduate School of Information Sciences, Tohoku University (2013). (in Japanese)
Endoh, H., Narisawa, K., Shinohara, A.: An automaton theory approach for analyzing alphametic. In: Proceedings of the 16th Game Programming Workshop, pp. 54–61 (2011). (in Japanese)
Eppstein, D.: On the NP-completeness of cryptarithms. ACM SIGACT News 18(3), 38–40 (1987)
Knuth, D.E.: The Art of Computer Programming, vol. 4A. Addison-Wesley, Reading (2017)
Luoma, K.: Cryptarithms: a non-programming approach using excel. Spreadsh. Educ. (eJSiE) 9(2), 6 (2016)
Tamura, N.: Cryptarithmetic puzzle solver. http://bach.istc.kobe-u.ac.jp/llp/crypt.html. Accessed 01 May 2018
Acknowledgments
We thank to Kaizaburo Chubachi for assisting us in some of the experiments. We also appreciate anonymous reviewers’ helpful comments. The work is supported in part by KAKENHI 15H05706.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Nozaki, Y., Hendrian, D., Yoshinaka, R., Shinohara, A. (2018). Enumeration of Cryptarithms Using Deterministic Finite Automata. In: Câmpeanu, C. (eds) Implementation and Application of Automata. CIAA 2018. Lecture Notes in Computer Science(), vol 10977. Springer, Cham. https://doi.org/10.1007/978-3-319-94812-6_24
Download citation
DOI: https://doi.org/10.1007/978-3-319-94812-6_24
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-94811-9
Online ISBN: 978-3-319-94812-6
eBook Packages: Computer ScienceComputer Science (R0)