hw2 - S l n 3 input points lying between L l and L...

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

View Full Document Right Arrow Icon
CSE 413, Analysis of Algorithms Fall Semester, 2004 Assignment 2: Big-O Notation and Recurrence Relations Due Date : Sept. 17, 2004 (at the beginning of CSE 413 class) 1. Exercise 3.5, page 56. (20 points) 2. Solve the following recurrence relation. Give a tight close-form solution (in the big-O nota- tion). T ( n )= T ( n 2) + T (2) + a n, if n> 2 T ( n )= b, if n 2 where a and b are some positive constants. (15 points) 3. Exercise 3.20, page 58. (20 points) 4. Consider the problem of computing the convex hull of n input points in the plane as discussed in class. In particular, consider the following version of the algorithm. —————————————————————– If n 3, then return the (easy) convex hull of the input points; otherwise, perform the following steps: (1) In the “divide” step, Fnd two vertical lines L l and L r , L l lying to the left of L r , such that there are n/ 3 input points lying to the left of L l (denoted by the subset
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: S l ), n/ 3 input points lying between L l and L r (denoted by the subset S m ), and n/ 3 input points lying to the right of L r (denoted by the subset S r ); (2) recursively compute the convex hull of each of the three subsets S l , S m , and S r ; (3) in the “combine” step, compute and return the convex hull of the n input points from the convex hulls of S l , S m , and S r . —————————————————————– We assume that in the above algorithm, Steps (1) and (3) together take no more than a ∗ n 2 time for some constant a > 0. You are asked to do the following. (i) Model the running time of the above algorithm by a recurrence relation. (10 points) (ii) Solve your recurrence relation by giving a tight close-form solution (in the big-O notation). (15 points) Total Points : 80...
View Full Document

This note was uploaded on 01/06/2012 for the course MANAGEMENT 000 taught by Professor 游啟璋 during the Spring '11 term at National Taiwan University.

Ask a homework question - tutors are online