Its been a while since i've done any programming, so there may be better ideas mentioned, but I thought i'd at least get the conversation going.
I'm not quite sure if I totally understand your question. You said some of your sets have all 15 numbers duplicated, which cannot happen. Does this mean that some numbers in the sets can be duplicates, just not all 15? If is the former (e.g. all 15 numbers cannot be duplicates) then i'd do some summation of all the numbers (i.e. like an md5 hash or similar) and then check the hash of all 15 numbers in subsequent sets.
Another possibility would be to create an array that holds all the numbers used. RAM is always faster than hard drive accesses, so searching an array for numbers would speed things up (assuming this is not what you are already doing). Then each time a random number pops up, check the array to see if it hasn't been used, if it has, re-randomize, if it hasn't put the number in the array and the set. If I remember correctly, an array can hold significantly more numbers than what you will be generating (but I could be wrong on that one... one of the others might have a better idea).
---- tina001in < tina001in%40yahoo.com">tina001in
yahoo.com> wrote:
> I am creating a Number generation software
> This software creates 15 random nos. It creates such 100000 sets. Some
> where all the 15 nos are repeated which should not be allowed. can you
> guide me how to check whether repetition is happening. My current code
> takes hours to check even 50000 sets, it should not take more than 1
> hour to complete the entire task.
>
> Thank You.
>
.