From: "Christoffer Lernö" Date: 2007-02-19T07:52:38+09:00 Subject: Re: [QUIZ] Housie (#114) Oops. Missed out the requirement that each column should be filled. Embarassing. Sorry about that folks. /Christoffer On Feb 18, 2007, at 18:33 , Christoffer Lern� wrote: > My solution drops the numbers 1-90 into the tickets at random. If > there are more than 3 numbers of the same column for a ticket, or > it already has 15 numbers then it kicks out one of its other > numbers at random. This number is put back to be distributed to > some other ticket. > > After all the numbers are distributed, each Housie generates itself > using the values it has been given. It will add one number at a > time to the row with the least amount of numbers. If two rows have > the same amount of numbers then their positions will be chosen > randomly. > > I also included a method to generate a single ticket. > > The code got a bit messier than I'd like it, but it avoids brute > force-generation and seem to generate tickets quickly. >