Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

11. Consider the sweep-line algorithm for a set S = {s... Sn} of n segments (not necessarily horizontal or vertical). Assume that you stopped the

image text in transcribed

11. Consider the sweep-line algorithm for a set S = {s... 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 si 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, s, 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 = {s... 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 si 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, s, 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

Compare levels of resolution in conflict outcomes?

Answered: 1 week ago

Question

Strategies for Managing Conflict Conflict Outcomes?

Answered: 1 week ago