# Placing 9 cars into a 4x4 carpark

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?

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)

This brings us to 12 overall (there may be more).

• There is also a diagonally symmetric answer. Commented Mar 18, 2021 at 11:52
• @loopywalt Thanks, I think I've found that now. Commented Mar 18, 2021 at 12:06
• 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? Commented Mar 18, 2021 at 12:10
• 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). Commented Mar 19, 2021 at 7:35
• 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/… Commented Mar 19, 2021 at 8:41

Here is yet another configuration:

• I think hexomino covered that one in his second paragraph. Commented Mar 18, 2021 at 12:31
• @DmitryKamenetsky Nope. Not exactly this one. Commented Mar 18, 2021 at 16:54
• 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. Commented Mar 18, 2021 at 20:38
• 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. Commented Mar 19, 2021 at 7:27