(A) How many squares are there in the diagram given below?
(B) How many rectangles are there in the diagram given below?
+++++
    
    
+++++
    
    
+++++
    
    
+++++
    
    
+++++
   
   
++++
  
  
+++
 
 
++
*** If the length and width appear equal, then it is a square. If not, then it is a rectangle.
** The number of rectangles should exclude the ones that are counted as squares
The number of squares with the smallest square at its upper left corner:
+++++
 4  3  2  1 
    
+++++
 3  3  2  1 
    
+++++
 2  3  2  1 
    
+++++
 1  2  2  1 
    
+++++
 1  2  1 
   
++++
 1  1 
  
+++
 1 
 
++
For a total of 40
Number of rectangles with each small square at its upper left corner. (Including squares. Subtract the above numbers to exclude squares.)
+++++
 16  15  12  7 
    
+++++
 12  12  10  6 
    
+++++
 8  9  8  5 
    
+++++
 4  6  6  4 
    
+++++
 3  4  3 
   
++++
 2  2 
  
+++
 1 
 
++
Interesting structure there.
Numbers sum to 155.
Subtract the 40 above to exclude the squares and get 115.

Posted by Jer
on 20150116 09:03:48 