I wonder if anyone could help me with this question:
Use a 20 sided die and a 6 sided die to represent all numbers from 1-45 with equal probability.
Also, it is okay to use one die repeatedly as long as the probability of getting each of 1-45 are equal.
I tried different ways such as use the 1-4 from the 6 sided die to represent the tenth bit and the 1-9 to represent the 1th bit...but none of them really works. I would appreciate if anyone could give me a good hint. Thanks
HINT: Roll the $20$-sided die once and the $6$-sided die twice, recording the three outcomes in order. Then use the fact that $20\cdot6\cdot6=720=16\cdot45$. (This approach requires that you make a reference table or else keep a lot of information in your head.)
Added: A more efficient alternative is to roll the $6$-sided die twice, reducing each outcome modulo $3$, and interpret the result as a two-digit number in base $3$. This gives you an integer in the range $\{0,1,\ldots,8\}$ with uniform probability. Roll the $20$-sided die once and reduce modulo $5$ to get $0,1,2,3$, or $4$, each with equal probability. Can you see how to combine these to get an integer uniformly distributed in $\{0,1,\ldots,44\}$?