how many rectangles (including squares) be found in the following diagram? you must explain why your calculations are actually counting the possible rectangles or squares in this diagram. Its a 4x8 grid...i did not know how to draw it w/o attaching it. i think it is an nCr problem, I'm just not quite sure
Code::------------------------------------------: : : : : : : : : : :------------------------------------------: : : : : : : : : : :------------------------------------------: : : : : : : : : : :------------------------------------------: : : : : : : : : : :------------------------------------------:
Okay so the diagram still doesn't look right on my system, but I think the question is equivalent to asking for how many rectangles are in the following figure,
which is called a grid graph, or .
This question is common in recreational mathematics, e.g., puzzle books and puzzle websites. You have to find a systematic way to count them all. My recommendation: Fix the upper left corner first, then fix the height, then see how many rectangles you can find. Iterate through all possible upper left corners and all possible heights given those upper left corners. Look at smaller examples if it's easier, or to convince yourself that you have a valid method.