Let's assume I have a grid with x by x elements inside which x is an odd number, if I mark any ONE of these 8 cells as impassable [(1,0),(0,1),(x-2,0),(x-1,1),(0,x-2),(1,x-1),(x-2,x-1),(x-1,x-2)], I can't pass through all the remaining cells only one times using only one path no matter I start from which points other than impassable cells. Is that any mathematical explanation for this circumstances? Thank you.
- one path only
- one cell can only passed one time
- only 4 direction of movement is allowed: Up Down Left Right
- no diagonal movement allowed
0 as normal cells, 1 as impassable cells
Grid (5x5):
[0 1 0 1 0]
[1 0 0 0 1]
[0 0 0 0 0]
[1 0 0 0 1]
[0 1 0 1 0]
Colour the squares like a chessboard. For the 5x5, after you have deleted one of those 8, you have 13 white and 11 black squares left. Any path has to alternate between black and white so it can't happen.