Enter the maze

A (com)pressing problem (extras)

Lots of blue boats: istockphoto 000004623592

We suggested you try converting

"round_and_round,_round_and_round."

You should have got the following 33 rotations:

round_and_round,_round_and_round.
ound_and_round,_round_and_round.r
und_and_round,_round_and_round.ro
nd_and_round,_round_and_round.rou
d_and_round,_round_and_round.roun
_and_round,_round_and_round.round
and_round,_round_and_round.round_
nd_round,_round_and_round.round_a
d_round,_round_and_round.round_an
_round,_round_and_round.round_and
round,_round_and_round.round_and_
ound,_round_and_round.round_and_r
und,_round_and_round.round_and_ro
nd,_round_and_round.round_and_rou
d,_round_and_round.round_and_roun
,_round_and_round.round_and_round
_round_and_round.round_and_round,
round_and_round.round_and_round,_
ound_and_round.round_and_round,_r
und_and_round.round_and_round,_ro
nd_and_round.round_and_round,_rou
d_and_round.round_and_round,_roun
_and_round.round_and_round,_round
and_round.round_and_round,_round_
nd_round.round_and_round,_round_a
d_round.round_and_round,_round_an
_round.round_and_round,_round_and
round.round_and_round,_round_and_
ound.round_and_round,_round_and_r
und.round_and_round,_round_and_ro
nd.round_and_round,_round_and_rou
d.round_and_round,_round_and_roun
.round_and_round,_round_and_round

When they are sorted, this gives

,_round_and_round.round_and_round
.round_and_round,_round_and_round
_and_round,_round_and_round.round
_and_round.round_and_round,_round
_round,_round_and_round.round_and
_round.round_and_round,_round_and
_round_and_round.round_and_round,
and_round,_round_and_round.round_
and_round.round_and_round,_round_
d,_round_and_round.round_and_roun
d.round_and_round,_round_and_roun
d_and_round,_round_and_round.roun
d_and_round.round_and_round,_roun
d_round,_round_and_round.round_an
d_round.round_and_round,_round_an
nd,_round_and_round.round_and_rou
nd.round_and_round,_round_and_rou
nd_and_round,_round_and_round.rou
nd_and_round.round_and_round,_rou
nd_round,_round_and_round.round_a
nd_round.round_and_round,_round_a
ound,_round_and_round.round_and_r
ound.round_and_round,_round_and_r
ound_and_round,_round_and_round.r
ound_and_round.round_and_round,_r
round,_round_and_round.round_and_
round.round_and_round,_round_and_
round_and_round,_round_and_round.
round_and_round.round_and_round,_
und,_round_and_round.round_and_ro
und.round_and_round,_round_and_ro
und_and_round,_round_and_round.ro
und_and_round.round_and_round,_ro

Taking the last letters we get:

dddddd,__nnnnnnuuuuaarrrr__._oooo

This can be compressed to give:

6d1,2_6n4u2a4r2_1.1_4o

So the original 33 have been compressed to 22 characters.

Doing this all by habd is pretty tedious. If you know how to program then why not try and write a program to do run-length encoding using this method to improve it. Its not too difficult if you have mastered the basics of writing code. Our version in Java is given from the link below.