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, 23.06.2019 16:00
Helen is having a meeting with her colleagues in her company. they are working on the goals and objectives for the coming year. they want to ensure that these goals and objectives of the processes involved are properly evaluated. which system can helen and her colleagues apply to evaluate this? helen and her colleagues require a blank to evaluate the goals and objectives.
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
How many points do i need before i can send a chat
Answers: 1
question
Computers and Technology, 24.06.2019 05:00
Who is most likely be your target audience if you create a slide presentation that had yellow background and purple text
Answers: 2
You know the right answer?
Givennpoints in the plane, theconvex hullis the list of points, in counter-clockwise order, that des...
Questions
question
Mathematics, 26.11.2019 23:31
question
Mathematics, 26.11.2019 23:31
Questions on the website: 13722367