Random number generation is an incredibly hot topic! Just google and see… Just google and see… Google yields 11,600,000 results (holy smokes!) for random numbers… Not long ago, before I published my dedicated Web page (2004), everybody talked only about pseudo random numbers in software. Now, you see millions of Web pages screaming about true random number generation by computers! In many Internet searches, such sites come now way ahead of SALIU.COM! One must be always vociferous when it comes to TRUTH that belongs to him or her or them!
I noticed in the stats of my Web site. Shuffle.exe was the most popular program on my download site in one day. I updated also my Web page that presented software code to generate true random numbers. I broke up that page in two. Both pages became very popular overnight! Looks like many people instructed their browsers to alert on any updates to my Web page with random generating source code!
The first page presents the theory and algorithms (2) to generate true random numbers. The second page is source-code-only: a fully functional BASIC program (in PBCC 4.04).
Random Numbers, Shuffle, Randomize: Theory, Algorithms, Software;
BASIC Language Source Code Software to Generate True Random Numbers.
The source code does not present the functions to generate randomly delayed arrangements, like real-life lottery drawings. PowerBasic has a dedicated command:
I don’t know about other languages. Probably an empty FOR/NEXT loop can mimic SLEEP.
Speaking of delay in randomization. Shuffle.exe can generate random numbers at the same speed regardless of PC or numbers per combination. It takes the same time to generate 6 of 49 numbers, or 49 of 49. The 49 from 49 case is actually a permutation, not an arrangement.
Code:
47 40 7 33 14 11 37 39 1 19 13 2 48 35 28 41 32 45 44 3 30 42 12 38 6 4 9 27 10 46 15 43 5 34 8 20 26 21 23 18 16 49 22 25 29 31 17 36 24
39 45 31 49 38 17 26 10 33 30 44 41 25 19 34 22 29 43 2 1 16 4 5 48 27 9 18 3 40 35 6 42 28 46 32 12 20 11 7 21 14 15 24 23 8 13 36 47 37
15 3 39 49 2 12 23 25 21 16 44 26 1 46 34 48 41 27 47 38 32 29 45 42 8 19 43 13 17 20 28 4 40 31 10 36 37 30 18 22 11 24 6 7 5 35 9 33 14
22 35 12 43 6 37 24 27 18 25 19 42 34 49 9 36 33 46 47 41 20 29 30 28 5 10 38 48 15 21 39 23 2 14 7 4 3 40 11 1 32 13 17 44 16 8 45 26 31
49 44 9 47 46 23 22 39 34 16 41 42 31 35 15 5 43 36 2 12 3 28 7 37 6 29 13 30 4 25 21 24 27 33 20 40 48 38 11 17 8 26 14 1 10 19 45 18 32
Best of randomly delayed luck!
Ion Saliu
Bookmarks