A word equation is a formal equality E:=u=⋅v between a pair of words u and v, each over an alphabet Σ∪Ξ comprising both constants (cf. Σ) and unknowns (cf. Ξ). An assignment h of constant words to the unknowns of E is said to solve E if it maps both sides of E to identical words. Word equations are a central object in combinatorics on words; they play an analogous role in this area as do Diophantine equations in number theory. One stark difference is that Diophantine equations have an undecidable solubility problem, whereas the analogous problem for word equations is decidable. 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).
Methods of solution There is no "elementary" algorithm for determining whether a given word equation admits a solution. The algorithms mentioned above are all of theoretical interest, but they'll not help in solving a word equation by hand, for instance. There exist however a few methods that can sometimes help with this:
Length arguments Because a solution h to a word equation E must unify its two sides, one can use the multiset of symbols occurring on either side of E to deduce a linear equality in the lengths of the images of the unknowns. For instance, the form of xx=⋅y implies that its solutions h must satisfy |h(y)|=2|h(x)|, which narrows down the set of possible h to check. Similar arguments can allow for a word equation E to be "split up" into smaller ones if it can be deduced positions within the two sides of E which must line up in all solutions of E. For instance, the midpoints of each side of xyyx=⋅uvvu can be detected via a length argument, and hence that word equation can be split into the system {xy=⋅uvyx=⋅vu.
Appeal to periodicity Another useful tool for reasoning about word equations is the Periodicity Lemma of Fine and Wilf, which describes what happens if a certain word has multiple periods (i.e., distances at which its letters repeat). Consider, for instance, the word equation E:=x2y2=⋅z2. Suppose that (x,y,z)↦(wx,wy,wz) is one of its solutions. Then wx2wy2=wz2. By taking a suitable conjugacy in this identity, one can infer that there exists some conjugate z′ of z which is such that z'2=wxwy2wx. Now a length argument permits for the midpoint of each side to be identified here, and it follows from this observation that wxwy=z′=wywx. Herein is the commutation equation, whence wx and wy are powers of a common word. Now the infinite words wxω and wzω have a common prefix of length |wz2|. Since |wz2|=2|wz|≥|wz|+|wx|≥|wz|+|wx|−gcd(|z|,|x|), the Periodicity Lemma can be applied. Its conclusion here is that wz and wx are powers of a common word too. Thus, every solution h of E maps x,y, and z to powers of a common word.
Nielsen transformations
… excerpt ends here. Continue reading the full article.

