How do I simulate 8-faced dice with only 6-faced dice?
I have been given the hint that $6^3$ is divisible by 8.
How do I simulate 8-faced dice with only 6-faced dice?
I have been given the hint that $6^3$ is divisible by 8.
Using the hint: Think about the number of ways you can roll three $6$-sided dice, and how you might be able to partition them into $8$ different groups of possibilities, each with the same size.
Roll the die three times subtracting 1 from each result. Arrange the outcomes as the digits of the base-6 figure $d_0d_1d_2$. Converting this number to decimal you'll have a number between 0 and 215. Assign 1 as the outcome of your 8-faced die when the number is between 0 and 26, 2 when the number is between 27 and 53 and so on.
throw the dice, multiply the results together, divide by 27, round the result up to a whole number