Computer Science, asked by purvaja5762, 9 months ago

Suppose you are provided with a source of unbiased random bits. How will you generate a sample from the set 0, 1 with probability distribution p[0]

Answers

Answered by prasannarv2001
0

Answer:

Please mark me brainliest

Explanation:

Given a function rand50() that returns 0 or 1 with equal probability, write a function that returns 1 with 75% probability and 0 with 25% probability using rand50() only. Minimize the number of calls to rand50() method. Also, use of any other library function and floating point arithmetic are not allowed.

Similar questions