Question: 7. Let P, Q be two polygonal paths, each with n vertices. Fix the length of the leash to be r. Note that if Frechet(P,

7. Let P, Q be two polygonal paths, each with n vertices. Fix the length of the leash to be r. Note that if Frechet(P, Q.r) = NO then for every " r (longer leash) then Frechet(P, Q,r') = YES. Use this fact to propose a pseudo-code of an algorithm that starts with two values rmin, rmax, where rmin = 0 and rmax is the maximum distance between any two vertices pi P and 4; Q. Prove that Frechet(P, Q, rmar) = YES. Next suggest an iterative algorithm to find a value r*, such that Frechet(P, Q,r*) = YES but Frechet(P, Q,p* 1) = NO. Show that your code calls Frechet(P, Q,r) only O(log(rmax)) many times, and that the overall running time of your your algorithm is (n2 log (rmax)). 7. Let P, Q be two polygonal paths, each with n vertices. Fix the length of the leash to be r. Note that if Frechet(P, Q.r) = NO then for every " r (longer leash) then Frechet(P, Q,r') = YES. Use this fact to propose a pseudo-code of an algorithm that starts with two values rmin, rmax, where rmin = 0 and rmax is the maximum distance between any two vertices pi P and 4; Q. Prove that Frechet(P, Q, rmar) = YES. Next suggest an iterative algorithm to find a value r*, such that Frechet(P, Q,r*) = YES but Frechet(P, Q,p* 1) = NO. Show that your code calls Frechet(P, Q,r) only O(log(rmax)) many times, and that the overall running time of your your algorithm is (n2 log (rmax))