Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2. (25 points) segment intersection example This question is about the intersectionenumeration algorithm we covered in class, when the input to the algorithm consists

image text in transcribedimage text in transcribed

Question 2. (25 points) segment intersection example This question is about the intersectionenumeration algorithm we covered in class, when the input to the algorithm consists of the line segments shown in Figure 2 below, whose three pairwise intersections have been named "a" to "c". 1. List the three intersection points in the order they are output by the intersection-enumeration algorithm. 2. It is possible for the algorithm to detect an intersection more than once; of course it would insert it in the event data structure only if it is not already there (i.e., it is the first time the intersection is encountered, in which case it also outputs it) (a) List the intersections that are discovered more than once for the segments in Figure 2, and for each such intersection state how many times it is discovered by the algorithm. (b) Draw an example of n segments and a single intersection between two of them, in which that intersection is discovered n1 times by the intersection-enumeration algorithm (your example must work for any n, not just for a small value of n ). (c) Briefly explain why the existence of multiple discoveries of the same intersection does not invalidate the claim of O(nlogn+tlogn) time performance for the algorithm, where t is the number of distinct intersections. Figure 2: The input segments for question 2

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_2

Step: 3

blur-text-image_3

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions

Question

What is the tax advantage for a company thatqualifies as a REIT?

Answered: 1 week ago

Question

What are network-monitoring tools? What do they do?

Answered: 1 week ago