From: Antonio Cangiano Date: 2006-02-06T10:13:20+09:00 Subject: Re: [QUIZ] Splitting the Loot (#65) Stu Glaser wrote: > Actually, it's more closely related to the Partition problem (which is > also NP-Complete). (In fact, the 2-person instance is the Partition > problem). Subset Sum and Partition problem are similar, I agree that this quiz is closer to a Partition problem. However, if we consider the Subset Sum problem: given a set of integers and an integer k, find a subset whose sum is k? We can apply a subset sum algorithm to find the possible subset that sums to the fair share for the first "pirate", and then work in the same way on the remaining elements for the other pirates. Cheers, Antonio -- Zen and the Art of Ruby Programming http://antoniocangiano.com