[algogeeks] Re: Permutation Alogrithm very slow

2006-04-18 Thread adak
You've hit the problem right on the head, kensuke. I believe he wants to give each viewer not just a random display from the database, but a display that won't be repeated, as well. Checking the random numbers off against a boolean array, would give him what he wants, (together with your suggest

[algogeeks] Re: Permutation Alogrithm very slow

2006-04-18 Thread kensuke
Why do you need to do all the permutation? if you have 7 users, you need only 7 permutations, not 2**100. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to

[algogeeks] Re: Permutation Alogrithm very slow

2006-04-16 Thread Gene
alpaul wrote: > Now make the issue a bit simple, I jsut it is only 3 datas, which is A, > B, C, > According to the permutation rule, 2**3=6 > > AB-AC-BA-BC-CA-CB It's hard to figure out what you are saying 2**3 is 8, not 6. I think you mean 2!=6. > > But it is enough for me to display on the w