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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:00, abbygriffin2009
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
image
Computers and Technology, 24.06.2019 08:00, ineemorehelp
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
image
Computers and Technology, 24.06.2019 17:00, mrsrobinson1014
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
image
Computers and Technology, 25.06.2019 00:30, alinton06
What is a typeface? a. a collection of similar text b. a collection of similar fonts c. a collection of similar designs d. a collection of similar colors e. a collection of similar images
Answers: 1
You know the right answer?
Givennpoints in the plane, theconvex hullis the list of points, in counter-clockwise order, that des...

Questions in other subjects:

Konu
Mathematics, 16.10.2020 19:01