• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2220
  • 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
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

 
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

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

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