Tricking the Magician

Logic Level 3

You met a magician on a train, and after a little chat, he took out 3 3 squares of different sizes, as shown below. (The figure may not be drawn to scale.)

Magician: "These squares' side lengths are distinct digits (from 1 1 to 9 9 inclusive) whose greatest common factor is 1 1 ."

With a flip of his hand, he transformed the squares into one whole rectangle.

Magician: "Now this rectangle's area is the same as the combined area of those 3 3 squares. The width of the rectangle is equal to the sum of the 3 3 squares’ side lengths, while the height of the rectangle is another distinct digit."
You: "How amazing! Can you tell me that height then?"
Magician: "No. Even if you know it, you still can’t work out the area of the rectangle."
You: "Can you at least tell me just one side length of the squares then?"
Magician: "No. Even if you know just any one square's length, you still can’t work out the area of the rectangle."
You: "Thanks! Now I know the area of the rectangle."

The magician became baffled after he had been advertently tricked to slip out a big clue.

What is the area of the rectangle?


Inspired by Digitalize This .


The answer is 98.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Michael Mendrin
Apr 20, 2017

Let ( a , b , c , L , W ) (a, b, c, L, W) be the sides of the 3 3 squares in increasing order, the length, and the width of the rectangle. Then after the magician has explained the first set of conditions, only the following are possible

( 1 , 2 , 4 , 7 , 3 ) (1,2,4,7,3)
( 1 , 3 , 9 , 13 , 7 ) (1,3, 9,13,7)
( 1 , 4 , 9 , 14 , 7 ) (1,4,9,14,7)
( 4 , 6 , 9 , 19 , 7 ) (4,6,9,19,7)


Then after the magician explained that one cannot determine the area of the rectangle even after knowing with the width is, then the first possibility is eliminated, and the remaining following are possible

( 1 , 3 , 9 , 13 , 7 ) (1,3, 9,13,7)
( 1 , 4 , 9 , 14 , 7 ) (1,4,9,14,7)
( 4 , 6 , 9 , 19 , 7 ) (4,6,9,19,7)

Then after the magician explained that if one knew the side length of any of the three squares, one still cannot determine the area of the rectangle, that leaves the only possibility

( 1 , 4 , 9 , 14 , 7 ) (1,4,9,14,7)

since it's the only one of the three where the side of each of the three squares matches the side of a square in at least one other possibility. Hence, the area is 14 7 = 98 14 \cdot 7=98

This is a shortcut summary of Worrant's solution as given near the end of it.

Sir how did u choose the width as 7??

erica phillips - 3 years, 3 months ago

Log in to reply

The width wasn't chosen but calculated. For the real answer, it's (1²+4²+9²)/(1+4+9) = 98/14 = 7

Saya Suka - 5 months ago

How do you get the numbers for a, b, c when their greatest common factor is supposed to be 1?

Henri Maes - 3 years, 2 months ago

Log in to reply

Shortlisting? Not too hard when a < b < c < 10.

Saya Suka - 5 months ago

You're saying "Then after the magician has explained the first set of conditions, only the following are possible..." and then giving 4 sets of numbers... why didn't you mention this one: (3,6,9,18,7)? it seems to fit in as well as the others do...

Nik Gibson - 2 years, 9 months ago

Log in to reply

Because we're told that greatest common factor of the set is 1, but in your answer it's three.

Saya Suka - 2 years ago

Log in to reply

what does 3 have to do with 7 — the last one in the brackets?!

Nik Gibson - 2 years ago

Log in to reply

@Nik Gibson In your erroneous answer, all three of 3, 6 & 9 is divisible with gcf 3.

Saya Suka - 5 months ago

Relevant wiki: K-level thinking

Suppose a , b , c a, b, c be the side lengths of the three squares and d d be the width of the rectangle. With the same area, we can set up an equation as shown below:

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

From the given equation, it is clear that a + b + c a 2 + b 2 + c 2 a+b+c| a^2+b^2+c^2 . Hence, a 2 + b 2 + c 2 0 ( m o d a + b + c ) a^2+b^2+c^2 \equiv 0 \pmod{a+b+c} .

