# Investigate how to calculate the total number of Winning Line

Extracts from this document...

Introduction

GCSE Mathematics Coursework:

Connect 4:

Investigate how to calculate the total number of Winning Lines

## Task

In my investigation I am going to look at change in grid size and winning line length. From this I am aiming to be able to predict the number of winning lines in any size square grid with any winning line length

I am planning to do this through modelling situations and finding links in my results when in a results table so I can calculate working algebraic formulae. I will achieve this by first devising a rule to calculate the total number of horizontal winning lines, vertical winning lines and diagonal winning lines in a square grid.

In my investigation I am making the following assumptions;

- The grid is a square
- Winning line length is known
- Grid size is known
- The Winning line length is equal or less than the Grid side length, because if not the total number of winning lines is zero.
- 1 is not a valid line length because it is only one point of the grid.
- The grid below is a 4x4 grid.

. . . .

. . . .

. . . .

. . . .

I will investigate the following:

- Number of horizontal winning lines in any size square grid with any winning line length.
- Number of vertical winning lines in any size square grid with any winning line length.
- Number of diagonal winning lines in any size square grid with any winning line length.

I will use these formulae to achieve my final target of a formula to calculate:

- Total number of winning lines in any size square grid with any winning line length.

Investigation

In my algebraic formulae, I will be using the following key:

- T = Total number of winning lines
- S = Length of side of grid
- L = Length of winning line
- V = Total number of vertical winning lines
- H = Total number of horizontal winning lines
- D = Total number of diagonal winning lines
- K = Number of tokens within the grid

Middle

10

16

5x5

5

5

5

2

12

25

6x6

6

6

6

2

14

36

From this simple case I found many formulae based upon 2n +2. I found 16 possible formulae. This is because I found the number of verticals and horizontals is equal to the grid side length and the winning line length so any of these can represent n. Where the winning line length is equal to the grid side length there are always onlytwo diagonal winning lines.

## Results table 2: S-1 = L

## This results table shows the winning lines when the length of the winning line is equal to the length of the side of the grid minus 1.

Grid size | Winning Line | Vertical | Horizontal | Diagonal | Total | No. Tokens |

3x3 | 2 | 6 | 6 | 8 | 20 | 9 |

4x4 | 3 | 8 | 8 | 8 | 24 | 16 |

5x5 | 4 | 10 | 10 | 8 | 28 | 25 |

6x6 | 5 | 12 | 12 | 8 | 32 | 36 |

## The number of vertical and horizontal winnings lines is now always double the length of the side of the grid. This is because when the winning line length is 1 shorter than the grid side it creates two winning lines on each row/ column of the grid.

Conclusion

( ( S + ( ( S – L ) + 1 )2 + ( ( S – L ) + 1 )2

Therefore to calculate the total number of winning lines the number of tokens must be subtracted.

### –K

The formula to calculate the value of the number of tokens is:

K = S2

## Conclusion

### In my investigation I have found formulae to calculate the number of horizontal, vertical and diagonal winning lines. From these I calculated the formula for the total number of winning lines. This shows that I fully completed the task set for myself. Trial and improvement and logic methods helped me find and define formulae. I believe my results are good, as I have proven them to work for any size square grid with any length winning line and I have been able to explain my formulae.

Evaluation

In evaluation my investigation was good. I had accurate results and I proved so through modelling. The worst thing about the investigation is that the formulae are complex and hard to explain in simple terms. I could improve this by using my current formula to derive other simpler and more efficient formulae. This could be a useful extension to my investigation. I could also repeat the investigation for different shapes, for example rectangles or in 3D and investigate cubes and cuboids.

This student written piece of work is one of many that can be found in our GCSE T-Total section.

## Found what you're looking for?

- Start learning 29% faster today
- 150,000+ documents available
- Just £6.99 a month