This is a puzzle from an old Mensa book. The book listed a single solution with no explanation.

Consider two rectangles. R1 is 8 times the area of R2. R2 is 2 times the perimeter of R1.

The dimensions of both rectangles are integer values.

What are the dimensions of R1 and R2?

So obviously there are multiple solutions, but how do you solve for any one of them?

The two starting equations, where a and b are the dimensions of the large rectangle (R1) and c and d are the dimensions of the smaller rectangle (R2):

ab = 8cd

2 * (2a + 2b) = 2c + 2d

The third equation which may or may not be redundant is that the area/perimeter ratio of the large rectangle (R1) is 16 times the area/perimeter ratio for the small rectangle (R2).

ab / (2a + 2b) = 16 * cd / (2c + 2d)

I’m not sure what the next step towards “solving” is, but we know that the second rectangle is going to be short/skinny so I assigned the value of 1 to c (the short/skinny side) and then in later iterations, I assigned 2, and then 3. With c = 1, we have:

ab = 8d

2 * (2a + 2b) = 2 + 2d -> 2a + 2b = 1 + d

ab / (2a + 2b) = 16d / (2 + 2d) -> ab / (2a + 2b) = 8d / (1 + d)

I wasn’t able to do progress further with that, but an online solver generated the following solutions:

R1: 17 x 264, R2 = 1 x 561

R1: 18 x 140, R2 = 1 x 315

R1: 20 x 78, R2: 1 x 195

R1: 24 x 47, R2: 1 x 141

And for c = 2:

R1: 33 x 1024, R2: 2 x 2112

R1: 63 x 64, R2: 2 x 252

And for c = 3:

R1: 49 x 2280, R2: 3 x 4655

R1: 50 x 1164, R2: 3 x 2425

R1: 52 x 606, R2: 3 x 1313

R1: 56 x 327, R2: 3 x 763

R1: 57 x 296, R2: 3 x 703

R1: 79 x 120, R2: 3 x 395

R1: 84 x 110, R2: 3 x 385

Can someone show me the math to produce any one of these solutions or name the method of solving?

Graphically, we're looking at pairs of rectangles where the second has twice the perimeter of the first and then looking at all the different possible areas for each rectangle and trying to find an area in the first rectangle that is eight times an area in the second rectangle. The attached screenshot illustrates (or tries to) the 4th solution listed above.



1 Answer 1


You're right that we can write out two equations: $$ab=8cd, c+d=2(a+b)$$

Moreover, we can make your $c=1$ step more rigorous. Let's consider the four variables $a'=\frac{a}{c},b'=\frac{b}{c},c'=\frac{c}{c}=1,d'=\frac{d}{c}$. Notice that these variables satisfy the equations $$a'b'=8c'd',c'+d'=2(a'+b')$$

Therefore, the final shape of the rectangle (skinny or not) doesn't even matter, we can always do this step. You may realise that now the variables $a',b',d'$ are not necessarily integers anymore. This can be fixed by scaling up the variables at the end (e.g. $\frac{1}{2},\frac{1}{3},\frac{1}{5}\to 15,10,6$)

Now let's focus on solving the equations $a'b'=8d',d'+1=2(a'+b')$ for any rational numbers. Substitution gives us

\begin{align*} a'b'&=8(2a'+2b'-1)\\ a'b'-16a'-16b'&=8\\ a'(b'-16)-16(b'-16)&=8+256\\ (a'-16)(b'-16)&=264\\ a''b''&=264 \end{align*}

From this equation, we see a way to generate all solutions to the original problem. I will conclude with an example:

  1. Decide on an arbitrary rational number $a''$. Let's say $a''=\frac{6}{17}$.

  2. Calculate $b''=\frac{264}{a''}$. For us we get $b''=408$

  3. Next calculate $a'=a''+16$ and $b'=b''+16$. That is, $a'=\frac{278}{17}$ and $b'=424$.

  4. We can then calculate $d'=2(a'+b')=\frac{14972}{17}.$

  5. We've obtained the tuple $(a',b',c',d')=(\frac{6}{17},424,1,\frac{14972}{17})$.

  6. We scale each number up by a suitable number so it becomes an integer. In this case, multiplying everything by 17 gives $(a,b,c,d)=(6,7208,17,14972)$, but of course multiplying by $1700$ works too.

That's it!

Hope this helps,


  • $\begingroup$ This is extremely helpful, thank you!! Would it be correct to say that there is no real pattern between each solution? For example, if the solutions (e.g. for each rectangle "pair" where the second is twice the perimeter of the first) were graphed in 3 dimensions somehow, there wouldn't be any regularity to the line(s) that connected the different solutions, correct? $\endgroup$
    – Ken Boone
    Commented Jul 16, 2021 at 4:42
  • $\begingroup$ Yes I believe so due to the nature of step 6 i.e. scaling from a rational number to an integer - I won't expect any pattern/nice behaviour in the function $f(x)=$denominator of $x$ $\endgroup$
    – Gareth Ma
    Commented Jul 16, 2021 at 4:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .