The exact question is: You need an 8-sided die for a game. You only have a coin, two four-sided and one 10-sided dice. How can you replace the 8-sided die? Re-rolls are not allowed.
There are several solutions to this I've been told, I found one, but my solution wasn't one of the expected solutions. What solutions can you think of?
My solution was:
Roll 10-sided and 2x 4-sided dice, sum up the result and roll and substract 2-sided die (the coin) which you divide by 2 at the end to get the result (round up)
We need to not only generate numbers between 1 and 8, but also to make sure they are uniformly distributed.
Your solution does not produce uniformly distributed results (at least according to MJD, in the comments).
However, this procedure does: you can roll a 4-sided die for a value between 1 and 4, and then toss a coin: if heads, add 4 to the result.
It is easy to see that each number from 1 to 8 is produced by exactly one outcome: for example, a result of 3 requires a roll of 3 and a toss of tails, while a result of 5 requires a roll of 1 and a toss of heads.