N items are to be processed with two product lines. YY operates the first line, and LMY operates the second. YY can use X processing modes for the first product
line, with his ith mode, processing an item costs Ai units of material while the item’s value increases by Pi units. Similarly LMY can use Y modes for the second
product line, with her ith mode processing an item will cost Bi units of material and get Qi units of value increment. All items must be processed in both of the
product lines, each with one of their modes, to satisfy both YY and LMY. Note that when processing an item with some mode of a product line, the cost and value
increment are totally irrelevant to the mode chosen in the other line. YY and LMY want the value increment of the items to be maximized, but there are only M
units of material available. So they have to choose their modes carefully, use no more than M units of material and still make the value increment as large as possible.