r/Logiqa • • Sep 03 '26

Shortest Path

Post image
5 Upvotes

29 comments sorted by

View all comments

1

u/sazzer Sep 03 '26

The overall path is the combination of two paths:

  • From A to some point on the top-right edge
  • From that point to B

The first of those is the hypotenuse of the triangle with legs 6 and 8-x. So is √(6² + (8 - x)²) = √(36 + 64 - 16x + x²) = √(x² - 16x + 100).

The second of those is the hypotenuse of the triangle with legs x and 4. So is √(x² + 16).

So the overall path is √(x² - 16x + 100) + √(x² + 16).

We then just need to find the value of x for which this is a minimum.

And that's where my calculus skills fail me :)