Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Mathematics

Return to Question

Notice removed Reward existing answer by MJD
Bounty Ended with NovaDenizen's answer chosen by MJD
Notice added Reward existing answer by MJD
Bounty Started worth 100 reputation by MJD
Tweeted twitter.com/#!/StackMath/status/608831627217743872
Question Protected by Community Bot
added 80 characters in body
Source Link
P.A.
  • 859
  • 1
  • 7
  • 4

Just for fun, I am trying to find a good method to generate a random number between 1 and 10 (uniformly) with an unbiased six-sided die.

I found a way, but it may requires a lot of steps before getting the number, so I was wondering if there are more efficient methods.

My method:

  1. Throw the die and call the result $n$. If 1ドル\leq n\leq 3$ your number will be between 1ドル$ and 5ドル$ and if 4ドル\leq n\leq 6$ your number will be between 6ドル$ and 10ドル$. Hence, we reduced to the problem of generating a random number between 1ドル$ and 5ドル$.
  2. Now, to get a number between 1ドル$ and 5ドル$, throw the die five times. If the $i$th throw got the largest result, take your number to be $i$. If there is no largest result, start again until there is.

The problem is that although the probability that there will eventually be a largest result is 1ドル$, it might take a willwhile before getting it.

Is there a more efficient way that requires only some fixed number of steps? Edit: Or if not possible, a method with a smaller expected number of rolls?

Just for fun, I am trying to find a good method to generate a random number between 1 and 10 (uniformly) with an unbiased six-sided die.

I found a way, but it may requires a lot of steps before getting the number, so I was wondering if there are more efficient methods.

My method:

  1. Throw the die and call the result $n$. If 1ドル\leq n\leq 3$ your number will be between 1ドル$ and 5ドル$ and if 4ドル\leq n\leq 6$ your number will be between 6ドル$ and 10ドル$. Hence, we reduced to the problem of generating a random number between 1ドル$ and 5ドル$.
  2. Now, to get a number between 1ドル$ and 5ドル$, throw the die five times. If the $i$th throw got the largest result, take your number to be $i$. If there is no largest result, start again until there is.

The problem is that although the probability that there will eventually be a largest result is 1ドル$, it might take a will before getting it.

Is there a more efficient way that requires only some fixed number of steps?

Just for fun, I am trying to find a good method to generate a random number between 1 and 10 (uniformly) with an unbiased six-sided die.

I found a way, but it may requires a lot of steps before getting the number, so I was wondering if there are more efficient methods.

My method:

  1. Throw the die and call the result $n$. If 1ドル\leq n\leq 3$ your number will be between 1ドル$ and 5ドル$ and if 4ドル\leq n\leq 6$ your number will be between 6ドル$ and 10ドル$. Hence, we reduced to the problem of generating a random number between 1ドル$ and 5ドル$.
  2. Now, to get a number between 1ドル$ and 5ドル$, throw the die five times. If the $i$th throw got the largest result, take your number to be $i$. If there is no largest result, start again until there is.

The problem is that although the probability that there will eventually be a largest result is 1ドル$, it might take a while before getting it.

Is there a more efficient way that requires only some fixed number of steps? Edit: Or if not possible, a method with a smaller expected number of rolls?

added 12 characters in body
Source Link
P.A.
  • 859
  • 1
  • 7
  • 4

Just for fun, I am trying to find a good method to generate a random number between 1 and 10 (uniformly) with an unbiased six-sided die.

I found a way, but it may requires a lot of steps before getting the number, so I was wondering if there are more efficient methods.

My method:

  1. Throw the die and call the result $n$. If 1ドル\leq n\leq 3$ your number will be between 1ドル$ and 5ドル$ and if 4ドル\leq n\leq 6$ your number will be between 6ドル$ and 10ドル$. Hence, we reduced to the problem of generating a random number between 1ドル$ and 5ドル$.
  2. Now, to get a number between 1ドル$ and 5ドル$, throw the die five times. If the $i$th throw got the largest result, take your number to be $i$. If there is no largest result, start again until there is.

The problem is that although the probability that there will eventually be a largest result is 1ドル$, it might take a will before getting it.

Is there a more efficient way that requires only some fixed number of steps?

Just for fun, I am trying to find a good method to generate a random number between 1 and 10 with an unbiased six-sided die.

I found a way, but it may requires a lot of steps before getting the number, so I was wondering if there are more efficient methods.

My method:

  1. Throw the die and call the result $n$. If 1ドル\leq n\leq 3$ your number will be between 1ドル$ and 5ドル$ and if 4ドル\leq n\leq 6$ your number will be between 6ドル$ and 10ドル$. Hence, we reduced to the problem of generating a random number between 1ドル$ and 5ドル$.
  2. Now, to get a number between 1ドル$ and 5ドル$, throw the die five times. If the $i$th throw got the largest result, take your number to be $i$. If there is no largest result, start again until there is.

The problem is that although the probability that there will eventually be a largest result is 1ドル$, it might take a will before getting it.

Is there a more efficient way that requires only some fixed number of steps?

Just for fun, I am trying to find a good method to generate a random number between 1 and 10 (uniformly) with an unbiased six-sided die.

I found a way, but it may requires a lot of steps before getting the number, so I was wondering if there are more efficient methods.

My method:

  1. Throw the die and call the result $n$. If 1ドル\leq n\leq 3$ your number will be between 1ドル$ and 5ドル$ and if 4ドル\leq n\leq 6$ your number will be between 6ドル$ and 10ドル$. Hence, we reduced to the problem of generating a random number between 1ドル$ and 5ドル$.
  2. Now, to get a number between 1ドル$ and 5ドル$, throw the die five times. If the $i$th throw got the largest result, take your number to be $i$. If there is no largest result, start again until there is.

The problem is that although the probability that there will eventually be a largest result is 1ドル$, it might take a will before getting it.

Is there a more efficient way that requires only some fixed number of steps?

Source Link
P.A.
  • 859
  • 1
  • 7
  • 4

How to generate a random number between 1 and 10 with a six-sided die?

Just for fun, I am trying to find a good method to generate a random number between 1 and 10 with an unbiased six-sided die.

I found a way, but it may requires a lot of steps before getting the number, so I was wondering if there are more efficient methods.

My method:

  1. Throw the die and call the result $n$. If 1ドル\leq n\leq 3$ your number will be between 1ドル$ and 5ドル$ and if 4ドル\leq n\leq 6$ your number will be between 6ドル$ and 10ドル$. Hence, we reduced to the problem of generating a random number between 1ドル$ and 5ドル$.
  2. Now, to get a number between 1ドル$ and 5ドル$, throw the die five times. If the $i$th throw got the largest result, take your number to be $i$. If there is no largest result, start again until there is.

The problem is that although the probability that there will eventually be a largest result is 1ドル$, it might take a will before getting it.

Is there a more efficient way that requires only some fixed number of steps?

AltStyle によって変換されたページ (->オリジナル) /