You want the length of the shortest path which has all the
three points (4, 7), (2, 3) and (0, 1) on it.
Let us first
find the distance between each of the points. We use the relation for the distance
between tow points (x1, y1) and (x2, y2) as sqrt [(x1 – x2) ^2 + (y1 – y2)
^2].
(4, 7) and (2, 3): sqrt [(4 – 2) ^2 + (7 – 3) ^2] =
sqrt [4 + 16] = sqrt 20
(4, 7) and (0, 1): sqrt [(4 – 0) ^2
+ (7 – 1) ^2] = sqrt [16 + 36] = sqrt 52
(2, 3) and (0, 1):
sqrt [(2 – 0) ^2 + (3 – 1) ^2] = sqrt [4 + 4] = sqrt
8
Therefore the shortest path would be if you go from (0,
1) to (2, 3) and then to (4, 7) and the total distance to be covered would be sqrt 8 +
sqrt 20
The required result is sqrt 8 + sqrt
20
No comments:
Post a Comment