Usually, a word meld requires changing one common English word into another, using steps that change any single letter and yield another common word.
In this word meld, your task is to change the word "PASSER" into the word "SPARSE." However, for this problem, each step consists of switching the position of any two adjacent letters (without regard, obviously, for whether they form a word or not).
P A S S E R
. . . . . .
. . . . . .
. . . . . .
. . . . . .
S P A R S E
How can you do this in five moves?
(Not less than five)
(In reply to
I'm not sure I get the rules by FatBoy)
It would seem that indeed the only way to stretch this out to exactly 5 steps is to interchange the two S's at some point. The four steps that do the work are interchanging pos. 2&3, 1&2, 5&6 and 4&5. These can be in any order so long as 2&3 gets done before 1&2, and 5&6 before 4&5. That's six possible orders. The switching of the two S's at 3&4 can be done at any time they are still together. There seems to be no other possibilities.
A computer search gives the following possibilities:
3 4 2 3 1 2 5 6 4 5
3 4 2 3 5 6 1 2 4 5
3 4 2 3 5 6 4 5 1 2
3 4 5 6 2 3 1 2 4 5
3 4 5 6 2 3 4 5 1 2
3 4 5 6 4 5 2 3 1 2
5 6 3 4 2 3 1 2 4 5
5 6 3 4 2 3 4 5 1 2
5 6 3 4 4 5 2 3 1 2
where the program is
s0$ = "passer"
FOR t1 = 1 TO 5
s1$ = LEFT$(s0$, t1  1) + MID$(s0$, t1 + 1, 1) + MID$(s0$, t1, 1) + MID$(s0$, t1 + 2)
FOR t2 = 1 TO 5
s2$ = LEFT$(s1$, t2  1) + MID$(s1$, t2 + 1, 1) + MID$(s1$, t2, 1) + MID$(s1$, t2 + 2)
FOR t3 = 1 TO 5
s3$ = LEFT$(s2$, t3  1) + MID$(s2$, t3 + 1, 1) + MID$(s2$, t3, 1) + MID$(s2$, t3 + 2)
FOR t4 = 1 TO 5
s4$ = LEFT$(s3$, t4  1) + MID$(s3$, t4 + 1, 1) + MID$(s3$, t4, 1) + MID$(s3$, t4 + 2)
FOR t5 = 1 TO 5
s5$ = LEFT$(s4$, t5  1) + MID$(s4$, t5 + 1, 1) + MID$(s4$, t5, 1) + MID$(s4$, t5 + 2)
IF s5$ = "sparse" THEN PRINT t1; t1 + 1, t2; t2 + 1, t3; t3 + 1, t4; t4 + 1, t5; t5 + 1
NEXT
NEXT
NEXT
NEXT
NEXT

Posted by Charlie
on 20030813 08:39:39 