Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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

Posted on 2013-01-07
Last Modified: 2013-01-08
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!
Question by:arthurh88
  • 3
  • 3
LVL 84

Expert Comment

ID: 38753739
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.

Author Comment

ID: 38753820
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
LVL 84

Expert Comment

ID: 38753854
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.


Author Comment

ID: 38753861
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?
LVL 84

Accepted Solution

ozo earned 500 total points
ID: 38754252

Author Comment

ID: 38755680
wow thanks.  i searched wikipedia for "sliding block puzzle" but didn't know what it was really called.

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IT certifications are a concrete representation of continual learning on the part of the candidate.  Continual learning is necessary for the long term success of an IT professional, but are IT certifications the right path for you?
This article describes how to reset your Windows 10 password when you've forgotten it.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question