34-2 Bonnie and Clyde

Bonnie and Clyde have just robbed a bank. They have a bag of money and want to divide it up. For each of the following scenarios, either give a polynomial-time algorithm, or prove that the problem is NP-complete\text{NP-complete}. The input in each case is a list of the nn items in the bag, along with the value of each.

a. The bag contains nn coins, but only 22 different denominations: some coins are worth xx dollars, and some are worth yy dollars. Bonnie and Clyde wish to divide the money exactly evenly.

b. The bag contains nn coins, with an arbitrary number of different denominations, but each denomination is a nonnegative integer power of 22, i.e., the possible denominations are 11 dollar, 22 dollars, 44 dollars, etc. Bonnie and Clyde wish to divide the money exactly evenly.

c. The bag contains nn checks, which are, in an amazing coincidence, made out to "Bonnie or Clyde." They wish to divide the checks so that they each get the exact same amount of money.

d. The bag contains nn checks as in part (c), but this time Bonnie and Clyde are willing to accept a split in which the difference is no larger than 100100 dollars.

(Omit!)