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.

  1. If this generator is called 2 times, what is the probability that the 2 digits returned are the same?

  1. If this generator is called 4 times, what is the probability that the 4 digits returned are all different from one another?

  1. This generator is called 2 times and returns digits D1 and D2. If D1 + D2 = 10, what is the probability for D1 * D2 > 20?

  1. If this generator is repeatedly called until a digit larger than 7 is returned, what is the expected number of repeating?

  1. Write the pseudocode of RandomDigit() using U(0, 1) and common math functions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!