All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Word Meld 4 (Posted on 2003-08-13)
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)

 See The Solution Submitted by DJ Rating: 3.9091 (11 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: I'm not sure I get the rules | Comment 2 of 10 |
(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 2003-08-13 08:39:39

 Search: Search body:
Forums (0)