# A "Find the Path" Puzzle

I invented a puzzle, inspired by Simon Tatham's Portable Puzzle Collection. Is there anything that it could improve on? Was it too easy, or was it too hard? Anything I could add? What must I call it?

Is this the right site to post this? Perhaps Meta is better.

# Puzzle:

You have the following grid: $$\begin{array}{|r|c|} \hline \rm A &\rm B &\rm C \\ \hline \rm D &\rm E &\rm F\\ \hline \rm G &\rm H &\rm I\\ \hline \end{array}$$ The letters represent numbers ranging from $$1$$ to $$4$$ inclusive. They cannot all be the same number, but all the numbers from $$1$$ to $$4$$ don't have to be in the grid either... but there's a catch.

You have to draw a path from the left bottom corner of the grid to the top right corner, following the edges of the squares. That includes outer edges as well. The path cannot cross an edge more than once, but it can meet an intersection more than once (intersections are corners/vertices with four edges that join to it). The numbers in each square in the grid show how many edges of that square must be crossed with the path. Here is an example:

Example:

Find the path. $$\begin{array}{|r|c|} \hline \rm 1 &\rm 3 &\rm 2 \\ \hline \rm 1 &\rm 2 &\rm 3\\ \hline \rm 2 &\rm 1 &\rm 1\\ \hline \end{array}$$ SOLUTION:

$$\qquad\qquad\qquad\qquad\qquad\qquad\;\;\;\,\,\;$$

There might be more than one solution, but I hope this puzzle is fun. Try it with the following one. Remember, you can't cross an edge more than once, but you can meet an intersection more than once.

Challenge:

Find the path. $$\begin{array}{|r|c|} \hline \rm 4 &\rm 3 &\rm 3 \\ \hline \rm 3 &\rm 4 &\rm 4\\ \hline \rm 3 &\rm 4 &\rm 2\\ \hline \end{array}$$

Edit:

Made a harder one.

Find the path. $$\begin{array}{|r|c|} \hline \rm 2 &\rm 3 &\rm 3 &\rm 3 &\rm 2\\ \hline \rm 2 &\rm 4 &\rm 3 &\rm 2 &\rm 3\\ \hline \rm 2 &\rm 1 &\rm 2 &\rm 3 &\rm 2\\ \hline \rm 3 &\rm 3 &\rm 3 &\rm 3 &\rm 1 \\ \hline \rm 3 &\rm 3 &\rm 1 &\rm 2 &\rm 3 \\ \hline\end{array}$$

Okay, apparently this was impossible, as declared by comments below, with a formal proof given by @JonMarkPerry. I must admit, my ones do look like twos (with the only thing differing them being their curvature, so my messy handwriting does not do to well). I believe in the first column, all the ones are supposed to be twos. I have fixed that now, and have tried it three times.

• It's generally best to post follow-up puzzles as new questions. Also, I'm not sure the follow-up is actually possible (specifically looking at the 4 and the 1 in the corner).
– user27014
Sep 26, 2018 at 13:25
• @Mnemonic okay, I will do that. Also, it is possible; I just did it... oh wait, I accidentally wrote $1$ instead of $2$ (because in my hand-writing, they look the same). My bad! I'll just do what you said anyway :P Sep 26, 2018 at 13:30
• @Mnemonic Actually nevermind. Too late, now, I suppose. I will do that in future. Thanks for telling me :) Sep 26, 2018 at 13:43
• How can you hit the upper left 2 twice without hitting the 1 more than the time next to the 4? Only ways I can see that you could do that would be if you ended there or if you didn't follow the outer edges Sep 26, 2018 at 14:27
• @gabbo1092 My bad. Thanks for notifying me of that error. I've changed that $1$ to a $2$, so it should be fine, now. Next time, my ones are just gonna be straight lines :\ Sep 26, 2018 at 14:44

## 4 Answers

Your 5x5 has a solution now. See below:

It took about 2-3 minutes with pen and paper (about half that time copying it onto an envelope), so at that size I think it is a little too trivial to provide much interest. But a slightly bigger puzzle - maybe 8x8 - might be interesting enough to solve.

• Awesome! You got it! :D Sep 27, 2018 at 3:17
• Another option that might be worth looking at would be to add a starting point and a finishing point - rather than having to go from bottom left to top right (would require experimentation to determine if that was an improvement), Sep 27, 2018 at 4:06
• I was thinking doing that. Perhaps having a starting point at the centre would be nice :) Sep 27, 2018 at 4:58
• @user477343 Methinks Penguino's answer deserves a tick Jan 11, 2019 at 11:13
• @ThomasBlue yes it does, thanks for reminding me. I have not been on Puzzling.SE in a couple months ;) Jan 11, 2019 at 11:35

Fairly easy puzzle. I'd think of it as a slight generalization of Slitherlink (or Loopy, as Simon Tatham calls it). It would probably be more interesting if it were a bigger grid, but I get the sense that there would always be multiple solutions if it was scaled up. Maybe it could be improved with some additional constraints (like how many times the path bends, or some given segments) to limit the possibilities.

• Okay, thanks for that (and you also found the solution). I will definitely take your thoughts into consideration. And yes, this was particularly inspired by Loopy (one of my favourites, actually). I wanted to start off a little easy, give about $10$ minutes max for completion. I will make the grids bigger as well, maybe make the grids out of pentagons and hexagons perhaps, if I can. I will try and give some constraints as you mentioned, like how it cannot use any edges of a particular square perhaps. Once again, thank you for your suggestion :P Sep 26, 2018 at 5:05

I think your $$5\times5$$ is:

impossible

Here is my proof:

The $$4\mid1$$ line is fixed, so the $$3$$ at $$S(1,1)$$ can be defined. The bottom left origin cannot have two lines coming from $$P(0,0)$$, so must be as given. But now the line from $$P(1,1)$$ to $$P(1,2)$$ has nowhere to go.
(Coordinates are Square(x,y) and Point(x,y))

• Okay... if we made the $1$ a $2$ above the $3$ in the first column... it would be possible. All my ones in the first column are twos, I guess. I mistook them all for ones. I apologise! $(+1)$ for the proof though :P Sep 27, 2018 at 0:59

In user477343's example, there is an alternative solution:

For the 3x3 case, there are 360 sets of edges which are valid paths across the grid. This assumes that it is possible to have the number zero in a square. 320 of these sets are unique.

The other 40 sets of edges form a series of 19 'groups', where all members have the same numbers. There are between 2 and 4 members of a group. For example:

If you enlarge to 4x4, then there are 38024 sets of edges, with 37428 being unique. The other 596 are in 294 'groups', where the largest group has 4 members:

A 5x5 grid has over a million solutions: I have not yet evaluated this.

• Regarding the first part of your answer, that is not actually an alternative solution; you have just flipped the grid across the $y$-axis and rotated the result $90^\circ$ clockwise. It also seems like in the other solution examples you provided, you have done the same; though nice info, by the way! :P Sep 26, 2018 at 14:49
• Good point! I never thought about that, the 3x3 "alternative" examples are isomorphic when rotation or reflection are considered. It does depend on your definition of "alternative". If you look at the 4x4 "alternatives" they are actually two pairs. The first and last can be obtained by reflection about a diagonal axis; the middle two are different paths entirely but are both related to each other by the same diagonal reflection. Sep 26, 2018 at 15:00