{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw6 - Cs445 Homework#6 Network Flow Computational Geometry...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Cs445 — Homework #6 Network Flow, Computational Geometry and Dynamic Programming Due: 5/3/2005 during class meeting. 1. Run the for line-sweep algorithm for finding if two segments intersect for the example in Figure 1. s 1 s 2 s 3 s 4 s 5 Figure 1: 2. In the Graham-scan algorithm for computing CH ( S ), what is the maximum number of pop operations that can be executed when the algorithm reaches the i ’th point ? 3. Let V [1 ..n ] be an array containing the vertices { v 1 . . . v n } of a convex P , in a clocckwise order. See figure 2. Assume that no edge of the polygon is vertical. Prove that the rightmost point of P is a vertex of P , and describes a function that recieves as input pointers to the first and last elements of V , and returns 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 v 9 v 10 P Figure 2: Example: The rightmost point of P is v 3 as output the rightmost vertex of V (the vertex with the largest x -coordinate). Assume that V is already in memory, and you do need to spend time processing the whole array. The running time of the function is
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}