Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are building software that detects when aircrafts are too close in proximity. The software must calculate the minimum distance between any two planes so

image text in transcribed

You are building software that detects when aircrafts are too close in proximity. The software must calculate the minimum distance between any two planes so that if there are any flights that are less than some minimum allowable safe distance, air traffic controllers can be alerted. The locations of planes will be represented with (x,y) coordinate points (height/altitude will be ignored). The distance will be determined using standard Euclidean distance (d((x1,y1),(x2,y2))=(x1x2)2+(y1y2)2). Design and implement an algorithm that determines the minimum distances between any two distinct planes. Make sure the solution has an empirical runtime within constant factors of an O(nlog2(n)) reference solution ( n is the \# of points). To test your knowledge on recursive divide and conquer algorithms, consider the following based on the task above. How will you divide the input spatially in terms of x and y ? How will you combine the results if you recurse on both divided sides? Finally, is there anything that needs to be verified other than the two recursive results? Code this algorithm in Python under the filename closest.py. Define a top level function with the signature def minimum_distance(points). The input points will be a list of tuples of (x,y) coordinate pairs (for example [(0,0),(2,2.5),(3,1.5)]). The final function should return the minimum Euclidean distance between any pair of points. (the earlier input example should return since that is the distance between (2,2.5) and (3,1.5)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions