Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In python Input: A positive integer n and a set s={(x1y1),(x2y2),b2(xnyn)}of n points in the plane. Output: a) The shortest distance between a pair of
In python
Input: A positive integer n and a set s={(x1y1),(x2y2),b2(xnyn)}of n points in the plane. Output: a) The shortest distance between a pair of these points together with the two points in s that are that distance apart as found using the brute force algorithm. b) The shortest distance between a pair of these points together with the two points in s that are that shortest distance apart, as found by the recursive algorithm described in the book. Implementation Details Round the reported shorted distance in the outputs to the nearest ten-thousandth (4decimal places). You must build both of these algorithms from scratch in python or visual basic (using Visual Studio) and the algorithm that produces the output in b) must be recursive and basically follow the book's description. The input your program should be able to accept will be probably be a txt file with the first line representing the integer n and each new line consisting of two real numbers separated by a comma that represent, respectively, an x-coordinate and a y - coordinate. I will have my own data set that you will not have access to that I run your program on Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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