On Dec 15, 2008, at 3:44 PM, steven shingler wrote: > On Mon, Dec 15, 2008 at 3:31 PM, Matthew Moss <matt / moss.name> wrote: > >> >> On Dec 15, 2008, at 9:19 AM, peter / rubyrailways.com wrote: >> >> Is it possible to post a solution already? (I guess the question is >>> poetical, just strange that no one posted one yet - was it so >>> hard, or no >>> one has time amidst the pre-XMas craze, or... ?) >>> >> >> Perhaps a little harder than it may appear, or as you suggest, >> people may >> be busy. In the worst case, a brute force solution should be easy >> to do. > > > Seeing as how this quiz has been so quiet, here's a v quick (and > very brute > force!) attempt: http://pastie.org/339925 - - please be kind! :) Minor point... I probably wasn't clear by "minimize group duplication." In your code, you use dup_count in an attempt to avoid having a particular recipient's gift contain duplication candles. Actually, I like this requirement, although it wasn't what I meant. (Other subs: please try and make each gift without candle duplication.) What I meant is that if I give Janet garden/lavender/orange, I should not also give Nancy garden/lavender/orange. I want a distinct combination for each recipient.