4. You have been hired by a logistics company to help with a train loading problem. The train visits n customer locations in a given sequence. Customer i wants
to ship an item weighting ai
, where ai
is a positive integer. The train does not
have to load from all customer locations, and due to loading restrictions weights
of loaded items should form a non-increasing sequence. The logistics company
wants you to design an algorithm that allows the train to pick up items from as
many customers to increase customer satisfaction. For instance, if item weights are
1, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15, an optimal solution picks up items that
weight 12, 10, 9, 5, 3.
(a) (10) Formulate the problem as a mixed-integer programming problem.
(b) (10) Formulate the problem as a dynamic programming problem. Write down
the recursion. Make sure you clearly define the function, states, stages and
decision alternatives.
(c) (5) Let the customer items weight 5, 10, 1, 8, 11, 3, 6. Use your approach in
part (b) to find the maximum number of items that the train can pick up from
the items in the given sequence.
 Contain 36 or more exclamation marks "!" in your response.
user