One-Variable Word Equations in Linear Time

In this paper we consider word equations with one-variable (and arbitrarily many occurrences of it). A recent technique of recompression, which is applicable to general word equations, is shown to be suitable also in this case. While in general case the recompression is nondeterministic in case of one-variable it becomes deterministic and its running time is $$\mathcal {O}(n + \#_X \log n)$$O(n+#Xlogn), where $$\#_X$$#X is the number of occurrences of the variable in the equation. This matches the previously best algorithm due to Dąbrowski and Plandowski. Then, using a couple of heuristics as well as more detailed time analysis, the running time is lowered to $$\mathcal {O}(n)$$O(n) in the RAM model. Unfortunately, no new properties of solutions are shown.

[1]  Wojciech Plandowski,et al.  An efficient algorithm for solving word equations , 2006, STOC '06.

[2]  Artur Jez,et al.  Approximation of smallest linear tree grammar , 2013, Inf. Comput..

[3]  Wojciech Plandowski,et al.  Application of Lempel-Ziv Encodings to the Solution of Words Equations , 1998, ICALP.

[4]  Uzi Vishkin,et al.  Recursive Star-Tree Parallel Data Structure , 1993, SIAM J. Comput..

[5]  Markus Lohrey,et al.  Compressed Membership in Automata with Compressed Labels , 2011, CSR.

[6]  Robert Dabrowski,et al.  On Word Equations in One Variable , 2002, Algorithmica.

[7]  Wojciech Plandowski Satisfiability of word equations with constants is in NEXPTIME , 1999, STOC '99.

[8]  Kurt Mehlhorn,et al.  Maintaining dynamic sequences under equality tests in polylogarithmic time , 1994, SODA '94.

[9]  Hiroshi Sakamoto,et al.  A fully linear-time approximation algorithm for grammar-based compression , 2003, J. Discrete Algorithms.

[10]  Wojciech Plandowski,et al.  Satisfiability of word equations with constants is in PSPACE , 1999, 40th Annual Symposium on Foundations of Computer Science (Cat. No.99CB37039).

[11]  Artur Jez Context Unification is in PSPACE , 2014, ICALP.

[12]  Witold Charatonik,et al.  Word Equations with Two Variables , 1991, IWWERT.

[13]  Peter Sanders,et al.  Linear work suffix array construction , 2006, JACM.

[14]  Artur Jez Compressed Membership for NFA (DFA) with Compressed Labels is in NP (P) , 2012, STACS.

[15]  Robert Dabrowski,et al.  On Word Equations in One Variable , 2009, Algorithmica.

[16]  Artur Jez Recompression: A Simple and Powerful Technique for Word Equations , 2016, J. ACM.

[17]  Artur Jez,et al.  Faster Fully Compressed Pattern Matching by Recompression , 2011, ICALP.

[18]  Hiroki Arimura,et al.  Linear-Time Longest-Common-Prefix Computation in Suffix Arrays and Its Applications , 2001, CPM.

[19]  Pavel Goralcik,et al.  Efficient Solving of the Word Equations in One Variable , 1994, MFCS.

[20]  R. Dabrowski,et al.  Solving Two-Variable Word Equations (Extended Abstract) , 2004, ICALP.

[21]  Wojciech Plandowski,et al.  Word Equations with One Unknown , 2009, Developments in Language Theory.

[22]  G. Makanin The Problem of Solvability of Equations in a Free Semigroup , 1977 .

[23]  Artur Jez The Complexity of Compressed Membership Problems for Finite Automata , 2013, Theory of Computing Systems.

[24]  Artur Jez,et al.  Approximation of grammar-based compression via recompression , 2013, Theor. Comput. Sci..