110k views
4 votes
Your state's bigbucks lottery prize has reached $100,000,000, and you decide to play. you have to pick ve numbers between 1 and 60, and you'll win if your numbers match those drawn by the state. you decide to pick your "lucky" numbers using a random number table. which numbers do you play, based on these random digits? 43680 98750 13092 76561 58712

User Kurumi
by
6.5k points

1 Answer

2 votes
Numbers 1-60 don't map nicely to numbers 0-99999, so some method needs to be devised to create that map. Perhaps the simplest is to use these digits as a decimal fraction and compute
.. 1 + floor(60*N/100000)
The possibilty of collision needs to be considered. One way to deal with that is to add or subtract a constant, using the next higher available number, for example. This would give the choices {8, 27, 36, 46, 60}.
Your state's bigbucks lottery prize has reached $100,000,000, and you decide to play-example-1
User Juto
by
7.0k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.