Question: [ 3 pts ] Suppose you are given a set of positive integers = { 1 , 2 , . . . , } and
pts Suppose you are given a set of positive integers and a positive integer
A subset is called feasible if the sum of the numbers in does not exceed ie
in
The sum of the numbers in will be called the total sum of You would like to select a feasible
subset of whose total sum is as large as possible.
Here is the algorithm:
Initially
Define
For
If
then
Endif
EndFor
apt Give an instance in which the total sum of the set returned by this algorithm
is less than half the total sum of some other feasible subset of
bpts Give a polynomialtime approximation algorithm for this problem with the
following guarantee: It returns a feasible set whose total sum is at least half
as large as the maximum total sum of any feasible set Your algorithm should
have a running time of at most log
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
