Question: in relation to advanced math 11. Consider the sweep-line algorithm for a set S = {81... Sn} of n segments (not necessarily horizontal or vertical).

 in relation to advanced math 11. Consider the sweep-line algorithm for

in relation to advanced math

11. Consider the sweep-line algorithm for a set S = {81... Sn} of n segments (not necessarily horizontal or vertical). Assume that you stopped the algorithm once an intersecting pair is found. There are n(n-1)/2 pairs of segments. However the algorithm does not check every pair for intersection. Only pairs that are consecutive on the sweeping line are checked. If it costs one dollar to check if 8; crosses sj, how many dollar (as as function of n) should you pay in the worst (most expensive) case ? Note that the same pair might be checked multiple times. Give a example of an input where there is a pair of segments Si, 8; and the algorithm checks more than 17 times if they intersect. (the very same pair). 11. Consider the sweep-line algorithm for a set S = {81... Sn} of n segments (not necessarily horizontal or vertical). Assume that you stopped the algorithm once an intersecting pair is found. There are n(n-1)/2 pairs of segments. However the algorithm does not check every pair for intersection. Only pairs that are consecutive on the sweeping line are checked. If it costs one dollar to check if 8; crosses sj, how many dollar (as as function of n) should you pay in the worst (most expensive) case ? Note that the same pair might be checked multiple times. Give a example of an input where there is a pair of segments Si, 8; and the algorithm checks more than 17 times if they intersect. (the very same pair)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!