Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 20

How Do You Like Them Rectangles?

Riddler Express

In the staircase of three rectangles below, find the height marked with a question mark.

image

Solution

The three rectangles share a left edge, so their widths grow by the marked overhangs. The top rectangle has area 2424 and height 44, hence width 24/4=624/4 = 6. The middle rectangle juts out 33 further and the bottom one juts out another 22, so the bottom rectangle is 6+3+2=116 + 3 + 2 = 11 wide. Its area is 4444, so the unknown height is 4411=4 in.\frac{44}{11} = \boxed{4 \text{ in.}} The bottom rectangle is exactly as tall as the top one. (The middle area, 3434, is extra information, not needed for the height.)

The computation

Chain the widths down the staircase and divide the bottom area by the bottom width.

top_width = 24 / 4                 # top area / top height
bottom_width = top_width + 3 + 2   # add the two marked overhangs
print(44 / bottom_width)           # 4.0 in

Riddler Classic

Four rectangles are arranged inside a frame 1414 inches wide and 1111 inches tall, as below. Three of their areas are given; find the area of the shaded rectangle.

image

Solution

Let the shaded rectangle be xx wide and yy tall. Along the bottom it sits beside the 4545-rectangle to fill the 1414-inch width, both of height yy, and up the left side it sits below the 3232-rectangle to fill the 1111-inch height, both of width xx: (14x)y=45,(11y)x=32.(14 - x)\,y = 45, \qquad (11 - y)\,x = 32. Subtracting the second from the first clears the xyxy term, giving 14y11x=1314y - 11x = 13. Substituting y=(13+11x)/14y = (13 + 11x)/14 into the first equation yields 11x2141x+448=0,x=141±1322=7  or  6411.11x^2 - 141x + 448 = 0, \qquad x = \frac{141 \pm 13}{22} = 7 \ \text{ or } \ \tfrac{64}{11}. The two roots describe two candidate figures, and the top-right 3434-rectangle settles which is real: with height 11y11 - y it has width 34/(11y)34/(11-y), and starting at xx it must fit inside the 1414-inch frame, x+34/(11y)14x + 34/(11-y) \le 14. The root x=7, y=457x = 7,\ y = \tfrac{45}{7} needs width 14.4414.44 and overflows; the root x=6411, y=112x = \tfrac{64}{11},\ y = \tfrac{11}{2} needs only 1212 and fits. So the shaded area is xy=6411112=32 in.2.xy = \frac{64}{11}\cdot\frac{11}{2} = \boxed{32 \text{ in.}^2}.

The computation

Solve the two area equations symbolically and keep the root whose top-right rectangle fits inside the 1414-inch width.

import sympy as sp
x, y = sp.symbols('x y', positive=True)
sols = sp.solve([sp.Eq((14 - x) * y, 45), sp.Eq((11 - y) * x, 32)], [x, y])
for xv, yv in sols:
    fits = xv + 34 / (11 - yv) <= 14            # top-right rectangle fits?
    print(xv, yv, "area", xv * yv, "fits" if fits else "overflows")