Two unit squares and have horizontal and vertical sides. Let be the minimum distance between a point in and a point in , and let be the maximum distance between a point in and a point in . Given that , the difference between the maximum and minimum possible values for can be written as , where , and are integers and is positive and square-free. Find .
Solution
Consider what must happen in order for the minimum distance to be exactly 5 . Let one square, say have vertices of , and . Further, assume WLOG that the center of is above the line and to the right of the line , determined by the center of . There are three cases to consider: - the right side of and the left side of are 5 units apart, and the bottom left vertex of lies under the line ; - the top side of and the bottom side of are 5 units apart, and the bottom left vertex of lies to the left of the line ; - the bottom left coordinate of is with , and . We see that the first two cases are symmetric, so consider the case where the left edge of lies on the line . When this is true, the maximum distance will be achieved between and the upper right vertex of . The upper right vertex can achieve the points where , and so . The other case we have to consider is when the bottom left vertex of , is above and to the right of , in which case the maximum distance is achieved from and the upper right vertex of . This distance is , which, by the triangle inequality, is at most . Since equality holds when , the largest possible maximum here is , and the difference between the largest and smallest possible values of is .