Started to look into it, but wouldn't reply until I was sure I had a solution.
Like the former replyer, I have dificulties understanding the bullet 5 in your description, but the rest is fullfilled. But my code example is around 300 lines of code, so I think it would be more appropriare if I mail it directly to you. If more people are interested, I can put it on my homepage for download. Code is build on the following: Go through all raflle's and pick a number for each column Go through the remaining numbers and allocate the to a raffle Go through all raffles and distribute columns starting with those with three numbers, those with two number and finally those with one number I have no mathematical proof for complete randomnes, and the procedure will fail in allocating all numbers from time to time, where you just will have to run the routine again /Kaj --- In [email protected], "Prof. Stevan Djuranovic" <[EMAIL PROTECTED]> wrote: > Hi, > > I need some tips (idea) for creating software to generate > raffle tickets. > > These are conditions: > > 1) Numbers from 1 to 90 must be allocated in 6 grids. > Each grid has 9 rows and 3 columns. > > 2) Every grid has 12 blank fields: 4 in each row, but every > column must have at least one number. > (in one row there must be 5 numbers and 4 blank fields) > > 3) At the end of one ticket (it has 6 grids - 6 raffle tickets) there must be exactly > 90 different numbers (from 1 to 90) with 72 blank fields. > > 4) Numbers in every column must be sorted. It can hold number, than > blank field and number again. It doesn't matter. > > Like this (this is one grid - one raffle): > > ------------------------------------------------------------------- > | 1 | | 20 | 33 | | | 66 | 73 | | > ------------------------------------------------------------------- > | | 13 | 25 | 39 | | 55 | | 74 | | > ------------------------------------------------------------------- > | 5 | | | | 40 | 57 | 68 | | 90 | > ------------------------------------------------------------------- > > 5) I have 4 sets of numbers that must fill in these grids. > In one set there are 6 numbers and these numbers must be > allocated in 6 grids. One in each grid. Whole 4 sets must > fit in 6 grids. > > 6) First column in each grid has numbers fro 1 to 9 > Second from 10 to 19 > Third from 20 to 29 > ... > Eight from 70 to 79 > Ninth from 80 to 90 > > I just need some tips, but code or link would be nice. > I have code to random generate 90 different numbers, but I > have no idea how to allocate with conditions described above. > > Thanks. > > P.S. > I dont speak English very well. I hope you will understand. > > > --------------------------------- > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > > [Non-text portions of this message have been removed] ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

