All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Snails journey (Posted on 2020-12-12) Difficulty: 3 of 5
Suppose a grid with 2m rows and 2n columns is given, where m and n are positive integers. You may place one pawn on any square of this grid, except the bottom left one or the top right one. After placing the pawn, a snail wants to undertake a journey on the grid. Starting from the bottom left square, it wants to visit every square exactly once, except the one with the pawn on it, which the snail wants to avoid. Moreover, it wants to finish in the top right square. It can only move horizontally or vertically on the grid.

On which squares can you put the pawn for the snail to be able to finish its journey?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution Comment 3 of 3 |
As previous comments have said, assuming the start and end are black squares the pawn needs to be on a white square.  Now we need to show that any white square can be chosen and still work.

Divide the grid into n column bricks, 2 wide by 2m tall.  The pawn will be in one of these bricks.
For any brick to the left of the pawn's brick that portion of the path starts in the lower left corner going all the way up, then step once to the right and go all the way back down, and end on the lower right corner.
For the brick the pawn is in then that portion of the path starts in the lower right corner and goes in a sort of zigzag: one step left, one step, up, one step right, one step up, etc.  The only deviation occurs where the pawn is, then there will be two steps going up in a row, passing the pawn.
Finally for any brick to the right of the pawn we do the same thing as the bricks on the left, just vertically flipped.

An example:
+--+--+--+--+--+--+
|    |      |  |
+ + + +--+ + +
|  |  |    |  |  |
+ + +--+ + + +
|  |  |    |  |  |
+ + + +--+ + +
|  |  |    |  |  |
+ + +--+ + + +
|  |  |Pn|  |  |  |
+ + +--+ + + +
|  |      |    |
+--+--+--+--+--+--+

  Posted by Brian Smith on 2025-03-15 13:32:53
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (2)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information