Ababa plays a game with the letters of his name: If there is an AB, you can replace it with BAA. If there are two consecutive Bs, you can delete them. If there are three consecutive A's you can delete them. If at the beginning of the game there is the ABABABAABAAB sequence, find the least amount of letters that can be in the game at any time and explain why there can be no less.
SOLUTION (not complete)
Let's see that Ababa can get a 2-letter word as follows: ABABABAABAAB → BAAABABAABAAB → BBABAABAAB → ABAABAAB → BAAAABAAB → BABAAB → BBAAAAB → BBAB → AB
1) There is at least one B: Let's see that making move 1 or 3 does not change the amount of B's, and that when making move 2 the amount of B's changes in 2, from this we have that the amount of B always maintains its parity and as it starts with 5 B's then B amount is always odd and we have what we wanted.
2) I don't know how to prove that there must be at least 1 A.
This is easy to solve if you are familiar with the group $S_3$ of all ($3!=6$) permutations of a $3$-element set. If the set is $\{a,b,c\}$, define the permutations $A$ and $B$ so that:
$$A=\begin{pmatrix}a&b&c\\b&c&a\end{pmatrix}$$ $$B=\begin{pmatrix}a&b&c\\b&a&c\end{pmatrix}$$
Also, define the "multiplication" of permutations as applying them in turn, first the one on the "right" side, then the one on the "left" side. Thus, for example:
$$AB=\begin{pmatrix}a&b&c\\c&b&a\end{pmatrix}$$ $$BAA=\begin{pmatrix}a&b&c\\c&b&a\end{pmatrix}$$
so you can see that $AB=BAA$. You may also want to define the permutation:
$$I=\begin{pmatrix}a&b&c\\a&b&c\end{pmatrix}$$
and, for it, it is valid that $IX=XI=X$ for any permutation $X$.
We will also use the symbols for exponentiation as it would come naturally: $A^1=A, A^2=AA, A^3=AAA$ etc. (similar for $B$), and you can also write $A^0=I$. As it happens, $A^3=AAA=I$ and also $BB=B^2=I$.
Now, you can see that, if two sequences of letters can be transformed to each other, then the corresponding permutations obtained by "multiplying" the permutation are the same. (You may always insert and remove any $I$'s between any two letters at any time, so you can treat an empty sequence of letters the same as if it was $I$.)
In other words, you have found an invariant that stays the same when you modify your sequence, and this invariant is not a number but a permutation, from $S_3$. (Incidentally, the parity of the number of $B$'s, which is also the invariant, is called the parity of the permutation.)
So, what you have done already is a proof that $ABABABAABAAB=AB$ as a permutation. You need to show that you cannot have any fewer than two letters. For that, note that $AB$, as a permutation, is a different from the permutations $A$, $B$ and $I$.