sample - Fall 11: CSci 5421—Advanced Algorithms and Data...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Fall 11: CSci 5421—Advanced Algorithms and Data Structures Sample Solution (Prepared by Ravi Janardan) This write-up 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 point-set S . Note that the maximal points form a “staircase” which descends rightwards. Maximal point Non-maximal 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 self-evident, (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.

Page1 / 2

sample - Fall 11: CSci 5421—Advanced Algorithms and Data...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online