And ( a + b + c ) 2 ( a 2 + b 2 + c 2 ) + 2 ( a b + b c + c a ) 0 ( m o d a + b + c ) (a+b+c)^2 \equiv (a^2+b^2+c^2)+2(ab+bc+ca) \equiv 0 \pmod{a+b+c} .

If a 2 + b 2 + c 2 0 ( m o d a + b + c ) a^2+b^2+c^2 \equiv 0 \pmod{a+b+c} , then 2 ( a b + b c + c a ) 0 ( m o d a + b + c ) 2(ab+bc+ca) \equiv 0 \pmod{a+b+c} .

Then 2 ( ( a + b ) ( b + c ) b 2 ) 2 ( ( c ) ( a ) b 2 ) 2 ( a c b 2 ) 0 ( m o d a + b + c ) 2((a+b)(b+c) - b^2) \equiv 2((-c)(-a)-b^2) \equiv 2(ac - b^2) \equiv 0 \pmod{a+b+c} .

Therefore, if b 2 = a c b^2 = ac , the equivalence will be true, and from all the digit squares, here are the possibilities:

2 2 = 1 4 2^2 = 1\cdot 4 . Thus, 1 2 + 2 2 + 4 2 1 + 2 + 4 = 21 7 = 3 \dfrac{1^2 + 2^2 + 4^2}{1+2+4} = \dfrac{21}{7} = 3 .

3 2 = 1 9 3^2 = 1\cdot 9 . Thus, 1 2 + 3 2 + 9 2 1 + 3 + 9 = 91 13 = 7 \dfrac{1^2 + 3^2 + 9^2}{1+3+9} = \dfrac{91}{13} = 7 .

4 2 = 2 8 4^2 = 2\cdot 8 . Thus, 2 2 + 4 2 + 8 2 2 + 4 + 8 = 84 14 = 6 \dfrac{2^2 + 4^2 + 8^2}{2+4+8} = \dfrac{84}{14} = 6 .

6 2 = 4 9 6^2 = 4\cdot 9 . Thus, 4 2 + 6 2 + 9 2 4 + 6 + 9 = 133 19 = 7 \dfrac{4^2 + 6^2 + 9^2}{4+6+9} = \dfrac{133}{19} = 7 .

Now we have explored the most obvious solutions, but are there more?

Since b a c ( m o d a + b + c ) b \equiv -a-c \pmod{a+b+c} , then b 2 ( a + c ) 2 ( m o d a + b + c ) b^2 \equiv (a+c)^2 \pmod{a+b+c} .

Hence, 2 ( a c b 2 ) 2 ( a c ( a + c ) 2 ) 2 ( a 2 + a c + c 2 ) 0 ( m o d a + b + c ) 2(ac - b^2) \equiv 2(ac - (a+c)^2) \equiv 2(a^2 + ac + c^2) \equiv 0 \pmod{a+b+c} .

Then 2 ( c a ) ( a 2 + a c + c 2 ) 2 ( c 3 a 3 ) 0 ( m o d a + b + c ) 2(c-a)(a^2 + ac + c^2) \equiv 2(c^3 - a^3) \equiv 0 \pmod{a+b+c} .

Similarly, with the terms alternated, we will have 2 ( c 3 b 3 ) 2 ( b 3 a 3 ) 0 ( m o d a + b + c ) 2(c^3 - b^3) \equiv 2(b^3 - a^3) \equiv 0 \pmod{a+b+c} .

For generality, let us have a < b < c a<b<c . This way, we will attempt to find the middle digit for all possible square summation by checking the upper or the lower bound from that number.

Then the case of b = 2 b=2 is already checked as shown in the above solution.

For b = 3 b=3 , we will have a = 2 a=2 left, and 2 ( 3 3 2 3 ) 2 19 0 ( m o d 2 + 3 + c ) 2(3^3 - 2^3) \equiv 2\cdot 19 \equiv 0 \pmod{2+3+c} . Then c c must be 14 14 to make the equivalence true, but it's not the desired digit, according to the problem.

And we have the triple a = 1 a=1 , b = 3 b=3 , and c = 9 c=9 as shown in the above solution.

