A carpark is arranged in a 4x4 grid and has a single entry/exit as shown in the diagram. A car has the size of a single cell of the grid. Cars can move through adjacent empty cells of the carpark either horizontally or vertically, but not diagonally. Cars cannot move outside the car park, except at the entry/exit cell. Can you place 9 cars in this carpark such that every car has a path to the exit?
2 Answers
I think this arrangement would work (red cells are those occupied by cars)
Other possible solutions
In the solution given, in the bottom left-hand corner I can move either car adjacent to the corner cell into the corner and still produce a valid solution. Also, I can reflect the whole diagram horizontally in all three cases and still produce a valid solution or I can rotate each solution anti-clockwise through a right angle and produce a valid solution.
And here is another way
and we can also rotate this solution clockwise through a right angle to generate another solution.
Furthermore, we can slightly edit that solution to generate another (which is diagonally symmetric as suggested by loopy walt in the comments)
-
1$\begingroup$ There is also a diagonally symmetric answer. $\endgroup$ Commented Mar 18, 2021 at 11:52
-
1$\begingroup$ @loopywalt Thanks, I think I've found that now. $\endgroup$– hexominoCommented Mar 18, 2021 at 12:06
-
3$\begingroup$ What I love about the very last solution is it has 2 unreachable cells in the corners. This means we are getting 9 car spots from just 14 cells. Perhaps useful for real life carparks? $\endgroup$ Commented Mar 18, 2021 at 12:10
-
1$\begingroup$ In the bottom 2 solutions, it's once again possible to rot13(zbir rvgure pne nqwnprag gb gur yrsg rzcgl pbeare vagb gur pbeare) and produce a total of 6 more valid solutions (rot13(qhr gb gur ebgngvba bcgvba)). Similar situation with the rot13(bgure rzcgl pbeare) of the bottom one, although that only gives 1 extra solution because rot13(zbivat gur yrsg pne vf vqragvpny gb gur ebgngvba bs gur frpbaq-gb-ynfg bar). $\endgroup$ Commented Mar 19, 2021 at 7:35
-
1$\begingroup$ I would note that all of the solutions in this answer can be generated by the simple "parking algorithm" in the first paragraph of my answer to a similar question: puzzling.stackexchange.com/questions/55853/… $\endgroup$– SteveCommented Mar 19, 2021 at 8:41
-
6$\begingroup$ I think hexomino covered that one in his second paragraph. $\endgroup$ Commented Mar 18, 2021 at 12:31
-
$\begingroup$ @DmitryKamenetsky Nope. Not exactly this one. $\endgroup$– CiaPanCommented Mar 18, 2021 at 16:54
-
2$\begingroup$ Yes, exactly this one: Move C1R3 to C1R4 (as stated in the first sentence), then reflect horizontally (as stated in the second sentence) to produce this solution. $\endgroup$ Commented Mar 18, 2021 at 20:38
-
$\begingroup$ To be fair, it's easy to overlook individual possibilities that result from the description, especially by missing the fact the alternations can be stacked. $\endgroup$ Commented Mar 19, 2021 at 7:27