Why can't I reach every cell in a 3x3 square?

Click For Summary
SUMMARY

The discussion focuses on the inability to reach every cell in a 3x3 or 5x5 square grid when starting from certain "problem cells." It is established that even-numbered grids do not have problem cells, while the 3x3 grid has 4 problem cells and the 5x5 grid has 12. The key insight is that problem cells are those where the sum of their row and column indices is odd. The mathematical expression for the number of problem cells in an NxN grid, where N is odd, is given as (N^2 - 1)/2.

PREREQUISITES
  • Understanding of Hamiltonian paths and cycles
  • Familiarity with grid-based problems and matrix notation
  • Basic knowledge of combinatorial mathematics
  • Ability to analyze patterns in numerical sequences
NEXT STEPS
  • Research Hamiltonian path problems in graph theory
  • Explore combinatorial proofs for grid-based problems
  • Study checkerboard coloring techniques in mathematical proofs
  • Investigate the Seven Bridges of Königsberg problem for historical context
USEFUL FOR

Mathematicians, computer scientists, game developers, and educators interested in combinatorial mathematics and grid-based problem-solving.

musicgold
Messages
303
Reaction score
19
Hi,

I was playing this game in which you start from any cells of a 3x3 or 5x5 square and draw a line that loops through every cell in the box. The line can go only through a vertical or horizontal side (not diagonally). When you start from certain cells (problem cells), you can't reach at least one cell. In the attached file, I have shown such paths. The cells that can't be reached are shown with a question mark.

I am trying to find out how to express mathematically a.) why a particular cell can't reach every cell in a box, and 2) how many problem cells will be in a nxn matrix, where n is an odd number.

This is what I have noticed so far:
1. With even numbered squares such as 2x2 and 4x4, have no problem cells.
2. The 3x3 square has 4 problem cells and the 5x5 square has 12 problem cells.
3. Corner cells and the center cell (in the case of 3x3 and 5x5) are never problem cells.
4. The problem situation occurs when the line enters a T junction with empty cells on either sides.


How should I approach this problem?

Thanks.
 

Attachments

Mathematics news on Phys.org
Attached Files

When I click on it. a new page opens up - blank!
 
bigfooted said:
and it is difficult
In this special case: It always works if at least one of the side lengths is even because they have a Hamilton cycle and you can just follow that no matter where you start. Otherwise there are some starting positions that don't work.
 
mathman said:
When I click on it. a new page opens up - blank!

That means it downloads the file in the default download folder of your browser.
 
I have done some more progress on this problem.
5. If I name each cell of the box using the Row x column convention, I can see a pattern. The top left cell is named as (1,1) , the next cell on the right as (1,2) , the first cell in the second row as (2,1) and so on. The cells whose row and column numbers add to an odd number are problem cells.

6. Based on that, I think, in a NxN square, where N is an odd number, there will be
## (N^2 -1 )/2 ##. I am not sure how to prove this though.

 
You are showing particular paths that can not be completed. But it's not clear to me that there are any such problem and starting point where there is no solution even if one is free to pick the right path. Do you have an example like that?

EDIT: I take it back. I do not see any solution to your 3x3 example. I think I have trouble with all of the odd x odd examples.
 
musicgold said:
I have done some more progress on this problem.
5. If I name each cell of the box using the Row x column convention, I can see a pattern. The top left cell is named as (1,1) , the next cell on the right as (1,2) , the first cell in the second row as (2,1) and so on. The cells whose row and column numbers add to an odd number are problem cells.

6. Based on that, I think, in a NxN square, where N is an odd number, there will be
## (N^2 -1 )/2 ##. I am not sure how to prove this though.
Color the field with a checkerboard pattern. Every connection goes from black to white or vice versa. Now consider how many fields of each color there are.
 
  • Like
Likes   Reactions: WWGD and jbriggs444

Similar threads

  • · Replies 68 ·
3
Replies
68
Views
12K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 9 ·
Replies
9
Views
10K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 4 ·
Replies
4
Views
11K