13

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?

enter image description here

Dmitry Kamenetsky
  • 35,897
  • 5
  • 66
  • 276
  • 1
    This seems like a simpler version of https://puzzling.stackexchange.com/questions/55853/a-special-parking-lot – Steve Mar 19 '21 at 08:28

2 Answers2

11

I think this arrangement would work (red cells are those occupied by cars)

enter image description here

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

enter image description here
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)

enter image description here
This brings us to 12 overall (there may be more).

hexomino
  • 135,910
  • 10
  • 384
  • 563
  • You got it! Can you find other arrangements with 9 cars? – Dmitry Kamenetsky Mar 18 '21 at 11:40
  • 1
    There is also a diagonally symmetric answer. – loopy walt Mar 18 '21 at 11:52
  • Oh I didn't know about the last solution. Good find! – Dmitry Kamenetsky Mar 18 '21 at 12:06
  • 1
    @loopywalt Thanks, I think I've found that now. – hexomino Mar 18 '21 at 12:06
  • 3
    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? – Dmitry Kamenetsky Mar 18 '21 at 12:10
  • 1
    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). – Egor Hans Mar 19 '21 at 07:35
  • The last solution is what came up first to my mind. Nice one. – justhalf Mar 19 '21 at 08:28
  • 1
    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: https://puzzling.stackexchange.com/questions/55853/a-special-parking-lot/55861#55861 – Steve Mar 19 '21 at 08:41
  • Steve thanks for the link! It looks like the same problem – Dmitry Kamenetsky Mar 19 '21 at 12:51
0

Here is yet another configuration:

enter image description here

CiaPan
  • 1,740
  • 1
  • 10
  • 11