Horizontal and Vertical Rules
The first difference is not a constant, therefore we do not have a linear sequence. The fact that the second difference is 2, suggests that the rule must contain n².
Rule: n(n-3)
I predict that in grid size 7x7, the horizontal and vertical number of winning lines will be 28.
In order to check my prediction we can draw the grid and insert the winning lines:
Number of winning lines = 28
Rule is correct.
Justifying the Rule.
Each winning line has 1 starting square followed by 3 other squares (thus 4). If you take n (the grid size) and subtract 3 this gives you the number of winning lines for one row. If we then multiply this number by n, this gives you the total number of winning horizontal or vertical lines.
Diagonal Rule
If we refer back to our winning lines table, we once again find that the first difference is not a constant. I also know that whatever rule I find will be multiplied by 2 to account for both diagonal directions.
Rule: 2(n-3)²
I predict that in grid size 7x7 the number of diagonal winning lines will be 32.
In order to check my prediction I will have to draw out the 7x7 grid.
The number of winning lines shown opposite is 16, however when multiplied by 2 (thus accounting for the fact that diagonal lines can go both ways) we reach the predicted answer of 32. So, rule is correct.
Justifying the Rule
2(n-3)²
No winning lines can be put in these shaded areas for the simple fact that it is 3 squares wide and a line lasting 4 squares cannot fit in there. So, if you multiply n-3 by n-3 you get the number of winning line starting squares, therefore the number of winning lines.
Rectangular Grids
I am now going to extend my investigation by exploring the possibilities of rectangles.
I have put my results in a table to enable me to spot patterns.
n = horizontal grid size m = vertical grid size
I kept 1 of the variables (n) the same. This is so I can work systematically and spot the patterns that occur.
Horizontal Rule
The rule for horizontal winning lines in square grids is n(n-3). As already explained this is because there is the same number of winning lines in each row (n-3), and it is multiplied by n as that is the number of rows there are. So, it is only logical that in rectangles there will still be the same number of winning lines in every row, (n-3), and still be multiplied by the number of rows there are, this time m.
Rule: m(n-3)
I predict that in grid size 5x9 the number of horizontal winning lines will be 18.
I will now check this prediction.
Number of winning lines = 18
Rule is correct
Vertical Rule
As the rule for vertical was the same as horizontal in square grids I believe that the rule will be similar in rectangular grids. As it is vertical, n will now be the number of rows and (m-3) will equal the number of winning lines in a column.
Rule: n(m-3)
I predict that in a 5x9 grid the number of winning lines will be 30
Number of vertical winning lines = 30
Rule correct
Justifying Horizontal and Vertical Rules
As already explained for each winning line there is one starting square followed by 3 squares. As there is the same number of winning lines per row multiplying by the number of rows, m, gives you the total horizontal winning lines. It is the same for vertical winning lines, only in that case the number of winning lines per column is m-3, and you multiply it by the number of columns there are, n.
Diagonal Rule
As the rules for horizontal and vertical winning lines in rectangular grids worked on the same basis as horizontal and vertical winning lines in square grids, I’m going to assume that the diagonal rule for rectangular grids will work in the same way as the diagonal rule for square grids. So, the rule should be, (m-3)(n-3), multiplied by 2 to account for both diagonal directions.
I predict that in a 5x9 grid the number of diagonal inning lines will be 24 altogether.
I will now check this by drawing out the 5x9 grid.
Number of winning lines shown is 12, but when multiplied by 2 it equals the predicted 24 winning lines.
Justifying Diagonal Rule
2(m-3)(n-3)
As with square grids the connect 4 winning lines cannot fit into the first 3 squares. So, if you multiply m-3 by n-3 you get the number of winning lines. You must also multiply by 2 to account for the fact that diagonal lines can go from right to left and from left to right.
Connect Any
I am now going to investigate what these rules would be if they were connect any, not just connect 4.
I predict that in the place of the ‘-3’, in all of the rules, there will be c(connect number) -1. This is because each winning line is composed of one starting square followed on by the number of squares remaining in the connect number.
So, the rules for connect any in rectangles would be:
Horizontal winning lines : m(n-(c-1))
Vertical winning lines : n(m-(c-1))
Diagonal winning lines : 2(m-(c-1))(n-(c-1))
The rule for total winning lines, connect any in a rectangle would be:
(m-(c-1))n + (n-(c-1))m + 2(n-(c-1))(m-(c-1))
I will now check the total rule.
I predict that for connect 3, in a 4x3 grid, the number of winning lines would be 14 altogether.
I will now draw out the grids to check my prediction.
There are 14 winning lines altogether, therefore my rules are correct.
Justifying ‘c-1’
As already explained each winning line has one starting square, so you subtract this to get the number of squares which need to be taken away in the rules. To get the total rule I added all of the other rules together.