Variables: These will allow me to find patterns in the different squares and different grid sizes. I will start off with a 2x2 square on a 10x10 grid. I will work out the formula for it, and then differentiate the grids and squares in the following ways:
- Grid size (width, height)
- Square size (width, height, shape)
- Square position
To work out the general formula of a 2x2 square on a 10x10 grid, you have to cross multiply the corners of each 2x2 square. This is shown as follows:
(N+10)(N+1) – N(N+11)
=N2+N+10N+10 – N2-11N
=N2+11N+10 – N2-11N
=N2 - N2+10+11N – 11N
=10
To test whether this works I replace the algebraic formula with numbers:
(1+10)(1+1) – 1(1+11)
= (11x2) – (12)
= 22 – 12
= 10
I will now test it with another 2x2 square to make sure my formula works with any square:
(3+10)(3+1) – 3(3+11)
= (3x3+3x1)+(10x3+10x1) – (3x3+3x11)
= (9+3)+(30+10) – (9+33)
= (12+40) – 42
= 52-42
= 10
Every time I changed the position of the square and used the formula, the answer always came out as ten.
I have increased the width of the square to make it a rectangle to see what effect this has on the final figure. I will multiply the corners of the rectangle and find a final figure. I think the figure will be bigger than a 2x2 square because the numbers that are being multiplied are higher than those of the 2x2 square.
This is the formula for a 2x3 rectangle on a 10x10 grid:
(N+10)(N+2) – N(N+12)
= (N2+2N+20+10N) – (N2+12N)
= N2-N2+2N+10N– 12N+20
= 20
To test whether this works I will replace the algebra with numbers:
(33+10)(33+2) – 33(33+12)
= 43x35 – 33x45
= 1505 – 1485
= 20
To make sure this works with any other square position on the grid I will test it again with another square:
(36+10)(36+2) – 36(36+12)
= 46x38 – 36x48
= 1748 –1728
= 20
I have rotated the rectangle so that it is 3 down by 2 across. I want to see how the final figure differs from that of the 2x3 square. I predict that because the rectangle goes down and the numbers further down the grid are bigger then the final number is going to be bigger too.
This is the algebraic formula:
(N+20)(N+1) – N(N+21)
= N2+N+20N+20 – N2 – 21N
= N2-N2+N+20N– 21N+20
= 20
Replaced by numbers:
(61+20)(61+1) – 61(61+21)
= 81x62 – 61x82
= 5022 – 5002
= 20
Second test with another position on the grid:
(63+20)(63+1) – 63(63 +21)
= 83x64 – 63x84
= 5312 – 5292
= 20
On a 10x10 grid, G equals 10.
Including ‘g’:
(N+2G)(N+1) – N(N+2G+1)
= (N2+N+2GN+2G) – (N2+2GN+N)
= N2-N2+2GN-2GN+2G+N– N
= 2G
I will now put G into the equation for a 10x10 grid algebraic formula:
G means grid size. For now it equals to 10.
DPD
= (N+G)(N+1) – N(N+G+1)
= (N2+N+GN+G) – (N2+GN+N)
= G
Through using my results and algebraic formulas I have tested my theory and it is correct. For an 8x8 grid the letter ‘G’ would equal to 8, no matter where the position of the square was.
I will now add G to a 2x3 rectangle.
I will now add H to my formula. This will involve me looking at how the height affects the DPD. First I will test it on a 10x10 2x3 rectangle. H = Height.
(N+G(H-1))(N+1) – N(N+G(H-1)+1)
= (N² + GHN – GN + N + GH –G) – (N² + GHN – GN + N)
= GH-G
Through using my algebra I have worked out that the DPD will be whatever the grid size is. From putting H into the formula I have found out that the expression ‘GH-G’ will equal the DPD for any square/rectangle shape.
The height of the rectangle on the right is 3. It is on a 10x10 grid.
GH-G
=(10x3) - 10
=20
This was the same for my algebraic formulas and numerical ones.
(28x2)-(1x29)
= 56-29
= 27
This is the same formula with using G and H in it but with a 2x4 rectangle, on a 9x9 grid
(N+G(H-1))(N+1) – N(N+G(H-1)+1)
= (N²+GHN – GN+N+GH –G) – (N²+GHN – GN+N)
= GH-G
GH-G
=(9x4) – 9
=36 – 9
=27
The DPD’s for the two 2x4 rectangles was the same for both the numerical and algebraic formulas. It went up a grid size each column. To get from a box to the one below it goes up by the number of the grid size because the width is G.
I have a general formula for any square/rectangle position, height and grid. It is GH-G.
I will now put W (width) into my equation to see what affect this has on the DPD.
This is the algebraic formula for a 2x2 square on a 9x9 grid:
(N+9)(N+1) – N(N+10)
= N2+N+9N+9 – N2 – 10N
= N2-N2+N+9N– 10N+9
= 9
(10x2) – (1x11)
= 20 – 11
= 9
(12x4) – (3x13)
= 48 – 39
= 9
This is the algebraic formula for a 2x3 square on a 9x9 grid:
(N+9)(N+2) – N(N+11)
= (N2+2N+9N+18) – (N2+11N)
= N2 – N2+11N – 11N +18
= 18
On a 9x9, G = 9
Now I will put G into my algebraic formula:
(N+G)(N+2) – N(N+G+2)
= (N2+2N+GN+2G) – (N2+GN+2N)
= N2 – N2+2N – 2N+GN – GN +2G
= 2G
I will now put W (width) into my equation to see what affect this has on the DPD.
(N+G(H-1))(N+2) – N(N+G(H-1)+2)
= (N²+GHN – GN+N+GH –G) – (N²+GHN – GN+N)
= (N² + GHN – GN + 2N + 2GH – 2G) – (N² + GHN – GN + 2N)
= 2GH – 2G
2GH – 2G
=(9x2)x2 – (2x9)
=18x2 – 18
=36 – 18
=18
DPD= N(N+G(H-1)+W-1) - (N+W-1) (N+G(H-1)
=(N²+GHN – GN+NW+GHN – GW – N – GH+G) – (N²+GHN – GN+NW – N)
=GHW – GW – GH+G
=G(HW – W – H+1)
If ‘W-1’ was just ‘W’ than the starting number ‘N’ would have to be ‘N+1’
G(HW – W – H+1)
As you can see N has disappeared. All that needs to be known is the width, height and grid size.
9(2x3 – 3 – 2+1)
=9(6 – 3 – 2+1)
=9x2
=18
This is a 2x3 rectangle on a 10x10 grid.
G(HW – W – H+1)
10(3x2 – 2 – 3 +1)
=10(6 – 2 – 3+1)
=10x2
=20
By doing this I have shown that my formula will work with any grid size, square/rectangle position, width and height of the square/rectangle. I have tested it against many different variables (those stated at the beginning) and have concluded this to be the final formula; G(HW – W – H+1).
If the grid were changed to a rectangular shape then it wouldn’t affect the final formula unless the grid was too small to hold the square/rectangle. Base is the only important factor affecting the DPD. You only need to know the width (base) of the grid because this is what is being added when moving down one square. As long as the length (height) is bigger than the square/rectangle height and starts no lower down than row L-H+1 than there are no complications and the height can go on to infinity and the DPD wont be affected.
The width affects the DPD because changing the width of the grid means that the numbers being cross-multiplied will have to change. Using the following example I will explain what limitations apply to the width of the grid.
1 2 3 4 5 6 7 8 9 10
Base = 10
To work out the limitations on width you will need to find out which is the last column is will work in. The width of the rectangle in the diagram above is 4. The base of the grid is 10.
10 – 4 = 6
Putting the square in column 6 will mean that there will still be a column with nothing in it in front of the rectangle on the grid. So I add one. This gives me the last column that the rectangle will work in.
10 – 4 + 1 =7
The seventh column is the last column that the rectangle of width 4 can be placed in order to work out the DPD.
B – W + 1
The following diagram will explain the limitations, which apply to height (length).
1
2
3
4
5
Length = 10
6
7
8
9
10
The limitations on length of the grid are shown in a formula similar to that of the width. The height of the rectangle in the above diagram is 2. The length of the grid is 10. So to find out the last possible row that the rectangle can be placed in, we do the calculation:
10 – 2 = 8
If we place the rectangle in row 8 than there is still a free row at the bottom, row 10. So we add one.
10 – 2 + 1 = 9
Putting the rectangle in row 9 is the furthest row down that the rectangle can go.
With ‘L’ being length and ‘H’ being height:
L – H + 1
These are the limitations for the grids.