A chemical gas release

You are analyzing a chemical codenamed H2SO4. You are finishing up the research and, suddenly outside the door, a meteorite hits the containment chamber of H2SO4 and releases it into every room except for the entrance. The power is knocked out but there are spare batteries. They can't last forever, so you have to clean up all of the H2SO4.

Without power, the vents in the building will open and release H2SO4. It is very toxic and will kill everyone on Earth in 15 minutes. Luckily, there is a self-destruct button in each room. Since the system is on lockdown mode, when you exit a contaminated room, it will destroy itself. The building is a square grid as in the diagram.

Every square is a room. You have to enter at the top left corner and exit at the bottom right corner where there is a scrubber to remove the H2SO4. You entered and destroyed all the rooms and survived.

What size is the building in terms of rooms?

3 x 3 4 x 4 5 x 5 6 x 6 7 x 7 8 x 8 9 x 9 All of the above answers are possible

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Alex Wang
Aug 2, 2017

There is something related to this problem called the hamiltonian path problem. A hamiltonian path is a path that touches all points exactly once. A hamiltonian path is possible on all grids of size N but if you have to start and end on opposite corners then it is impossible. You can think of a chessboard. The two corners are opposite corners. This is the case for any grid with a height and width that are even. Any path between two squares without moving diagonally will alternate between black and white like this. BWBWBWBWBW. And since even*even is even if the path starts on white then it has to end on black and same with white. Odd times odd is odd so you can make a hamiltonian path with odd length and width. But, this is not a hamiltonian path since you can go to the entrance twice since it isn't contaminated. (read the rules carefully) Then, it essentially adds one to the number of squares so it is odd. All of the answers are possible.

This is essentially the TedEd virus riddle , but not as clearly defined, or as clearly solved.

Grids with odd dimensions are Hamilton, but the grids with even dimensions utilise the entrance twice.

Jonathan Quarrie - 3 years, 10 months ago

Log in to reply

It is based off it

alex wang - 3 years, 10 months ago

Hm, to me, all that you have shown is "I have not found a contradiction which proves that it is not possible". You have not yet shown that "Such a hamiltonian path exists".


I'm also confused by your solution. To me, the 4 × 4 4\times 4 case is not possible (precisely because of the parity argument that you are bringing up, but you seem to have mixed up the calculations). Can you clarify further?

Calvin Lin Staff - 3 years, 10 months ago

Log in to reply

this path is not a hamiltonian path you can go to the starting square twice for example, in a 2x2 grid starting at the starting square and going to an adjacent square and then going back to the starting square. This effectively adds one to the number of squares and now the path becomes BWB and then you can just do WB to get to the opposite corner

alex wang - 3 years, 10 months ago

Log in to reply

Ah ic. That's what you meant by "read the rules carefully". I feel that by burying the information, it becomes borderline trolling, since it's not immediately clear to your audience what you are asking for.

My first comment still applies. It is not sufficient to claim that there are no roadblocks. We actually how to show that such a path actually exists.

Calvin Lin Staff - 3 years, 10 months ago

Log in to reply

@Calvin Lin

alex wang - 3 years, 10 months ago

Log in to reply

@Alex Wang Right. Can you add that to the solution to make it complete? Thanks.

Calvin Lin Staff - 3 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...