Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2100
  • Last Modified:

solve this 3 x 2 sliding block puzzle in fewest moves.

Given the following sliding blocks:  (b = a blank space to move blocks)

1   B
5   4
3   6


Re-arrange the 5 and the 3 in the fewest moves.  so that it looks like this:

1   B
3   4
5   6


Post the solution as 1R, 5U  (i.e. move the 1 block right.  Move the 5 block Up, etc.)
Would love someone to explain to me the logic in solving this.  I'm stuck!
0
arthurh88
Asked:
arthurh88
  • 3
  • 3
1 Solution
 
ozoCommented:
Not possible.
The requested re-arrangement requires an odd number of swaps,
But getting B back to its starting position requires an even number of swaps.
0
 
arthurh88Author Commented:
is it possible then to get
B   1
3    4
5    6

?


The key for me is the 3, 4, 5, 6 in the right positions
0
 
ozoCommented:
No.
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
arthurh88Author Commented:
ok can you please help me understand why?   how do you know the even/odd thing?   is there an explanation that might make sense to a laymen?
0
 
arthurh88Author Commented:
wow thanks.  i searched wikipedia for "sliding block puzzle" but didn't know what it was really called.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now