Ajay was walking along a straight and narrow road. He stopped at a point and looked ahead and noticed that there were three stones, in a straight line, along the road, situated at a distance of 5 m, 6.6 m and 7.8 m from him. How much further should Ajay walk (in m) in order to minimise the sum of the distances of the three of stones from him?Enter your answer as a decimal value, rounded off to two decimal places.
Question
Ajay was walking along a straight and narrow road. He stopped at a point and looked ahead and noticed that there were three stones, in a straight line, along the road, situated at a distance of 5 m, 6.6 m and 7.8 m from him. How much further should Ajay walk (in m) in order to minimise the sum of the distances of the three of stones from him?Enter your answer as a decimal value, rounded off to two decimal places.
Solution
To minimize the sum of the distances from Ajay to the three stones, he should position himself at the median of the three stones. The median in this case is the middle value when the distances are arranged in ascending order, which is 6.6 m.
Since Ajay is currently 6.6 m away from the median stone, he does not need to walk any further.
So, the answer is 0.00 m.
Similar Questions
A walks for 4m from point X in the East direction. He then takes a right and a left turn and walked for 3 m and 2 m respectively and finally reaches point Z. B starts walking from point Y and walks for 8 m in East direction, he then takes three consecutive right turns and walks 10 m, 2 m and 3 m respectively and reaches Z. What is shortest distance between point X and point Y?
Siddharth started to walk towards the South-East on a road and stopped after moving 26m. Now he turned left-hand side and moved 16 m. How much minimum distance he has to cover to reach his starting point?
There are three friend living on the straight line Ox in Lineland. The first friend lives at the point x1, the second friend lives at the point x2, and the third friend lives at the point x3. They plan to celebrate the New Year together, so they need to meet at one point. What is the minimum total distance they have to travel in order to meet at some point and celebrate the New Year?It's guaranteed that the optimal answer is always integer.InputThe first line of the input contains three distinct integers x1, x2 and x3 (1 ≤ x1, x2, x3 ≤ 100) — the coordinates of the houses of the first, the second and the third friends respectively.OutputPrint one integer — the minimum total distance the friends need to travel in order to meet together.ExamplesinputCopy7 1 4outputCopy6inputCopy30 20 10outputCopy20NoteIn the first sample, friends should meet at the point 4. Thus, the first friend has to travel the distance of 3 (from the point 7 to the point 4), the second friend also has to travel the distance of 3 (from the point 1 to the point 4), while the third friend should not go anywhere because he lives at the point 4.
From point ‘P’, Rajat walks 5m towards north. He takes right turn and walks 4m then, he takes another left turn and walks 4m. Now, after turning 135° anti-clockwise, he walks in that direction a distance of 4√2 m to reach point Q. Which of the following will be the distance between points P and Q?3 m4 mMore than 6 meters5 m
Mary leaves and walks 9 km due south from home, turns and walks 12 km west to get to the store.How far would Mary need to walk in a straight line to get back home?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.