Pradeep and his friends discuss puzzles and riddles whenever they have free time in the school. Here is one problem given by Pradeep.
In this 7-cross-11 grid of squares, find the
i) Total number of squares
ii) Total number of rectangles which are not squares
iii) Total number of rectangles
Would you like to solve this?
Hint 1
Do not count. Think of alternative ways.
Hint 2
To find the number of rectangles, use combinations. Finding the number of squares is very simple.
Answer
i) Total number of squares = 252
ii) Total number of rectangles which are not squares = 1596
iii) Total number of rectangles = 1848
Solution
Normally when one asks such a question, it is tempting for us to go on counting the squares or the rectangles with our own logics. The first step towards the solution says we should not count the number of squares/rectangles; instead, think of a method to get the answer directly.
Ok. Now we are on a voyage to find the number of squares/rectangles using a technique. First, let us carefully peek through the problem statement again. It is clear from the three questions that the answer for second one is equal to the answer for the third question minus the answer for the first question. So, if we solve i) and iii), ii) gets solved from the above relation. Lets proceed to solve i) and iii).
Solution iii)
A small thought about rectangles would reveal that two vertical lines and two horizontal lines make a rectangle. This simple concept is the key to get the number of rectangles for the problem. But how? In the problem, there are 12 vertical lines and 8 horizontal lines. For making a rectangle, we can select any two horizontal lines and any two vertical lines. So, we can try to make a rectangle using combinations of any two horizontal lines and any two vertical lines.
Number of ways of selecting two horizontal lines among 8 horizontal lines is
Number of ways of selecting two vertical lines among 12 vertical lines is
The number of rectangles which can be formed from 8 horizontal lines and 12 vertical lines is given below:
Therefore, the number of rectangles in 7 x 11 grid = 1848.
Solution i)
It is time to calculate the number of squares. From the problem’s 7 x 11 grid, the possible sizes of the squares which can be formed are 1 x 1, 2 x 2, 3 x 3, 4 x 4, 5 x 5, 6 x 6 and 7 x 7 (as the maximum square size possible is 7 x 7).
Total number of squares = Number of 1 x 1 squares + Number of 2 x 2 squares + ... + Number of 7 x 7 squares
Number of 1 x 1 squares = 7 x 11
Number of 2 x 2 squares = 6 x 10
Number of 3 x 3 squares = 5 x 9
Number of 4 x 4 squares = 4 x 8
Number of 5 x 5 squares = 3 x 7
Number of 6 x 6 squares = 2 x 6
Number of 7 x 7 squares = 1 x 5
Therefore,
Therefore, the number of squares in 7 x 11 grid = 252.
Solution ii)
As we have found iii) and i), we can proceed to find ii)
Number of rectangles which are not squares
= Number of rectangles – Number of squares
= 1848 – 252
= 1596
On generalizing the problem, if we have a (m-1) x (n-1) grid, then
Number of horizontal lines = m
Number of vertical lines = n
Number of rectangles which are not squares = Number of rectangles – Number of squares
NOTE: The verification of the formula for the number of squares in a (m-1) x (n-1) grid, if m = n, is left as an exercise for the thinker.