Algorithms

Spring 2007
course
navigation

feb 12

project

convex hull

points x[i], y[i] in two dimensions, 0 <= i <= N-1

Procedure

loop over pairs (i != j) * Find (a,b,c) such that "a x + b y = c" is line through points i and j. * loop over other points k Set sign = (a x[k] + b y[k] - c) for 1st k Fail if same formula has other sign for other k's. * If success, save that (i,j) as part of convex hull

Math details

a x1 + b y1 + c = 0 a x2 + b y2 + c = 0

knapsack and assignment problems

start divide and conquer ?

http://cs.marlboro.edu/ courses/ spring2007/algorithms/ notes/ feb_12
last modified Monday February 12 2007 1:53 pm EST