Then for b = 4 b=4 , if a = 1 a=1 , 2 ( 4 3 1 3 ) 126 2 3 3 7 0 ( m o d 1 + 4 + c ) 2(4^3 - 1^3) \equiv 126 \equiv 2\cdot 3\cdot 3\cdot 7 \equiv 0 \pmod{1+4+c} . Then c c can be 4 4 or 9 9 , but if we want all distinct digits, only 9 9 applies: 1 2 + 4 2 + 9 2 1 + 4 + 9 = 98 14 = 7 \dfrac{1^2 + 4^2 + 9^2}{1+4+9} = \dfrac{98}{14} = 7 .

And we have the triple a = 2 a=2 , b = 4 b=4 , and c = 8 c=8 as shown in the above solution.

For b = 4 b=4 , if a = 3 a=3 , 2 ( 4 3 3 3 ) 2 37 0 ( m o d 1 + 4 + c ) 2(4^3 - 3^3) \equiv 2\cdot 37 \equiv 0 \pmod{1+4+c} . Then c c must be 32 32 , which is not applicable.

For b = 5 b=5 , if a = 1 a=1 , 2 ( 5 3 1 3 ) 2 124 8 31 0 ( m o d 1 + 5 + c ) 2(5^3 - 1^3) \equiv 2\cdot 124 \equiv 8\cdot 31 \equiv 0 \pmod{1+5+c} . Only 2 2 or 25 25 works for c c here, but 2 2 only works for c = 4 c=4 as shown above, and 25 25 is not applicable.

For b = 5 b=5 , if a = 2 a=2 , 2 ( 5 3 2 3 ) 2 117 2 3 3 13 0 ( m o d 2 + 5 + c ) 2(5^3 - 2^3) \equiv 2\cdot 117 \equiv 2\cdot 3\cdot 3\cdot 13 \equiv 0 \pmod{2+5+c} . Only 2 2 or 6 6 works for c c , but if we want the distinct digit, only 6 6 applies: 2 2 + 5 2 + 6 2 2 + 5 + 6 = 65 13 = 5 \dfrac{2^2 + 5^2 + 6^2}{2+5+6} = \dfrac{65}{13} = 5 .

Unfortunately, it's not a distinct quotient digit, so not a new solution for us.

For b = 5 b=5 , if a = 3 a=3 , 2 ( 5 3 3 3 ) 2 98 2 2 7 7 0 ( m o d 3 + 5 + c ) 2(5^3 - 3^3) \equiv 2\cdot 98 \equiv 2\cdot 2\cdot 7\cdot 7 \equiv 0 \pmod{3+5+c} . Only 6 6 applies for c c : 3 2 + 5 2 + 6 2 3 + 5 + 6 = 70 14 = 5 \dfrac{3^2 + 5^2 + 6^2}{3+5+6} = \dfrac{70}{14} = 5 . Again, it's not a distinct quotient digit, so not a new solution for us.

For b = 5 b=5 , if a = 4 a=4 , 2 ( 5 3 4 3 ) 2 61 0 ( m o d 4 + 5 + c ) 2(5^3 - 4^3) \equiv 2\cdot 61 \equiv 0 \pmod{4+5+c} . No digit c c exists for this case.

For b = 6 b=6 , if c = 7 c=7 , 2 ( 7 3 6 3 ) 2 127 0 ( m o d a + 6 + 7 ) 2(7^3 - 6^3) \equiv 2\cdot 127 \equiv 0 \pmod{a+6+7} . No digit a a exists for this case.

For b = 6 b=6 , if c = 8 c=8 , 2 ( 8 3 6 3 ) 2 296 2 2 2 74 0 ( m o d a + 6 + 8 ) 2(8^3 - 6^3) \equiv 2\cdot 296 \equiv 2\cdot 2\cdot 2\cdot 74 \equiv 0 \pmod{a+6+8} . No digit a a exists for this case.

And we have the triple a = 4 a=4 , b = 6 b=6 , and c = 9 c=9 as shown in the above solution.

