Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter 35, Problem 7P

a

Program Plan Intro

To argue that the solution to instance I of the 0-1 knapsack problem is one of {P1,P1,.......,Pn} .

b

Program Plan Intro

To prove that an optimal solution Qj can be found to the fractional problem using the greedy algorithm.

c

Program Plan Intro

To prove that that an optimal solution Qj can be always constructed to the fractional problem for instance Ij that includes at most one item fractionally.

c

Program Plan Intro

Toprove that υ(Rj)υ(Qj)/2υ(Pj)/2 .

d

Program Plan Intro

To give a polynomial-time algorithm that returns a maximum-value solution from the set {R1,R2,......,Rn} and also prove that the algorithm is a polynomial time 2-approximation algorithm for the 0-1 knapsack problem.

Blurred answer
Students have asked these similar questions
Exercise 4 20= 10+4+6 The rod-cutting problem consists of a rod of n units long that can be cut into integer-length pieces. The sale price of a piece i units long is Pi for i = 1,...,n. We want to apply dynamic programming to find the maximum total sale price of the rod. Let F(k) be the maximum price for a given rod of length k. 1. Give the recurrence on F(k) and its initial condition(s). 2. What are the time and space efficiencies of your algorithm? Now, consider the following instance of the rod-cutting problem: a rod of length n=5, and the following sale prices P1=2, P2=3, P3-7, P4=2 and P5=5.
There are n people who want to carpool during m days. On day i, some subset si ofpeople want to carpool, and the driver di must be selected from si . Each person j hasa limited number of days fj they are willing to drive. Give an algorithm to find a driverassignment di ∈ si each day i such that no person j has to drive more than their limit fj. (The algorithm should output “no” if there is no such assignment.) Hint: Use networkflow.For example, for the following input with n = 3 and m = 3, the algorithm could assignTom to Day 1 and Day 2, and Mark to Day 3. Person Day 1 Day 2 Day 3 Limit 1 (Tom) x x x 2 2 (Mark) x   x 1 3 (Fred)   x x 0
There are n people who want to carpool during m days. On day i, some subset ???? of people want to carpool, and the driver di must be selected from si . Each person j has a limited number of days fj they are willing to drive. Give an algorithm to find a driver assignment di ∈ si each day i such that no person j has to drive more than their limit fj. (The algorithm should output “no” if there is no such assignment.) Hint: Use network flow. For example, for the following input with n = 3 and m = 3, the algorithm could assign Tom to Day 1 and Day 2, and Mark to Day 3. Person Day 1 Day 2 Day 3 Driving Limit 1 (Tom) x x x 2 2 (Mark) x   x 1 3 (Fred)   x x 0
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning