Re: Random number generator without duplicates?
Re: Random number generator without duplicates?
- Subject: Re: Random number generator without duplicates?
- From: Michelle Steiner <email@hidden>
- Date: Wed, 18 Apr 2001 08:47:44 -0700
On 4/18/01 5:41 AM, Bill Briggs <email@hidden> wrote:
>
>How can I get a list of random numbers that does not include any
>
>duplicates? I would want to use these parameters: six random numbers
>
>from 1 to 56, as a list or as six variables, no duplicate numbers.
>
>
That's a singularly peculiar request. You cannot have a randomly
>
generated list of numbers if you impose such a condition. Random
>
lists of length greater than 1 element will at times produce
>
duplicates (or other multiple instances) in the list. It's a fact.
>
Once you impose your condition of uniqueness of elements, the list
>
you want is *not* a randomly generated list.
It is apparently a program to generate numbers to bet on a state lottery.
In these lotteries, you choose six numbers from a pool of a given
number; apparently, in this case, the number is 56. If you match all six
numbers drawn by the state, you win the jackpot; if you match five, you
win a smaller amount, and if you match four, you get an even smaller
token amount.
The state draws the numbers the same way; a number is randomly selected
from the pool of 56; then a number is selected from the remaining pool of
55, etc. usually, they do it by drawing balls from a Bingo machine or
something similar.
My reaction, though, is "Why bother?" Any sequence has as much a chance
of winning as any other sequence. If I would bet on the lottery, though,
I'd avoid having more than three of the first six numbers, more than
three of the last six numbers, and have at least three numbers greater
than 31. Not because any of those numbers have a greater or lesser
chance of winning, but because the most commonly chosen numbers by those
who bet are the first six, last six, and dates (birthdays, anniversaries,
etc.), and by having no more than three numbers that match those choices,
the number of duplicated winning entries tends to decrease--and that's
important because in cases of ties, the winnings are split evenly among
all the tied bets.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------