Question: please help! Problem 1 (15 points) RandomDigit() is a random number generator that each time outputs a digit (0, 1, 2, ..., 9) with the
please help!
Problem 1 (15 points) RandomDigit() is a random number generator that each time outputs a digit (0, 1, 2, ..., 9) with the same probability. For the following questions, only the results are required, though intermediate steps may get partial credit if the result is wrong.
- If this generator is called 2 times, what is the probability that the 2 digits returned are the same?
- If this generator is called 4 times, what is the probability that the 4 digits returned are all different from one another?
- This generator is called 2 times and returns digits D1 and D2. If D1 + D2 = 10, what is the probability for D1 * D2 > 20?
- If this generator is repeatedly called until a digit larger than 7 is returned, what is the expected number of repeating?
- Write the pseudocode of RandomDigit() using U(0, 1) and common math functions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
