1 / 6

RAIK 283: Data Structures & Algorithms

RAIK 283: Data Structures & Algorithms. Divide and Conquer (III)* Dr. Ying Lu ylu@cse.unl.edu. * slides referred to http://www.aw-bc.com/info/levitin. Divide and Conquer Example. Closest-pair problem Presentation Slides by Tsvika Klein . Divide and Conquer Example.

elie
Download Presentation

RAIK 283: Data Structures & Algorithms

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. RAIK 283: Data Structures & Algorithms Divide and Conquer (III)* Dr. Ying Lu ylu@cse.unl.edu *slides referred to http://www.aw-bc.com/info/levitin Design and Analysis of Algorithms – Chapter 5

  2. Divide and Conquer Example • Closest-pair problem • Presentation Slides by Tsvika Klein Design and Analysis of Algorithms – Chapter 5

  3. Divide and Conquer Example • Convex-hull problem • Application Domain: • computer visualization, ray tracing, path finding in AI, GIS, visual pattern matching, verification methods, etc. Design and Analysis of Algorithms – Chapter 5

  4. Divide and Conquer Example • Convex-hull problem • Presentation slides by JoãoComba Design and Analysis of Algorithms – Chapter 5

  5. Pmax P2 P1 QuickHull Algorithm Inspired by Quicksort, it compute Convex Hull: • Identify extreme points P1 and P2 (part of hull) • Compute upper hull (Lower hull computation is similar): • find point Pmax that is farthest away from line P1P2 • compute the hull of the points to the left of line P1Pmax • compute the hull of the points to the left of line PmaxP2 Design and Analysis of Algorithms – Chapter 5

  6. Efficiency of QuickHull algorithm • Finding point farthest away from line P1P2 can be done in linear time • This gives same efficiency as quicksort: • Worst case: Θ( n2) • Average case: Θ( n log n) • Other algorithms for convex hull: • Graham’s scan • DCHull also in Θ( n log n) Design and Analysis of Algorithms – Chapter 5

More Related