Thursday, 30 May 2013

word - Rolling Dice puzzle


The answer is a six-letter word.




The puzzle




Here's an attempt at a text version, but you're really better off looking at the picture.


Rolling Dice



To get a full tour, you must be a man of many faces and blend into all the right spots.


     |
v
O6TAL2
RA2U1Y
DI■ROT
LLHTP3
6FE3PR
MISMO6
^

|

Answer



I'll use a different spoiler for each level of solving the puzzle, such that you can read only as far as you want to be spoiled, if you want to only look at the first few steps for hints. Note that there is some Mathematica code further down, which is not inside a spoiler tag.




The "full tour" indicates that we need to traverse every cell of the grid. It's likely that we need to traverse each cell exactly once, hence asking for a Hamiltonian path. The arrows indicate the start and end of the path.
The "man of many faces" probably just indicates that faces of a (six-sided) die play a role.
"Blend into all the right spots" means that we somehow need to match up the faces with the grid cells.






The puzzle asks us to place a six-sided die on the bottom left cell, and roll it around the grid, such that we visit each cell exactly once. Furthermore, whenever the die is on top of a number, the top face has to show that same number.





To simplify the search for the path, I started at the end, because there are only 4 possible die orientations with a 2 on top.



These constraints result in a unique tour, which I found using the following Mathematica code:


board = Characters /@ StringSplit@"XXXXXXXX
XO6TALXX

XRA2U1YX
XDIXROTX
XLLHTP3X
X6FE3PRX
XMISMO6X
XXXXXXXX";

moves = {
(*up*)
{c = #1 + {-1, 0}, Extract[board, c], <|u -> #3[s], n -> #3[u], w -> #3[w],

s -> #3[d], e -> #3[e], d -> #3[n]|>} &,
(*left*)
{c = #1 + {0, -1}, Extract[board, c], <|u -> #3[e], n -> #3[n], w -> #3[u],
s -> #3[s], e -> #3[d], d -> #3[w]|>} &,
(*down*)
{c = #1 + {1, 0}, Extract[board, c], <|u -> #3[n], n -> #3[d], w -> #3[w],
s -> #3[u], e -> #3[e], d -> #3[s]|>} &,
(*right*)
{c = #1 + {0, 1}, Extract[board, c], <|u -> #3[w], n -> #3[n], w -> #3[d],
s -> #3[s], e -> #3[u], d -> #3[e]|>} &

};
f[path_] := Module[{i, next},
If[Length@path == 35, Print@Reverse@path;
Print@TableForm@Reverse@path; Return[]];
For[i = 1, i <= 4, ++i,
next = moves[[i]] @@ path[[-1]];
If[! (next[[2]] == "X"
|| next[[1]] == {7, 2} && Length@path < 34
|| DigitQ@next[[2]] && next[[2]] != next[[3]][u]),
(board[[##]] = "X") & @@ next[[1]];

f[Append[path, next]];
(board[[##]] = next[[2]]) & @@ next[[1]];
]
];
]
f[{{{2, 7}, "2", <|u -> "2", n -> "3", w -> "1", s -> "4", e -> "6", d -> "5"|>}}];
f[{{{2, 7}, "2", <|u -> "2", n -> "6", w -> "3", s -> "1", e -> "4", d -> "5"|>}}];
f[{{{2, 7}, "2", <|u -> "2", n -> "4", w -> "6", s -> "3", e -> "1", d -> "5"|>}}];
f[{{{2, 7}, "2", <|u -> "2", n -> "1", w -> "4", s -> "6", e -> "3", d -> "5"|>}}];



The only solution is the following: start in the bottom left corner, with 4 facing up and 6 facing south. Then this is the path (red numbers indicate number facing up):

enter image description here





If we now pick out the letters in that path where each number is on the top face (see red letters in the image), we get 6 words. In order from 1 to 6 they are SLUMP, DROOP, OR, MILITARY, FELT, HAT.





"to slump" and "to droop" are synonyms for "to slouch", but "a slouch" can also be a military felt hat. Hence the solution is slouch.




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...