Perhaps it isn't the same problem, but you could read the discussion at Converting BCBCBCBCBCCCB to (BC)^{5}CCB.
In reply to Re: String Compression Optimization (repeated concatenated subsequences)
by Caron
in thread String Compression Optimization (repeated concatenated subsequences)
by QM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |