Question: Suppose you have N items with weights w 1 , . . . , wN 0 . Let [ N ] = { 1 ,
Suppose you have N items with weights w wN Let N N and for
any set S N define wS P
j in S wj In the problem SPLITEVEN, we are given such
a collection w wN and the goal is to partition N into sets S S and S so that
maxwS wS wS is minimized.
For this problem, we consider the following greedy strategy:
Initialize sets S S S to be empty sets.
For i to N
Let j in be such that wSj has the least weight among S S and S
ties can be broken arbitrarily
Add the ith item to the set Sj
Output the sets S S and S
To analyze the performance, let OPT denote the cost of the best solution ie OPT
minJJJ maxwJ wJ wJ where J J J ranges over all partitions of N
a points Prove that OPT P
j wj and OPT maxj wj
b points Assume without loss of generality that when our algorithm terminates, wS
maxwS wS wS Suppose was the last index added to S Prove that wSw
PN
j wj
c points From a and b prove that wS OPT.
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
