ta2_question - O ( n log n ) time. Further discussion: (a)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
COMP 271H Design and Analysis of Algorithms 2006 Fall Semester Tutorial 2 Solution 1. You are given a set S of n points in the plane. p S , we use p x and p y to denote its x - and y -coordinates. We assume that p x 6 = q x and p y 6 = q y for any two points p, q S . A point p S is maximal if for any other point q S , q x < p x or q y < p y . Design a divide-and-conquer algorithm to compute the maximal points in
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: O ( n log n ) time. Further discussion: (a) Suppose we know in advance, there are only constant number of maximal points in our solution. Can we design a better algorithm to solve the problem? 1...
View Full Document

This note was uploaded on 12/09/2010 for the course ENGLISH 1303 taught by Professor May during the Spring '10 term at HKU.

Ask a homework question - tutors are online