This preview shows page 1. Sign up to view the full content.
Unformatted text preview: for the fractional knapsack problem based on a greedy method. ( 20 points ) 2. Problem 10.19, page 339. ( 20 points ) 3. Problem 5.20, page 116. Also, prove that the partition problem is in the class of NP. ( 25 points ) 4. Consider the following constrainedlength path problem : Given a positive integer L , a directed graph G = ( V, E ) such that every edge of G has a nonnegative integer weight, and two vertices s and t in G , determine whether there is a simple directed stot path in G whose length (i.e., the total sum of weights of edges on the path) is exactly L . You are asked to do the following: (1) Prove that the constrainedlength path problem is in the class of NP. ( 10 points ) (2) Prove that the constrainedlength path problem is NPcomplete. (Hint: You may assume that the 01 knapsack problem is known to be NPcomplete and transform the 01 knapsack problem to this problem deterministically in polynomial time.) ( 15 points ) Total Points : 90...
View Full
Document
 Spring '11
 游啟璋

Click to edit the document details