Re: formula for grids Basic I know, but what is the formula for the number of squares in an n X n grid. If you determine the number of squares on smaller boards starting with one square you will readily discover a pattern that leads to a simple formula for a board of any number of squares. A one square board obviously has only one square. A 2x2 square board has 5 squares, the 4 basic ones and the one large 2x2 one. A 3x3 square board has 14 squares, the smaller 9 plus 4 2x2's plus 1 3x3 one.
A 4x4 square board has 30 squares, the smaller 16 plus 9 3x3's, plus 4 2x2's plus 1 4x4 one. Are you beginning to see the pattern? What would your guess be for the number of squares on an 8 x 8 board? Can you derive a general expression for the answer? Here it is. As for how many rectangles there are in a square nxn squares big?
We count only "rectangles", not the squares which are special cases of rectangles. Remember, only rectangles where the length is longer than the width. Again, the best way to creep up on a solution is to start out with the small size squares and see where it leads you.
Let's write the total number of squares as a sequence. The "index" of each item in the sequence represents n in the n x n grid:. Each element in our total number of squares sequence can be defined as a the sum of all previous totals up to, and including, the current total. Put another way:. Recall that range counts from 0 up to 9 , but not including 9. We can find a closed formula to calculate this without the summation.
For example, you could add all the terms of a sequence of 1, 2 ,3, Or your could use this handy equation:. We can find a pattern of sorts by taking the differences between terms.
We can form another sequence of terms the differences which will always be one element shorter than the original. Now, last but not least, let us consider 36 squares within a big square as shown in the figure above. Note that there are 6 identical squares along each side of the large square.
This is the question whose answer we are seeking to find anyway. Did you understand the above? If not we understand why. You see, the problem with textual solutions is that it reaches the student only on a very limited level.
This is the reason why Singaporeans spend a billion dollars annually on tuition services a year. And this is also the reason why we have more than hours of tuition, pre-recorded, to answer questions such as this on an economical basis for parents and students.
Carrying it a bit further: Now we ask ourselves, how many rectangles are there in a square nxn squares big? We count only "rectangles", not the squares which are special cases of rectangles.
Remember, only rectangles where the length is longer than the width. Again, the best way to creep up on a solution is to start out with the small size squares and see where it leads you. For a 2x2 square, we have a total of 4 possible rectangles, each 1x2 squares. For the 3x3 square, we can find 12 1x2 squares, 6 1x3 squares, and 4 2x3 squares for a total of 22 squares.
For the 4x4 square, we can find 24 1x2's, 16 1x3's, 8 1x4's, 12 2x3's, 6 2x4's, and 4 3x4's for a total of 70 squares. For the 5x5 square, we get 40 1x2's, 30 1x3's, 20 1x4's, 10 1x5's, 24 2x3's, 16 2x4's, 8 2x5's, 12 3x4's, 6 3x5's, and 4 4x5's. Did you notice anything as you looked through these nymbers?
Lets put them into a tabular form. Along side each nxn square will be the number of squares identified at the top of the column. The number of 3 square wide rectangles in each case is equal to the number of 2 square wide rectangles in the previous case.
The total number of rectangles in a square of nxn squares is equal to the sum of the 1 square wide rectangles for each rectangle from the 2x2 up to and including the nxn one being considered. The general expression for the number of rectangles can be derived from the following extension of our data so far. An expression can be derived enabling the definition the nth term of any finite difference series. The expression is a function of the number of successive differences required to reach the constant difference.
0コメント