Re: How to solve this random integer generation problem?



Question:


Given a program which can generate one of {1, 2, 3,
4, 5} randomly.
How can we get another generator which can generate
one of
{1,2,3,4,5,6,7} randomly?


Please help.


You can also start with a uniform random number generator and define J = Int(7U+1), where 0<U<1 and Int is the integer function.

Jack
.