For b = 7 b=7 , if c = 8 c=8 , 2 ( 8 3 7 3 ) 2 169 2 13 13 0 ( m o d a + 7 + 8 ) 2(8^3 - 7^3) \equiv 2\cdot 169 \equiv 2\cdot 13\cdot 13 \equiv 0 \pmod{a+7+8} . No digit a a exists for this case.

For b = 7 b=7 , if c = 9 c=9 , 2 ( 9 3 7 3 ) 2 386 2 2 193 0 ( m o d a + 7 + 9 ) 2(9^3 - 7^3) \equiv 2\cdot 386 \equiv 2\cdot 2\cdot 193 \equiv 0 \pmod{a+7+9} . No digit a a exists for this case.

For b = 8 b=8 , if c = 9 c=9 , 2 ( 9 3 8 3 ) 2 217 2 7 31 0 ( m o d a + 8 + 9 ) 2(9^3 - 8^3) \equiv 2\cdot 217 \equiv 2\cdot 7\cdot 31\equiv 0 \pmod{a+8+9} . No digit a a exists for this case.

Thus, we can conclude that the only solution ( a , b , c ) (a,b,c) are: ( 1 , 2 , 4 ) (1,2,4) ; ( 1 , 3 , 9 ) (1,3,9) ; ( 1 , 4 , 9 ) (1,4,9) ; ( 2 , 4 , 8 ) (2,4,8) ; and ( 4 , 6 , 9 ) (4,6,9) .

And the only applicable quotient digits or the widths would include: 3 3 , 6 6 , & 7 7 .

From the magician's statement, even if we know the width, we still can't be sure of the area of the rectangle. Therefore, the width can't be 3 3 or 6 6 as each has only one side length correlation. Thus, we can deduce that the width is 7 7 .

Then for the width of 7 7 , we will have these possible ( a , b , c ) (a,b,c) combinations: ( 1 , 3 , 9 ) (1,3,9) ; ( 1 , 4 , 9 ) (1,4,9) ; ( 4 , 6 , 9 ) (4,6,9) .

Again from the magician's last information, even if we know just any of the square's side, we won't be able to work out the whole area. That means such square's side would need to be repeated in these combinations, and it is obvious that the digits 1 1 , 4 4 , & 9 9 appear in more than one possible outcome. In other words, if we are told that the square side is 3 3 or 6 6 , we can work out the rest of the sides, which is not the case.

As a result, the area of the rectangle = 7 ( 1 + 4 + 9 ) = 1 2 + 4 2 + 9 2 = 98 7(1+4+9) = 1^2 + 4^2 + 9^2 = \boxed{98} .

But isn't the greatest common factor for a, b, c supposed to be 1. (?)

Henri Maes - 3 years, 2 months ago

Log in to reply

Indeed, (2,4,8) should be eliminated right away, but it doesn't affect the solution.

lovro cupic - 3 years, 1 month ago

Indeed. That is where I struggle, too. Like in the other solution, I arrived at that there are some solutions to the equation a^2+b^2+c^2 = d*(a+b+c). From these solutions there is only one triple (a,b,c) where the gcds among these numbers is unequal to 1. (1,4,9) After that we do not need any 'iterated thinking' to arrive at the solution, because it is unanimous.

Alexander Zwink - 2 years, 11 months ago

There’s another solution. 3, 6, 9. The height is 7!

Misheel Otgonbayar - 2 years, 7 months ago

Log in to reply

The question specifically states gcd(a,b,c) =1. Thus, this answer doesn't apply.

Worranat Pakornrat - 2 years, 7 months ago

now I know why this problem was so hard

Mxjd Ultimate - 6 days, 13 hours ago
Justin Park
Apr 21, 2020

I have a Question.

If I set up the equation as

a^2+b^2+c^2 = (a+b+c)x

I get x = 7 and possible solutions are (1,3,9), (1,4,9), (3,6,9), (4,6,9).

In any of these cases, revealing x = 7 does not result in finding the answer since it could be any of these four. Revealing any one of these squares' side length does not result in finding the answer since for any of the side lengths (1,3,4,6,9) has at least two cases it can be true. How can you deduce further from this point that it is the (1,4,9)? Thank you.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...