This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Fall 11: CSci 5421—Advanced Algorithms and Data Structures Sample Solution (Prepared by Ravi Janardan) This writeup illustrates what is expected by way of a solution for a problem involving the design and analysis of an algorithm (cf: Instructions for Hw1). This is meant to be illustrative only, and is not set in stone, so feel free to modify this for your purposes. The key is to generate an answer that communicates the main ideas effectively and is easy for others to understand. Problem: Let S be a set of n points, p i = ( x i ,y i ) , 1 ≤ i ≤ n , in the plane. A point p j ∈ S is a maximal point of S if there is no other point p k ∈ S such that x k ≥ x j and y k ≥ y j . The figure below illustrates the maximal points of a pointset S . Note that the maximal points form a “staircase” which descends rightwards. Maximal point Nonmaximal point Give an efficient divide–and–conquer algorithm to determine the maximal points of S . Your answer should include (i) a clear description of the main ideas and the data structures used, which makes the correctness selfevident, (ii) pseudocode for the algorithm (at the level of detail...
View
Full
Document
This note was uploaded on 01/28/2012 for the course CSCI 5421 taught by Professor Sturtivant,c during the Fall '08 term at Minnesota.
 Fall '08
 Sturtivant,C
 Algorithms, Data Structures

Click to edit the document details