Document Open Access Logo

Solving One Variable Word Equations in the Free Group in Cubic Time

Authors Robert Ferens , Artur Jeż

Thumbnail PDF


  • Filesize: 0.74 MB
  • 17 pages

Document Identifiers

Author Details

Robert Ferens
  • Institute of Computer Science, University of Wrocław, Poland
Artur Jeż
  • Institute of Computer Science, University of Wrocław, Poland

Cite AsGet BibTex

Robert Ferens and Artur Jeż. Solving One Variable Word Equations in the Free Group in Cubic Time. In 38th International Symposium on Theoretical Aspects of Computer Science (STACS 2021). Leibniz International Proceedings in Informatics (LIPIcs), Volume 187, pp. 30:1-30:17, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2021)


A word equation with one variable in a free group is given as U = V, where both U and V are words over the alphabet of generators of the free group and X, X⁻¹, for a fixed variable X. An element of the free group is a solution when substituting it for X yields a true equality (interpreted in the free group) of left- and right-hand sides. It is known that the set of all solutions of a given word equation with one variable is a finite union of sets of the form {α wⁱ β : i ∈ ℤ}, where α, w, β are reduced words over the alphabet of generators, and a polynomial-time algorithm (of a high degree) computing this set is known. We provide a cubic time algorithm for this problem, which also shows that the set of solutions consists of at most a quadratic number of the above-mentioned sets. The algorithm uses only simple tools of word combinatorics and group theory and is simple to state. Its analysis is involved and focuses on the combinatorics of occurrences of powers of a word within a larger word.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Combinatorics on words
  • Theory of computation → Formalisms
  • Computing methodologies → Equation and inequality solving algorithms
  • Word equations
  • free group
  • one-variable equations


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


  1. Kenneth I. Appel. One-variable equations in free groups. Proceedings of the American Mathematical Society, 19:912-918, 1968. Google Scholar
  2. Kenneth I. Appel. On two variable equations in free groups. Proceedings of the American Mathematical Society, 21:179-184, 1969. Google Scholar
  3. Dimitri Bormotov, Robert Gilman, and Alexei Myasnikov. Solving one-variable equations in free groups. Journal of Group Theory, 12:317–330, 2009. URL:
  4. Witold Charatonik and Leszek Pacholski. Word equations with two variables. In IWWERT, pages 43-56, 1991. URL:
  5. Ian M. Chiswell and Vladimir N. Remeslennikov. Equations in free groups with one variable. I. Journal of Group Theory, 3(4), 2000. URL:
  6. Joel D. Day, Vijay Ganesh, Paul He, Florin Manea, and Dirk Nowotka. The satisfiability of word equations: Decidable and undecidable theories. In Igor Potapov and Pierre-Alain Reynier, editors, Reachability Problems - 12th International Conference, RP 2018, Marseille, France, September 24-26, 2018, Proceedings, volume 11123 of Lecture Notes in Computer Science, pages 15-29. Springer, 2018. URL:
  7. Volker Diekert. Makanin’s algorithm. In M. Lothaire, editor, Algebraic Combinatorics on Words, chapter 12, pages 342-390. Cambridge University Press, 2002. Google Scholar
  8. Volker Diekert, Claudio Gutiérrez, and Christian Hagenah. The existential theory of equations with rational constraints in free groups is PSPACE-complete. Inf. Comput., 202(2):105-140, 2005. URL:
  9. Volker Diekert, Artur Jeż, and Wojciech Plandowski. Finding all solutions of equations in free groups and monoids with involution. Inf. Comput., 251:263-286, 2016. URL:
  10. Robert Dąbrowski and Wojciech Plandowski. Solving two-variable word equations. In ICALP, pages 408-419, 2004. URL:
  11. Robert Dąbrowski and Wojciech Plandowski. On word equations in one variable. Algorithmica, 60(4):819-828, 2011. URL:
  12. Robert H. Gilman and Alexei G. Myasnikov. One variable equations in free groups via context free languages. Contemporary Mathematics, 349:83–88, 2004. Google Scholar
  13. Yu. I. Hmelevskii. Equations in Free Semigroups. Number 107 in Proceedings Steklov Institute of Mathematics. American Mathematical Society, 1976. Translated from the Russian original: Trudy Mat. Inst. Steklov. 107, 1971. Google Scholar
  14. Lucian Ilie and Wojciech Plandowski. Two-variable word equations. RAIRO Theor. Informatics Appl., 34(6):467-501, 2000. URL:
  15. Artur Jeż. One-variable word equations in linear time. Algorithmica, 74:1-48, 2016. URL:
  16. Artur Jeż. Recompression: a simple and powerful technique for word equations. J. ACM, 63(1):4:1-4:51, March 2016. URL:
  17. Juha Kärkkäinen, Peter Sanders, and Stefan Burkhardt. Linear work suffix array construction. J. ACM, 53(6):918-936, 2006. URL:
  18. Toru Kasai, Gunho Lee, Hiroki Arimura, Setsuo Arikawa, and Kunsoo Park. Linear-time longest-common-prefix computation in suffix arrays and its applications. In CPM, pages 181-192, 2001. URL:
  19. Olga Kharlampovich, Igor G. Lysënok, Alexei G. Myasnikov, and Nicholas W. M. Touikan. The solvability problem for quadratic equations over free groups is NP-complete. Theory of Computing Systems, 47(1):250-258, 2010. URL:
  20. Olga Kharlampovich and Alexei Myasnikov. Elementary theory of free non-abelian groups. Journal of Algebra, 302:451-552, 2006. Google Scholar
  21. Antoni Kościelski and Leszek Pacholski. Makanin’s algorithm is not primitive recursive. Theor. Comput. Sci., 191(1-2):145-156, 1998. URL:
  22. Markku Laine and Wojciech Plandowski. Word equations with one unknown. Int. J. Found. Comput. Sci., 22(2):345-375, 2011. URL:
  23. A. A. Lorents. Representations of sets of solutions of systems of equations with one unknown in a free group. Dokl. Akad. Nauk. SSSR, 178:290-292, 1968. Google Scholar
  24. Roger C. Lyndon and Marcel-Paul Schützenberger. The equation a^M = b^Nc^P in a free group. Michigan Mathematical Journal, 9(4):289-298, 1962. Google Scholar
  25. Roger Conant Lyndon. Equations in free groups. Transansaction of American Mathematical Society, 96:445–457, 1960. URL:
  26. Gennadií Makanin. The problem of solvability of equations in a free semigroup. Matematicheskii Sbornik, 2(103):147-236, 1977. (in Russian). Google Scholar
  27. Gennadií Makanin. Equations in a free group. Izv. Akad. Nauk SSR, Ser. Math. 46:1199-1273, 1983. English transl. in Math. USSR Izv. 21 (1983). Google Scholar
  28. Jakob Nielsen. Über die Isomorphismen unendlicher Gruppen ohne Relation. Mathematische Annalen, 79:269–272, 1918. Google Scholar
  29. Dirk Nowotka and Aleksi Saarela. An optimal bound on the solution sets of one-variable word equations and its consequences. In Ioannis Chatzigiannakis, Christos Kaklamanis, Dániel Marx, and Donald Sannella, editors, 45th International Colloquium on Automata, Languages, and Programming, ICALP 2018, July 9-13, 2018, Prague, Czech Republic, volume 107 of LIPIcs, pages 136:1-136:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018. URL:
  30. Seraphin D. Eyono Obono, Pavel Goralčik, and Marianne Maksimenko. Efficient solving of the word equations in one variable. In MFCS, pages 336-341, 1994. URL:
  31. Wojciech Plandowski. Satisfiability of word equations with constants is in PSPACE. J. ACM, 51(3):483-496, 2004. URL:
  32. Alexander A. Razborov. On Systems of Equations in Free Groups. PhD thesis, Steklov Institute of Mathematics, 1987. In Russian. Google Scholar
  33. Zlil Sela. Diophantine geometry over groups VI: the elementary theory of a free group. Geometric & Functional Analysis, 16:707-730, 2006. URL:
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