Monday, December 30, 2019

mazes - Haisu: Pixel Perfect


HAISU is a portmanteau of three Japanese words - 'hairu', to enter, 'su', number, and 'hausu', an English borrow word meaning house, of course.
Together, we get a meaning of 'enter number house', which I have roughly translated to English as 'Room Count'.


The rules are simple - draw a path from the O to the X, passing through every cell in the grid exactly once. The grid is divided into several rooms. When your path passes over a cell with the big number N, it must be the Nth time you have entered the room. If a room has a small number m in the top left corner, you must enter that room a total of m times. An example Haisu puzzle and its unique solution are shown below.



enter image description here


enter image description here


Hopefully this example puzzle clarifies the rules.


My previous Haisus have been over-complicated and/or difficult, so here is a puzzle which is MUCH more moderate in difficulty!


enter image description here



Answer



Here is the unique solution:



enter image description here




and here's one way to get there, all steps being forced so that the outcome is known to be unique. Let's begin with the 3-visit region near the top left. There's only one way to arrange that.



enter image description here



And now the regions to its left are straightforward.



enter image description here



Let's add the obvious things in the corners, which we should really have done first on autopilot.




enter image description here



Now we can fill in the centre-left region:



enter image description here



The path can't cross the north and west boundaries of the central region for fear of giving too many visits to the L-shape above it.



enter image description here




Thinking about that region at top centre, we have to do this for fear of too many visits to adjacent regions:



enter image description here



Count entrances and exits for the 2-visit L-shape near the middle:



enter image description here



If we join the upper two bits of path in that region near the bottom left, they'll end up being part of a loop that doesn't visit every square. So don't do that:




enter image description here



We can't enter the single-visit region near top right from the left, because that would make the top-right region impossible, so:



enter image description here



There's very little flexibility at top right and we fairly quickly find we have to do this:



enter image description here




Counting entrances and exits of the bottom area, we must have this:



enter image description here



leading quickly here:



enter image description here



There's only one way to handle the cell to the right of the start, and then we can count entrances and exits of the 3-visit L-shaped region:




enter image description here



Now there's only one way to fill in that narrow corridor:



enter image description here



and all that remains is the earliest portion of the path:



enter image description here




No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...