Lably
Skip to content

Word equation

Relation in theoretical computer science

  • 10 min read
  • 7 chapters

Learn it on Lably

A classical example of a word equation is the commutation equation xw=⋅wx, in which x is an unknown and w is a primitive terminal word. It is well-known that the solutions of the commutation equation are exactly those assignments mapping x to some power of w. Another example is the conjugacy equation xz=⋅zy, in which x,y, and z are all unknowns. The solutions of this equation are precisely those assignments h sending x and y to conjugate words, with the image h(z) being filled in as appropriate.

Many subclasses of word equations have been introduced, some of which include:

  • constant-free equations, which are those u=⋅v such that u,v comprise unknowns only. Such equations have a trivial solution wherein all their unknowns are erased; as such, they are usually studied over free semigroups.
  • quadratic equations, which are those containing each of their unknowns at most twice. This is exactly the class of word equations on which the Nielsen Transformations algorithm (cf. below) terminates.
  • word equations in one unknown, which can be checked for their solubility in linear time.

History

The study of word equations was initiated by Willard Quine as early as 1946. Quine proved that the first-order theory of word equations is essentially equivalent to the first-order theory of arithmetic. In 1954, Andrey Markov coined the term "word equation", and introduced the solubility problem for them: decide whether a given word equation admits a solution. For a long time, it was hoped that this problem was undecidable. One reason for this is that it was expected, (incorrectly, it turns out), that word equations might provide an intermediary step between Hilbert's Tenth Problem and the undecidable problems relating to Turing machines.

Further contributions were made in the early 1970s with the work of André Lentin and Juri Ilich Hmelevskii. In 1976, Gennady Makanin introduced a method by which it could be determined whether any given word equation admitted a solution. That this procedure, which has come to be known as Makanin's algorithm, exists is very difficult to prove, and it is one of the most celebrated results in combinatorics on words. Makanin's algorithm is considered to be one of the most conceptually difficult existing in literature, and it is also highly intractable, requiring (in its initial formulation) triply exponential time. Thus, there were many attempts to improve upon it. In 1999, Wojciech Plandowski introduced a novel algorithm, showing that the solubility problem for word equations is in PSPACE.

In 2006, Plandowski and Wojciech Rytter showed that minimal solutions of word equations are highly (i.e., exponentially) compressible using Lempel-Ziv encoding. It is conjectured that the length of a minimal solution of a word equation E is (at most) singly exponential in the length |E| of E. If this conjecture is true, then Plandowski and Rytter's result yields a straightforward "guess-and-verify" NP algorithm for the solubility problem: they show that a solution h can be verified whilst working only with its LZ-compressed representation LZ(h), and the conjecture being true would imply that LZ(h) has size polynomial in |E|. As it stands, the last part of the complexity analysis—the question as to whether solving word equations is NP-complete—remains open. (NP-hardness follows immediately from the fact that solving word equations generalises the NP-complete problem of pattern matching).

Sign in to keep reading

6 more chapters are free with a Lably account.

More in From Lably lessons