Additional examples (provided by Scott Leadley, any errors are mine and not ypnypn's)
Some difficult cases:
- IN => OUT
6 xx aa dd bb ee cc
=>dd L ee L xx L
7 aa bb ee cc dd ff gg
=>ee D D
8 dd ww aa bb cc xx yy zz
=>ww D D D dd D D D
- (not the minimial number of moves, which would be
cc F bb F aa F
)
- (not the minimial number of moves, which would be
Permutations of 4 items aa bb cc dd
with sort paths of length >1:
- IN => OUT
4 aa cc dd bb
=>bb F D
4 aa dd cc bb
=>aa L R
4 bb aa dd cc
=>aa F cc U
4 bb dd aa cc
=>aa F cc U
4 bb dd cc aa
=>bb D D R
4 cc aa bb dd
=>cc D D
4 cc aa dd bb
=>bb F aa F
4 cc bb aa dd
=>dd F R
4 cc bb dd aa
=>dd F R
4 cc dd aa bb
=>bb F aa F
4 cc dd bb aa
=>cc D R
4 dd aa cc bb
=>aa L R
4 dd bb aa cc
=>cc F D R
4 dd bb cc aa
=>bb D R
4 dd cc aa bb
=>aa D R
Variations on a theme, 4 items aaaaa bbbb ccc dd
where string length makes a difference:
- IN => OUT
4 ccc dd aaaaa bbbb
=>ccc L dd L
4 bbbb aaaaa dd ccc
=>bbbb D dd D
4 bbbb dd aaaaa ccc
=>dd L bbbb D
4 ccc aaaaa dd bbbb
=>ccc L dd L
4 ccc dd bbbb aaaaa
=>dd F R
4 dd bbbb ccc aaaaa
=>ccc R D
4 dd ccc aaaaa bbbb
=>bbbb R D