Update 15 October, 2003: Cleverley Graham found a very nice general
solution.
From Ken Burres (khburres@detour.com):
1st Rectangle: 87 x 10 2nd Rectangle: 290 x 1 Let a,b be adjacent sides of the first rectangle Let s,t be adjacent sides of the second rectangle ab = 3st; 3 (2a + 2b) = 2s + 2t t = ab / 3s => 6a + 6b = 2s + 2(ab/3s) 6a + 6b = 2s + (2ab / 3s); 18as + 18bs = 6s^2 + 2ab; Let s = 1: 18a + 18b = 6 + 2ab; 18a - 6 = 2ab - 18b; 18a - 6 = b(2a - 18); b = (18a - 6) / (2a - 18); Let b = 10: 10 = (18a - 6) / (2a - 18); 20a - 180 = 18a - 6; 2a = 174; a = 87
#!/usr/bin/awk -f
# Given two rectangles, X and Y, with integral sides, such that Area(X)
#is three times Area(Y), and Perim(Y) is three times Perim(X).
#
# Let X have sides of length a and b, and Y have sides of length c and d.
#
# Therefore, a*b = 3*c*d
# and, 2(c+d) = 3*2(a+b) --> c+d = 3(a+b)
#
# For rectangle X, we know that a*b must be divisible by 3 in order to keep
# c and d integers.
# Eqn1: (a*b)%3 == 0
# For given values of a and b, we can calculate c*d and c+d and determine
# if there are integers c and d which will work.
#
# We also know that for a given rectangle Y with known area, but unknown
# sides, we can express limits on the perimiter:
# When one side is of length 1, we get the maximum perimeter:
# Perim(Y)/2 <= Area(y)+1
# Eqn2: c+d <= c*d+1
# Eqn2a: 3(a+b) <= a*b/3+1
# When both sides are equal, we get the minimum perimeter:
# Perim(Y)/2 >= 2*sqrt(Area(y))
# Eqn3: c+d >= 2*sqrt(c*d)
# Eqn3a: 3(a+b) >= 2*sqrt(a*b/3)
BEGIN {
printf(" a b a*b a+b c*d c+d\n");
printf("-----------------------------\n");
for(a=1;a<=10;a++)
for(b=1;b<=100;b++) {
if((a*b)%3==0 && 3*(a+b) <= a*b/3+1 && 3*(a+b) >= 2*sqrt(a*b/3))
printf("%3d %3d %5d %3d %5d %3d\n",
a,b,a*b,a+b,a*b/3,3*(a+b));
}
}
# The output of this script yields:
# a b a*b a+b c*d c+d
#-----------------------------
# 10 87 870 97 290 291
# 10 90 900 100 300 300
# 10 93 930 103 310 309
# 10 96 960 106 320 318
# 10 99 990 109 330 327
#
# The first point meets the criteria for maximum perimeter, giving
# Rectangle X with sides of 10 and 87, area of 870 and perimeter of 194
# Rectangle Y with sides of 1 and 290, area of 290 and perimeter of 582
#
# To check the results: 290*3 = 870 and 194*3=582.
A computer program led to the following: First rectangle a by b; Second rectangle c by d; The area of the first rectangle is three times the second; The perimeter of the second rectangle is three times the first; This our the solutions for 1<=c<=1000: a= 15 b= 22 c=110 d= 1 a= 12 b= 35 c=140 d= 1 a= 48 b= 11 c=176 d= 1 a= 42 b= 31 c=217 d= 2 a= 30 b= 44 c=220 d= 2 a= 57 b= 26 c=247 d= 2 a= 24 b= 70 c=280 d= 2 a= 87 b= 10 c=290 d= 1 a= 54 b= 53 c=318 d= 3 a= 45 b= 66 c=330 d= 3 a= 66 b= 45 c=330 d= 3 a= 96 b= 22 c=352 d= 2 a= 81 b= 40 c=360 d= 3 a= 36 b=105 c=420 d= 3 a=105 b= 36 c=420 d= 3 a= 75 b= 68 c=425 d= 4 a= 21 b=122 c=427 d= 2 a= 84 b= 62 c=434 d= 4 a= 60 b= 88 c=440 d= 4 a=114 b= 52 c=494 d= 4 a= 33 b=144 c=528 d= 3 a=144 b= 33 c=528 d= 3 a= 84 b= 95 c=532 d= 5 a=132 b= 49 c=539 d= 4 a= 75 b=110 c=550 d= 5 a= 48 b=140 c=560 d= 4 a=120 b= 71 c=568 d= 5 a=123 b= 70 c=574 d= 5 a=174 b= 20 c=580 d= 2 a=108 b=106 c=636 d= 6 a= 93 b=126 c=651 d= 6 a=126 b= 93 c=651 d= 6 a= 90 b=132 c=660 d= 6 a=132 b= 90 c=660 d= 6 a= 60 b=175 c=700 d= 5 a=192 b= 44 c=704 d= 4 a= 81 b=158 c=711 d= 6 a=162 b= 80 c=720 d= 6 a= 78 b=171 c=741 d= 6 a=171 b= 78 c=741 d= 6 a=141 b=112 c=752 d= 7 a=195 b= 58 c=754 d= 5 a=105 b=154 c=770 d= 7 a=102 b=161 c=782 d= 7 a= 72 b=210 c=840 d= 6 a=210 b= 72 c=840 d= 6 a=150 b=136 c=850 d= 8 a= 42 b=244 c=854 d= 4 a=168 b=124 c=868 d= 8 a= 30 b=261 c=870 d= 3 a=261 b= 30 c=870 d= 3 a=240 b= 55 c=880 d= 5 a=120 b=176 c=880 d= 8 a=210 b= 89 c=890 d= 7 a=111 b=200 c=925 d= 8 a=159 b=162 c=954 d= 9 a=162 b=159 c=954 d= 9 a= 84 b=245 c=980 d= 7 a=228 b=104 c=988 d= 8 a=135 b=198 c=990 d= 9 a=198 b=135 c=990 d= 9
mn(2mb-n)
a = ----------
4b-2nm^2
Note that n must be even because (i) if m is odd, then
k=4ab/m=2nt-n^2 is even, so 2nt-n^2 is even, so n
must be even; and
(ii) if m is even, then if n is odd, a is not
an integer, so n must
be even. Since n is even, substitute 2n for n
in the above equation:
2mn(2mb-2n) 4mn(mb-n) mn(mb-n)
a = ----------- = ----------- = ----------
4b-4nm^2 4(b-nm^2) b-nm^2
Equation (4) solves for x or y. Let:
mx(mb-x)
a = ----------
b-xm^2
to find that x=n.| (A) Choose x | (B) Find b, a | (C) y=ab/mx |
| 1 | 10, 87 | 290 |
| 1 | 11, 48 | 177 |
| 1 | 12, 35 | 140 |
| 1 | 15, 22 | 110 |
| 2 | 19, 330 | 1045 |
| 2 | 31, 42 | 217 |
| 3 | 40, 81 | 360 |
| 3 | 53, 54 | 318 |