hw2-2010

# hw2-2010 - Recurrences, Divide and Conquer October 7, 2010...

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Recurrences, Divide and Conquer October 7, 2010 Homework 2 Due Date: Thursday, 14 October 2010 by end of lecture. Problem 2-1. (30pts) Give asymptotic upper and lower bounds for T ( n ) in each of the following recurrences. Assume that T ( n ) is constant for n 2 . Make your bounds as tight as possible, and justify your answers. 1. T ( n ) = 2 T ( n/ 4) + n 2. T ( n ) = 7 T ( n/ 3) + n 2 3. T ( n ) = T ( n- 2) + log n 4. T ( n ) = 3 T ( n ) + log n 5. T ( n ) = nT ( n ) + n 6. T ( n ) = T ( n/ 3) + T ( n/ 5) + ( n ) Problem 2-2. (20pts) You are given n points on a plane by their x-y coordinates. Point i is specified by ( x i , y i ) . The goal is to find 3 points a, b , and c that minimize sum of the three distances (distance from a to b plus distance from b to c plus distance from a to c ). Show how to modify the Closest pair of points algorithm presented in class to solve this problem. Prove correctness and analyze running time. Brute-force algorithms will not get any points.this problem....
View Full Document

## This note was uploaded on 02/01/2011 for the course MATH 171 taught by Professor R during the Spring '09 term at Stanford.

Ask a homework question - tutors are online