Answered step by step
Verified Expert Solution
Question
1 Approved Answer
When we discussed the divide and conquer algorithm for finding the closest pair of points in class, it was mentioned that if there were two
When we discussed the divide and conquer algorithm for finding the closest pair of points in class, it was mentioned that if there were two or more points having the same x-coordinate or the same y-coordinate, we could rotate the points so that no two or more rotated points had the same x - or y-coordinates. Note, however, that it is unclear whether the rotation changes the solution to the problem. In other words, it may be possible that the closest pair of points after rotation are not the closest pair of points originally. Show that the above concern is unfounded. That is, show that rotating all of the points by the same angle about the origin does not change the solution. Note that when a point (x,y) is rotated by a counterclockwise angle about the origin, it is moved to (xcosysin,xsin+ycos). (Hint: Consider any two arbitrary points (x,y) and (x,y). What is the distance between the two points? Then rotate the two points by the same counterclockwise angle about the origin. What are the new coordinates of the two rotated points? What is the distance between the two rotated points? How does the new distance relate to the original distance?)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started