SASMO Inverse Counting: Can 36 Grid Rectangles Come from Different Cell Layouts?

Knowing how many rectangles lie in a grid does not always tell you how many cells the grid contains. Working backwards requires finding every permitted layout, rather than stopping at the first picture that works. This original SASMO preparation example counts axis-aligned rectangles bounded by complete grid lines. It is an extension of forward counting, not an official contest question.

Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send SASMO-INVERSE-GRID-RECTANGLE-LAYOUTS-1122 and tell us your school year and question.

Define cells and boundary lines separately

Let a grid have m cell rows and n cell columns, with m and n positive integers. It has m+1 horizontal boundary lines and n+1 vertical boundary lines. Choosing two boundaries in each direction gives Tm times Tn rectangles, where Tk=k(k+1)/2. The problem here is to recover possible cell dimensions when this product equals 36.

Use symmetry to keep the search small

A rotation swaps rows and columns without creating a different unordered pair of dimensions, so assume m is at most n. Then Tm is at most Tn. Since T 4=10 and 10 squared exceeds 36, m cannot reach four. Only m=1,2 or 3 need checking. This bound is the part that makes the later list complete, rather than merely a collection of guesses.

Check each possible smaller dimension

For m=1, Tm=1, so Tn=36 and n=8 works because 8 times 9 divided by 2 is 36. For m=2, Tm=3, so Tn would have to be 12. But T 4=10 and T 5=15, so no integer n gives 12. For m=3, Tm=6, requiring Tn=6 and therefore n=3.

Translate the solutions back into drawings

The two unordered cell layouts are one by eight and three by three. They use two by nine boundary lines and four by four boundary lines respectively. Both produce 36 permitted rectangles, yet their cell totals are eight and nine. Thus the rectangle total does not uniquely determine the cell count. If orientation matters, eight by one is a separate ordered layout from one by eight.

Explain the inverse problem clearly

A complete answer states what is being counted, whether rotated layouts are identified, why the smaller dimension cannot be four or more, and why the missing triangular number 12 excludes one case. Draw each surviving grid to check the boundary interpretation. For the forward-counting formula, read the linked earlier grid article; the new task is using that formula backwards while proving that no permitted layout was missed.

Continue reading: SASMO Counting: A Grid Contains More Rectangles Than Its Individual Cells.

Contact Hanlin

Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send SASMO-INVERSE-GRID-RECTANGLE-LAYOUTS-1122. Include your school year, country or competition region, experience and the question you want to discuss.

Scan to contact Hanlin on WeChat. Send SASMO-INVERSE-GRID-RECTANGLE-LAYOUTS-1122.

Contact Hanlin on WeChat

On your phone, use the button or save the QR image and scan it within WeChat.

Official information and further reading: Source 1

Online Customer Service
Contact Customer Service