- Level: AS and A Level
- Subject: Maths
- Word count: 2226
Investigate the number of winning lines in the game of connect 4.
Extracts from this document...
Introduction
Investigation
Connect 4
X | ||||
X | ||||
X | ||||
X |
Task
This is a winning line in the game of connect 4 on a 4x5 board. Winning lines can be horizontal, vertical and diagonal. Investigate the number of winning lines in the game of connect 4.
The task is asking me to find out how many winning lines (connects) when you are connecting 4 there are on any size board.
What am I going to do
•I am going to find out how many connect 4 there are in a 4x5 board.
•I will change the size of the box, but keep one value the width constant. And I will find a pattern in the number of connects there are in the different size boxes.
•I will use algebra to find a general formula for a NxWidth (W) box.
•I will then increase the width (constant) by one and work out a formula for that box.
•I will then find a pattern in the formulas for the different size boxes, connecting 4, and I will make a formula for the formula.
•I will then change the number that I will connect. For example 2, 3 or 5.
Connect 4
Firstly I will do a box with the width constant as 5 and I will change the height.
Hx5 Box
Any Number=N
Connects=C
Height= H
Width =W
Hx5 1 2 3 4 5 6
Connects 2 4 6 17 28 39 first layer
11 11 11 second layer
The box height of 1 and 2 do follow the pattern so
they are excluded. The connects go up by 11 each
time. There are only 2 layers so the equation we
use is this equation. C=aH+b (original equation)
Middle
As before the first 2 equations do not follow
the pattern so they are excluded. Also like before
the connects has 2 layers so we use this original
equation.
C=aH+b
We use the same method as before.
9=a3+b (1)
24=a4+b (2)
15=a (2)-(1)
Substitute ‘a’ which is 15 back into (1)
9=15x3+b
9=45+b
b= -36
Substitute‘a’ and ‘b’ back into original equation
C=15H-36 that is the equation for the number
of connects in a Nx6 box. But since the
first 2 heights didn’t follow the
pattern we didn’t use them in the
equation so this equation doesn’t
work for them.
Connect 4
Hx4 Box
Hx4 1 2 3 4 5 6
Connects 1 2 3 10 17 24 first layer
7 7 7 second layer
Like before the first to equations do not follow the
pattern so they are excluded. Also like before the
connects has 2 layers so we use this original
equation.
C=aH+b
We use the same method as before.
3=a3+b (1)
10=a4+b (2)
7=a (2)-(1)
Substitute ‘a’ back into (1)
3=7x3+b
3=21+b
b= -18
Substitute ‘a’ and ‘b’ back into original equation
C=7H-18
that is the equation for the number of connects in a Nx4
box. But since the first 2 heights didn’t follow the
pattern we didn’t use them in the equation so this
equation doesn’t work for them.
Formula For Connect 4
The formula for any box with a width of 4 is C=7H-18
The formula for any box with a width of 5 is C=11H-27
The formula for any box with a width of 6 is C=15H-36
Conclusion
18=a16+b4+z (2)
32=a25+b5+z (3)
14=a9+b (3)-(2) (4)
10=a7+b (2)-(1) (5)
4=2a (4)-(5)
2=a
Substitute ‘a’ back into (4)
14=2x9+b
14=18+b
b=-4
Substitute ‘a’ and ‘b’ into (3)
32=2x25-4x5+z
32=50-20+z
32=30+z
z=2
So we now know what ‘a’, ‘b’ and ‘z’ are so we sub them back into the original equation which was Fo=aC²+bC+z
Fo=2C²-4C+2 is the fourth number equation
So the first number equation is 4
The second number equation is 3C-3
The third number equation is 3C-3
The fourth number equation is Fo=2C²-4C+2
So we now join them together.
In the connect number equations the first 2 numbers were in brackets and so were the second 2. So we have to group the first 2 equations and the second 2 in brackets. But each equation has to be in its own brackets so we need to use double brackets.
The formula for connect 3 was (4W-6)H-(6W-8) we will use it as a bass.
(first number equation xW-second number equation)H-(third number equation-Fourth number equation)
But each number equation needs to be surrounded by its own brackets.
((first number equation xW)-(second number equation))H-((third number equation)xW-(Fourth number equation))
((4W)-(3C-3))H-((3C-3)xW-(2C²-4C+2))
This formula finds out how many connects there are in any size box using any connecting number. E.g you could use a height of 5 and width of 4 and we are connecting 4. This would give you the answer of 17 which is correct.
But as before the formula does not work if the height is 2 or more numbers lower than the number you are connecting.
This student written piece of work is one of many that can be found in our AS and A Level Core & Pure Mathematics section.
Found what you're looking for?
- Start learning 29% faster today
- 150,000+ documents available
- Just £6.99 a month