4. (15%) Bill is having dinner at a bar, where he will order many small plates. There are n plates of
food on the menu, where information for plate i is given by a triple of non-negative integers (vi, ci,
si): the plate's volume v, calories c, and sweetness s ā {0, 1} (the plate is sweet if sā= 1 and not
sweet if s, 0. Now, he wants to eat as much as possible, but no more than k calories this time. He
also wants to order exactly s < n sweet plates, without purchasing the same dish twice. Please
solve this problem using dynamic programming.
(a) Identify the set of subproblems. [5%]
(b) Identify the relationship between subproblems. [5%]
(c) Briefly discuss the time complexity of your DP algorithm. [5%]