Problem: An ant crawls from one corner of a room to the diametrically opposite corner
along the shortest possible path. If the dimensions of the room are
3 x 4 x 5, what distance does the ant cover?
along the shortest possible path. If the dimensions of the room are
3 x 4 x 5, what distance does the ant cover?
If the room’s dimensions are a x b x c, then the length of the shortest path is min(sqrt((a+b)^2 + c^2),sqrt((a+c)^2 + b^2),sqrt((c+b)^2 + a^2)).
ReplyDeleteThis comment has been removed by the author.
ReplyDeletei feel the diametricaly opposite means the farthest vertex, which in case of cube of side A will be A√3. But as the ant will not be able to fly, so it will follow only surface. Thus it should be (A√2+A)
ReplyDeleteSo here should not it be min of
sqrt(i^2+j^2)+k
where (i,j,k) ∈ (a,b,c) and i≠j≠k
i.e. traversing along a diagonal on 1 side and taking an edge to reach the farthest vertex.
Will get back to you on this Abhinav .
ReplyDelete