This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Introduction to Algorithms Solution Set 9 CS 482, Spring 2008 (1) Let T be the number of trucks used by the algorithm, and suppose the trucks are labeled 1 , 2 ,...,T in the order that the algorithm loads them up. Observe that for i = 1 , 2 ,...,T 1, the combined weight in trucks i and i + 1 must be at least K + 1; otherwise the first item that was loaded into truck i + 1 would actually have fit in truck i , violating the specification of the algorithm. We group the trucks into P = d T/ 2 e pairs: trucks 1 and 2, trucks 3 and 4, etc. By our previous observation, each of the first P 1 pairs of trucks contains a combined weight of at least K + 1. So the combined weight of all the items is at least ( P 1)( K + 1) . If W denotes the combined weight of all the items and OPT denotes the minimum possible number of trucks, then OPT W/K ( P 1) K + 1 K > P. Hence OPT P T/ 2, which proves that the algorithm is a 2approximation. (2) (a). Set Cover . Given a universal set U and a collection of subsets S 1 ,S 2 ,...,S m U , what is the minimum size of a subcollection { S i 1 ,S i 2 ,...,S i k } whose union is U ?...
View
Full
Document
This note was uploaded on 10/02/2008 for the course CS 482 taught by Professor Kleinberg during the Spring '08 term at Cornell University (Engineering School).
 Spring '08
 KLEINBERG
 Algorithms

Click to edit the document details