A Big Ol' Database
- Posted by Lutz_Heitmann at NF.MAUS.DE Apr 09, 2001
- 522 views
-P2956@KI Hi CK, CL>Is there a formula I can use that will convert a number (1...25827165) CL>to a corresponding, unique, set of picks? CL>For instance... CL>1 = 1, 2, 3, 4, 5, 6 CL>2 = 1, 2, 3, 4, 5, 7 CL>3 = 1, 2, 3, 4, 5, 8 CL>... CL>25827165 = 49, 50, 51, 52, 53, 54 No formula, but there's a method. I will start out with some mathematical background. What I'm trying to explain is called "n over k" in German. It means: How many different sets of k numbers can you pick out of n numbers, where the sequence of the numbers within the resulting set doesn't matter. If you look at "6 over 3" you get 6 * 5 * 4 ways to pick 3 numbers out of 6, that makes 120. But since there are 3 * 2 * 1 = 6 ways to arrange every set of 3, it leaves only 20 different sets. I suppose, you've known all this already, or how else did you find the figure 25827165? Look at all possible sets of 6 out of 54! For the lowest number being 1, there are "53 over 5" (2869685) sets for the next 5 numbers. For the next lowest number being 2, there are "52 over 5" (2598960) possibilities for the next set of 5. That means, set 5500000 will very probably start with a 3, and set 25827164 will start with 48. Get the idea? The first 2869685 sets have "1" as the lowest number, the next 2598960 sets have "2" as the first number, and so on. Having understood that, you can find the numbers for the sets of 4 etc. Lutz.