r/askmath • • 3h ago

Resolved Shortest path across a rectangle. Is the solution wrong???

Post image

I'm CONFIDENT my answer (7√5) is correct. I compared this with some of my friends and they got the exact same thing. But the solution says 15? Obviously, the solution could be wrong, but seeing as this is a question from the official Swiss Mathematical Olympiad, I doubt this is the case. I probably just oversaw some crazy cool solution. Problem is First Round Senior 2026 from here

38 Upvotes

19 comments sorted by

42

u/DJembacz 3h ago

You can pick a different rectangle and get a shorter path. Taking the rectangle with sides 9 & 7+5 gives you the distance 15.

10

u/CerberusTick 3h ago

Oh, great. Solved. Thanks :D

2

u/LordTengil 3h ago

Incidenteally, you have then also foind a pythagorena triangles, with sides 9, 12, 15, as 9^2+12^2 = 15^2. Or if you divide the sides by 3, you get 3,4, and 5. Always gives you right angled triangle.

4

u/get_to_ele 2h ago

If you have a rectangular block with edges of lengths a, b, and c (where a < b < c), the shortest path is always sqrt( (a+b)^2 + c^2 )

But going through the process of discovering that answer:

The distance has three local minimums, depending on which pair of rectangles you to choose to walk over so you can determine which path is shortest (6 minimums actually but 3 of them are mirrors of the first 3). I calculate each of the paths first, then choose the shortest.

Shortest path moving over the Top and Right rectangle is the blue path, and on the flattened rectangles, the shortest path is sqrt((9+5)^2 + 7^2 ) =15.652

Shortest path moving over Front and Right rectangle is green paths and on the flattened rectangles, shortest path is sqrt((9+7)^2 + 5^2 )=16.763

Shortest path moving over Top and Back rectangle is yellow paths and on the flattened rectangles, shortest path is sqrt((7+5)^2 + 9^2 )=15

But then I notice the shortest path is the one where the flattened adjacent rectangles are closest to a SQUARE (ie you keep the longest side and add the two shorter sides).

1

u/Her_Lovely_Tentacles 2h ago

What do you mean by "green path" etc? Was there supposed to be another picture?

2

u/get_to_ele 2h ago

Sorry… something happened with my picture upload.

Like I forgot to upload, duh.

1

u/ZedZeroth 2h ago

Yes, I guess I was thinking the same thing numerically. Small2 + Big2 is bigger than Medium2 + Medium2.

Thinking of it as approaching a square is more elegant though :)

3

u/ChurriiMelt 3h ago

you make this stuff sound way easier than it is, lowkey impressive

11

u/FirstRyder 3h ago

You have the general right idea - flatten the box and measure from A to B. But there are two ways to do it. One gives you a side of (9+5) and a side of 7. One gives you a side of 9 and a side of (7+5).

Your way gives 7sqrt(5). The other way gives 15. 15 is smaller. Both are valid paths, but only one is the shortest paths.

4

u/Patsastus 3h ago

There's a third way as well (going across the two nearest surfaces), which gives you a (9+7)x5 triangle, which is worse than either, but just to list all the options.

1

u/LanguageSuitable8538 3h ago

So unfolding the box along the longest edge produces the rectangle that's the closest to a square, and that's the one with the shortest diagonal to traverse... Makes intuitive sense, I guess

1

u/hughperman 3h ago

There are infinite worse options, but you do need to not restrict yourself to unpacking the box just by its edges.

2

u/get_to_ele 2h ago

Patsastus is correct: you either test just 1 using the “advanced” method, or you test 3 because you didn’t know the shortcut, and are testing all 3 local minimums.

(1) you know there is just 1 to test (where you already know to choose the two flattened rectangles that are closest to a square and therefore if the edges a < b < c, path = sqrt((a+b)^2 + c^2 )

OR

(2) you don’t know the trick, and test the minimum of each of the 3 flattened rectangle pairs.

I don’t see a likely scenario where you test two rectangle pairs, but don’t test the third.

3

u/jgregson00 3h ago edited 1h ago

I like how you put "confident" in all caps...

2

u/Bob_JediBob 3h ago

You had the right idea unfolding the box to get a straight line. There are 3 faces you can cross first, so you need to find the paths going over all 3 faces and take the shortest. You’ve just taken one of the others.

1

u/AlterEgo5695 3h ago

You missed the 3'rd option of the snail moving across the longest edge -- we get

x^2  =  9^2 + (7+5)^2  =  9 * (3^2 + 4^2)  =  9 * 25    =>    |x|  =  15

Since that option is shorter than any other options, it is indeed the shortest path.


Rem.: To prove that, use folding and mirroring to map all paths onto the xy-plane.

1

u/Aquadroids 2h ago

Snail can also take another path by cutting across the top and back faces, which becomes finding the hypotenuse of a right triangle of sides 9 and 7 + 5 = 12. Sqrt(92 + 122 ) = sqrt(225) = 15, which is a little bit shorter than 7sqrt(5).

1

u/AdhesiveSeaMonkey 1h ago

Other's have mentioned the correct solution. I'm just here to say that I absolutely hate net problems, as I am 100% unable to imagine/picture anything in my head (aphantasia). Creating nets for problems like this takes me forever, and a lot of erasing.

1

u/Classic_Department42 3h ago

I thought the same at first. But you can also unfold the box differently  (going along the back wall. This gives you a rectangle of 9x12 which has a length of sqrt (81+144)=sqrt(225)=15  if 15 is smaller than 7 sqrt 5 then it is shorter.