Question: 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

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

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

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!