Gate2018 cs Q45

  • Option : C
  • Explanation :
    Item No.WeightValueValue/Weight
    110606
    27284
    34205
    422412
    After Sorting
    Item No.WeightValueValue/Weight
    122412
    210606
    34205
    47284
    First, we have to Pick item_1 (Value weight ratio is highest).
    After that Second highest is item_1. but cannot be picked because of its weight.
    Now item_3 shall be picked. item_2 cannot be included because of its weight.
    Therefore, overall profit by Vgreedy = 20+24 = 44
    Hence, Vopt – Vgreedy = 60-44 = 16
    So, answer is 16.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *