This is a challenge about the collection of far too much, and what to do with it. It involves a lot of combinatorics and algebra.
Halloween! Perhaps it would be better if there wasn’t candy involved. It causes … problems. But alas: you went and got far too much. Now you face the consequences: you need to sort the candy, and of course, there’ll be one kind of candy that is your favourite, and you’ll have none of it. And then there’ll be another kind that you have scores of, but hate. This is when you’ll have a brilliant idea: trade! However, you run into a problem. Each trade benefits both parties, but how to determine if the benefit is equal? Does it matter? When you were less unlucky with candy, or just were too young to worry about this sort of thing, it was easy. But with enough effort, we can make it hard:
- The value of a candy is inversely proportional to how many of it you already have
- The optimal value would be achieved by distributing each type of candy equally
- You have some of more kinds of candy than others, as do your friends—but they have different kinds.
- You can trade a collection of candy for another by mutual agreement
- Since you’re so clever, you can make any binding agreement about exchanges of candy.
- You can waste as much time as you like discussing the sharing of your candy
If the first candy of any type provides a value of 1, determine the value that would currently be achieved, the optimal total value if candy is distributed equally, and the total value that will be achieved by rational exchange, for the following assortment:
Candy | Alice | Bob | Carol |
---|---|---|---|
A | 4 | 2 | 0 |
B | 2 | 1 | 6 |
C | 3 | 6 | 0 |
D | 1 | 1 | 4 |