Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Random numbers
Replies: 64   Last Post: Dec 24, 2007 1:04 PM

 Messages: [ Previous | Next ]
 Marshall Posts: 1,936 Registered: 8/9/06
Re: Random numbers
Posted: Dec 21, 2007 2:53 PM

On Dec 21, 7:24 am, Pubkeybreaker <pubkeybrea...@aol.com> wrote:
> On Dec 21, 6:16 am, John <iamach...@gmail.com> wrote:
>

> > Given a function that returns a random number between 1-5, write one
> > that returns a random number between 1-7 for the case when it should
> > be integer and for the case it can be real.

>
> claims otherwise does not understand the question.
>
> Why is it impossible? Because you have failed to specify
> a *distribution* for either your original function or your
> new function. If you mean *uniformly* at random, you have failed
> to state it. What if "at random" meant "drawn at random from a
> truncated normal pdf"???

The OP also failed to state any constraints on running time
or memory consumption. Do such omissions make
a solution impossible as well?

That he didn't specify a distribution doesn't make a solution
impossible. It just means that, *if* the the OP has a specific
distribution in mind, then *since* he didn't state what it is, then
any possible solution *may not* have the distribution the OP
had in mind. By the same token, it very well might, also.

Of course, I suppose your real point was that it is extremely
unlikely that any real world application will be indifferent
to distribution, and so the question as asked is pretty crappy.
To which I would agree.

Marshall

Date Subject Author
12/21/07 Champ
12/21/07 quasi
12/21/07 quasi
12/21/07 Phil Carmody
12/21/07 quasi
12/21/07 quasi
12/21/07 Phil Carmody
12/21/07 quasi
12/21/07 Phil Carmody
12/21/07 Phil Carmody
12/21/07 quasi
12/21/07 quasi
12/21/07 Phil Carmody
12/21/07 quasi
12/21/07 Phil Carmody
12/21/07 Phil Carmody
12/21/07 quasi
12/21/07 Phil Carmody
12/21/07 quasi
12/21/07 Marshall
12/21/07 Phil Carmody
12/21/07 quasi
12/21/07 Phil Carmody
12/21/07 Marshall
12/21/07 briggs@encompasserve.org
12/21/07 William Elliot
12/21/07 quasi
12/22/07 William Elliot
12/21/07 Pubkeybreaker
12/21/07 b92057@yahoo.com
12/22/07 quasi
12/21/07 simple.popeye@gmail.com
12/21/07 simple.popeye@gmail.com
12/22/07 quasi
12/22/07 Gib Bogle
12/22/07 quasi
12/21/07 Marshall
12/22/07 simple.popeye@gmail.com
12/22/07 quasi
12/22/07 simple.popeye@gmail.com
12/22/07 quasi
12/22/07 quasi
12/22/07 quasi
12/22/07 simple.popeye@gmail.com
12/22/07 quasi
12/23/07 simple.popeye@gmail.com
12/23/07 simple.popeye@gmail.com
12/23/07 simple.popeye@gmail.com
12/23/07 simple.popeye@gmail.com
12/23/07 simple.popeye@gmail.com
12/22/07 simple.popeye@gmail.com
12/22/07 Herman Rubin
12/22/07 b92057@yahoo.com
12/22/07 quasi
12/23/07 b92057@yahoo.com
12/23/07 quasi
12/23/07 b92057@yahoo.com
12/24/07 quasi
12/24/07 quasi