cs601_homework6

cs601_homework6 - CS601: HW 6 Solutions October 6, 2009 1...

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

View Full Document Right Arrow Icon
CS601: HW 6 Solutions October 6, 2009 1 (a) KT11.1 Give an example where the greedy algorithm does not use the minimum possible weights. Sol. Weights: 4,3,2,1 K = 5. Optimal is 2 but greedy uses 3 trucks. 1 (b) Show that greedy algorithm is at most twice as worse as the optimal Sol. Any consecutive trucks ( T i ,T i +1 ) must together have a load strictly greater than K , otherwise T i +1 ’s load could have been put in T i itself. Suppose the algorithm returns l trucks as the answer. We know that the total load is strictly greater than 0 . 5 * l * K . Hence atleast d 0 . 5 l e trucks must have been used in the optimal solution. 2 KT11.2 Give an algorithm that approximates the minimum representative set to within a factor of O (log n ) . Sol. We transform this problem to Set Cover as follows: The elements of the universal set corresponds to different proteins. For each protein i create a subset S i that contains all proteins which are within a distance of Δ from i . We know how to solve set cover within an approximation factor of
Background image of page 1

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

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

This note was uploaded on 01/04/2010 for the course CSE CS601 taught by Professor Prof.ranade during the Summer '09 term at IIT Bombay.

Page1 / 2

cs601_homework6 - CS601: HW 6 Solutions October 6, 2009 1...

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