Sunday 28 April 2013

mechanical puzzles - Barrel - Part 2


An entry in Fortnightly Topic Challenge #35: Restricted Title 1. Title based on this xkcd.
This is a continuation of Barrel - Part 1, but this puzzle is still self-contained.
Continued in Barrel - Part 3, Barrel - Part 4, and Barrel - Part 5.





Oh no Carol, there'll be barrel peril! This time, it's a $6\times 6$ warehouse, and you need to get a "special" red barrel out of the warehouse through the only exit. (it's "special" because it's actually dynamite, hence the peril. You don't want your warehouse to blow up.) You must do this without letting any other barrels out of the warehouse. To review, a barrel takes up one cell when upright, and two cells when laid down. Maneuvering the barrels works as follows:



  • An upright barrel can be tipped over to lie flat.

  • A laid down barrel can either roll to its sides or be propped up.


Specifically, consider the following image.


enter image description here


The solid barrels in this example can move to any of their adjacent outlines, assuming those spaces are unoccupied by other barrels. A barrel cannot move past the wall, either.


Here is a diagram of the warehouse, with the exit shown by the missing wall in the top right. Please show how to get the red barrel (dynamite) out of the warehouse. You are not explicitly required to do this in the minimum number of moves, but it's quicker to present the answer if there are fewer moves, no? Please feel free to combine several moves into a single image with arrows and/or text explanation in order to shorten the answer.


enter image description here




Answer



Here's my attempt (maybe I'll get graphical when I have the time, text only for now.)


First, label the non-dynamite barrels like this:


enter image description here


and develop a notation: - means move the named barrel to the mentioned direction, by whichever means it can move there. (It will always be unique.)


Then, make the following moves:



1: D-up
2: E-up
3: K-up

4: L-up
5: J-right
6: N-up
7: N-up
8: Dynamite-up
9: Dynamite-up
10: J-left
11: K-down
12: L-Down
13: Dynamite-right

14: Dynamite-up
15: I-left
16: I-left
17: F-down
18: Dynamite-right
19: L-up
20: L-left
21: F-left
22: M-left
23: G-down

24: H-down
25: H-down
26: C-down
27: C-down
28: Dynamite-right
29: Dynamite-up
30: Dynamite-right

Not at all guaranteed to be the shortest way, and only mentally checked to work (please do double-check), but the Dynamite barrel never made any useless moves, and the other moves seemed pretty efficient too, so if there's a faster solution, it's not going to be very much faster.


EDIT: Chowzen created this brilliant animation:




enter image description here



Do check his comments below for more insanely helpful links :-)


EDIT 2: after staring at the animation for a while, this saves a move:


Omit move 16 entirely. Then, replace moves 19-21 with:



19: O-left
20: P-left
21: F-down


EDIT 3: looking for a shorter solution, I found a couple more 29s, and then this one with 26 moves:



1. D-up 11. K-down 21. Dynamite-right
2. E-up 12. L-down 22. Dynamite-right
3. K-up 13. I-left 23. Dynamite-right
4. L-up 14. I-up 24. Dynamite-up
5. J-right 15. M-left 25. Dynamite-up
6. N-up 16. G-down 26. Dynamite-right
7. N-up 17. H-down

8. Dynamite-up 18. H-down
9. Dynamite-up 19. C-down
10. J-left 20. C-down

No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...