1 / 61

Homework # 1~4(5) Review

Homework # 1~4(5) Review. Grading. 10 points for each homework. Exercise 5.1. Recurrence equation Master theorem Substitution method Lower bound for kd -tree query time :. Exercise 5.1. An example for the lower bound. Query range. Exercise 5.3. Kd-tree in d-dimensional space.

haracha
Download Presentation

Homework # 1~4(5) Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Homework #1~4(5) Review

  2. Grading • 10 points for each homework

  3. Exercise 5.1 • Recurrence equation • Master theorem • Substitution method • Lower bound for kd-tree query time :

  4. Exercise 5.1 • An example for the lower bound Query range

  5. Exercise 5.3 • Kd-tree in d-dimensional space

  6. Exercise 5.3 • Query time analysis • for reporting points where T(n) is number of internal nodes visited by the query • query time : • Constructuion time :

  7. Exercise 5.10 • Range counting queries in the range tree • Simply label each nodes in the construction time that how many leaves it has as its descendant • (c) - fractional cascading • Generalize our 2d fractional cascading to d-dimension recursively

  8. Exercise 2.10 • Skip! • Usual plane sweep algorithm • See in Ex 6.8

  9. Exercise 6.2 Query point

  10. Exercise 6.8 • Deterministic algorithm for computing the trapezoidal map • Plane sweep algorithm

  11. Exercise 6.8 • Event queue Q : endpoints sorted by x coordinate • Balanced binary tree • Sweep line status S : set of segments intersecting the sweep line in sorted order (from top to bottom) • Balanced binary tree • Output T : trapezoidal map of given line segments

  12. Exercise 6.8 • Add the endpoints of segments to Q (sorted order) 8 2 5 3 11 7 4 1 6 10 9

  13. Exercise 6.8 • Add bounding horizontal lines to S 8 2 5 3 11 7 4 1 6 10 9

  14. Exercise 6.8 • Extract min event 8 2 5 3 11 7 4 1 6 10 9

  15. Exercise 6.8 • If the event point is a left endpoint, add its segments to S 8 2 5 3 11 7 4 1 6 10 9

  16. Exercise 6.8 • Draw a vertical extension between two surrounding line segments in S 8 2 5 3 11 7 4 1 6 10 9

  17. Exercise 6.8 • Draw a vertical extension between two surrounding line segments in S } 8 2 5 3 11 7 4 1 6 10 9

  18. Exercise 6.8 • Draw a vertical extension between two surrounding line segments in S } 8 2 5 3 11 7 4 1 6 10 9

  19. Exercise 6.8 • Right endpoint event } 8 2 5 3 11 7 4 1 6 10 9

  20. Exercise 6.8 • Delete its segment in S } 8 2 5 3 11 7 4 1 6 10 9

  21. Exercise 6.8 • Delete its segment in S } 8 2 5 3 11 7 4 1 6 10 9

  22. Exercise 6.8 • Repeat until Q becomes empty } 8 2 5 3 11 7 4 1 6 10 9

  23. Exercise 6.8 • Analysis • Sorting : • One left endpoint event : • One right endpoint event : • Total :

  24. Exercise 6.12 • 5 possible cases • ① line is contained in a trapezoid

  25. Exercise 6.12 • 5 possible cases • ②~④ line is contained in several trapezoids

  26. Exercise 9.13~15

  27. Exercise 9.13~15

  28. Exercise 9.13~15

  29. Exercise 9.13~15

  30. Exercise 9.13~15

  31. Exercise 9.16 • : maximize the minimum distance between cluster • Draw a circle with diameter pq. If is not a Delaunay edge, There must be a point r inside the circle. - r is in or - r isin other partitions in both cases, contradiction

  32. Exercise 9.16 • : maximize the minimum distance between cluster (b) - Each point becomes a partition itself (n partitions) - Compute Delaunay triangulation - Sort the set of Delaunay edges by its distance in increasing order - while there are k partitions extract the minimum distance Delaunay edge merge two partition(if possible) using the edge

  33. Exercise 4.14

  34. Exercise 4.14 • Worst case : • when we pick elements in decreasing order • Recurrence equation Probability that the maximum element is picked

  35. Exercise 4.14 • Worst case : • when we pick elements in decreasing order • Recurrence equation Probability that the maximum element is picked If the maximum, m, is picked first, it must be bigger than or equal to the return value of PARANOIDMAXIMUM(A\{m}), so we have to compare m with all other elements =>

  36. Exercise 4.14 • Worst case : • when we pick elements in decreasing order • Recurrence equation Probability that the maximum element is not picked The picked element p must be smaller than the return value m of PARANOIDMAXIMUM(A\{p}), so we just return m =>

  37. Exercise 4.15 • A simple polygon P is star-shaped if and only if the intersection of halfplanes, each of which has its boundary as an edge of P and heading inside of the polygon with respect to that edge is nonempty. • Pf) =>) p must be in the intersection <=) any point in the intersection satisfies the star -shaped condition

  38. Exercise 4.15

  39. Exercise 4.15

  40. Exercise 4.15

  41. Exercise 4.15

  42. Exercise 4.15 Objective function

  43. Exercise 4.15 Objective function

  44. Exercise 8.1 • Incident preserving • (=>) , so . • (<=) , so . • Order preserving • (=>) b > ma + n , so –n > am – b. • (<=) –n > am – b, so b > ma + n.

  45. Exercise 8.2 • The line segment can be expressed as . • The dual transform of these points are infinite set of lines, . • It forms a left-right double wedge, which is bounded by .

  46. Exercise 8.7 • Line separator between two sets of points • Using duality transform!!

  47. Exercise 11.8 • Halfplane intersection using a conflict graph

  48. Exercise 11.8 • Pick two halfplanes randomly, and initialize Halfplanes not inserted yet Current intersection

  49. Exercise 11.8 • Pick two halfplanes randomly, and initialize Halfplanes not inserted yet Current intersection

More Related