The word problem
Most people have heard of word problems, but not as many have heard of the word problem. If you're imagining that the word problem is some superlatively awful word problem, I can assure you it's not. It's both simpler and weirder than that.
The word problem is essentially about whether you can always apply algebraic rules in an automated way. The reason it is called the word problem is that you start by a description of your algebraic system in terms of symbols (letters") and concatenations of symbols (words") subject to certain rules, also called relations.
The word problem for groupsFor example, you can describe a group by saying it contains a and b, and it satisfies the relations
a^2 = b^2
and
a-1ba = b-1.
A couple things are implicit here. We've said this a group, and since every element in a group has an inverse, we've implied that a-1 and b-1 are in the group as well. Also from the definition of a group comes the assumption that multiplication is associative, that there's an identity element, and that inverses work like they're supposed to.
In the example above, you could derive everything about the group from the information given. In particular, someone could give you two words-strings made up of a, b, a-1, and b-1-and you could determine whether they are equal by applying the rules. But in general, this is not possible for groups.
UndecidableThe bad news is that in general this isn't possible. In computer science terminology, the word problem is undecidable. There is no algorithm that can tell whether two words are equal given a list of relations, at least not in general. There are special cases where the word problem is solvable, but a general algorithm is not possible.
The word problem for semigroupsI presented the word problem above in the context of groups, but you could look at the word problem in more general contexts, such as semigroups. A semigroup is closed under some associative binary operation, and that's it. There need not be any inverses or even an identity element.
Here's a concrete example of a semigroup whose word problem has been proven to be undecidable. As before we have two symbols, a and b. And because we are in a semigroup, not a group, there are no inverses. Our semigroup consists of all finite sequences make out of as and bs, subject to these five relations.
aba2b2 = b2a2ba
a2bab2a = b2a3ba
aba3b2 = ab2aba2
b3a2b2a2ba = b3a2b2a4
a4b2a2ba = b2a4
Source: Term Rewriting and All That
ExperienceWhen I first saw groups presented this as symbols and relations, I got my hopes up that a large swath of group theory could be automated. A few minutes later my naive hopes were dashed. So in my mind I thought Well, then this is hopeless."
But that is not true. Sometimes the word problem is solvable. It's like many other impossibility theorems. There's no fifth degree analog of the quadratic equation in general, but there are fifth degree polynomials whose roots can be found in closed form. There's no program that can tell whether any arbitrary program will halt, but that doesn't mean you can't tell whether some programs halt.
It didn't occur to me at the time that it would be worthwhile to explore the boundaries, learning which word problems can or cannot be solved. It also didn't occur to me that I would run into things like the word problem in practical applications, such as simplifying symbolic expressions and optimizing their evaluation. Undecidable problems lurk everywhere, but you can often step around them.
The post The word problem first appeared on John D. Cook.