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 constrained-length path problem : Given a positive integer L , a directed graph G = ( V, E ) such that every edge of G has a non-negative integer weight, and two vertices s and t in G , determine whether there is a simple directed s-to-t 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 constrained-length path problem is in the class of NP. ( 10 points ) (2) Prove that the constrained-length path problem is NP-complete. (Hint: You may assume that the 0-1 knapsack problem is known to be NP-complete and transform the 0-1 knapsack problem to this problem deterministically in polynomial time.) ( 15 points ) Total Points : 90...
View Full Document
- Spring '11