subject

Givennpoints in the plane, theconvex hullis the list of points, in counter-clockwise order, that describe theconvex shape that contains all the other points. imagine a rubber band is stretched around all of the points: the set of points it touches is the convex hull. in this problem we’ll show that the convex hull problem and sorting reduce to each other in linear time.(a) fill in the following algorithm for convex hull; you do not need to prove it correct. what is its runtime? procedureconvexhull(list of pointsp[1..n])setlow: =the point with the minimumy-coordinate, breaking ties by minimumx-coordinate. create a lists[1..n-1]of the remaining points sorted by increasing angle of vector fromlow. initializehull: = [low, s[1]]forp∈s[2..n-1]doreturnhullthis algorithm reduces convex hull to sorting in linear time: given a sorting subroutine, it allows us tosolve the convex hull problem, with the other steps taking linear time.(b) now, find a linear time reduction from sorting to convex hull. in other words, given a list of realnumbers to sort, describe an algorithm that transforms the list of numbers into a list of points, feedsthem into convex hull, and interprets the output to return the sorted list. then, prove that your reductionis correct. for this problem, do not assume you can do arithmetic operations in constant time: take into accounttheir actual runtime.(c)this part has been removed because it assumes a comparison-based sort. we can’t give a lower-boundfor sorting in general without also considering the lengths (log of magnitudes) of the numbers. giventhatwe’veseenanω(nlogn),whatin formationdoespart(b)? explainbriefly.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:10
When copying and pasting text, the first step is move your cursor type the text select the copy command select the paste command
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
What multimedia system creates an immersive, real-life experience that the user can interact with?
Answers: 1
You know the right answer?
Givennpoints in the plane, theconvex hullis the list of points, in counter-clockwise order, that des...
Questions
question
Mathematics, 28.10.2020 19:30
question
Mathematics, 28.10.2020 19:30