MIT6_851S10_assn03_sol

# MIT6_851S10_assn03_sol - time spent searching the WBBST for...

This preview shows pages 1–2. Sign up to view the full content.

6.851 Advanced Data Structures (Spring’10) Prof. Erik Demaine Dr. Andr´ e Schulz TA: Aleksandar Zlateski Problem 3 Sample Solutions Ray Shooting in Simple Polygons With every step we reduce the WBBST total weight of the current subtree by at least a factor of 2. We Fnish once we reach a subtree with weight ω i . Hence, we solve the recurrence T ( ω ) = 1 + T ( ω/ 2). The base case is T ( ω i ) = 1, so we get T (Ω) = O (1 + log i )). Suppose each concave chain in the balanced pseudo-triangulation is stored in a WBBST, where the weight of an edge i equals the number edges in the opposing polygon ω i . We consider two adjacent pseudo-triangles, t a and t b , crossed by the ray in this algorithm. Let i be the edge the ray crosses to move from t a into t b . In t b the ray homes-in on the next edge it crosses, i + 1, in a concave chain, which has at most ω i edges, and so the total

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: time spent searching the WBBST for the home-in chain in tb is O (log( ω i /ω i +1 )). The sum telescopes, and its result is the diﬀerence in the logs of two pseudo-triangle sizes, which is no larger than O (log n ). The ray-shooting algorithm traverses no more than O (log n ) triangles in total, giving the total runtime of O (log n ). 1 MIT OpenCourseWare http://ocw.mit.edu 6.851 Advanced Data Structures Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms ....
View Full Document

## This note was uploaded on 03/31/2011 for the course EECS 6.851 taught by Professor Erikdemaine during the Spring '10 term at MIT.

### Page1 / 2

MIT6_851S10_assn03_sol - time spent searching the WBBST for...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online