Moving day

Moving day

Here you can see a couple just after moving their cozy new 6 rooms.

They have five large furniture, the bed, a table, the sofa, the fridge and a desk, which are so big that there are no two in the same room. They also have a problem and that is that the moving operators have left them The bed and fridge in wrong rooms, And our partner has been trying to exchange them for hours.

The husband, who is ours and likes riding move.

Just tell you that The whiskey bottle represents the bed and the brush the fridge And that you have to transpose the position of these two furniture by moving only a furniture every time in a sequence of movements in which the iron, the mice trap and the pepper can be moved to our benefit, but they must end up occupying their current position.

There are a thousand and one ways to solve this problem, but as Franklin said "Three removals can be as devastating as a fire" and we must carry out the exchange With the minimum possible displacement.
There will never be more than a vacant room to move a furniture.

Solution

The bottle and brush can be transposed into seventeen movements as follows:
(Only the object to be moved in each movement is indicated assuming that it must be placed in the empty room)

1. Bottle
2. Brush
3. Iron
4. Bottle
5. Pepper pot
6. Trap for rats
7. Bottle
8. Iron
9. Brush
10. Pepper pot
eleven. Iron
12. Bottle
13. Trap for rats
14. Iron
fifteen. Pepper pot
16. Brush
17. Bottle