Olympiad workbookIOQMStraight Lines
A bug travels in the coordinate plane moving only along the lines that are parallel to the x axis or y axis. Let A=(-3,2) and B(3,-2) . Consider all possible paths of the bug from A to B of length at most 14 . How many points with integer coordinates lie on at least one of these paths?
Correct answer
87
Step-by-step solution
Least number of steps required to move from A to B is 10 . Let we denote any step towards positive x axis by R and negative y -axis by D . So all steps are the permutations of R R R R R R D D D . In this way, all points of the rectangular grid are covered. If we introduce one step in negative x axis or positive y axis, movement will be completed in 12 steps. Similarly, if we introduce two steps in negative x -axis or in positive y -axis or one in each direction the movement will be completed in 14 steps (maximum al