List Commands Library for 50g
|
04-14-2018, 12:37 AM
Post: #334
|
|||
|
|||
RE: List Commands Library for 50g
Depending on the quality of results desired by randomization, I have two methods. Both are reasonably fast. In both methods, the items in each list end up independently of each other item. Thus the permutation is a legitimate "random" sample from the set of all permutations. In one method, (a bit more complicated and the RNG is about 3 times slower), each permutation is independent of the next permutation. In the second method, the permutations are uniformly distributed across the set of permutations. Were one wanting to develop statistics over the set of permutations (like how many next-neighbor-triples there were), the second method give an error about 1/N for N permutations. The first method gives and error of about 1/Sqrt(N).
For example, one may wish to generate statistics of bridge hands. In this case, one would probably want the second method as fewer samples would be required. If a dealing machine were generating hands, the first method would be better as no (even small scale) relations between hands exist. If there is interest, I'll post the methods (and even an HP50g code) for each case. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 18 Guest(s)