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

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Discuss all branches of science

Answered: 1 week ago