A roach R I once met was mortally afraid of walls, and so when it walked on my kitchen's floor, its speed was exactly proportional to its distance from the nearest wall (that is, very near a wall it crawled very slowly, while in the centre of the room it run around quickly and happily). As a step towards simplifying R's life, help it find the fastest path from one point in the upper half plane {y>0} to another point in the upper half plane, assuming there is only one wall around, built along the x-axis y=0.
Comments
Leave a comment