Chapter 6: Q10E (page 193)
Counting heads. Given integersn and k, along with , you want to determine the probability of obtaining exactly heads when biased coins are tossed independently at random, where pi is the probability that the ith coin comes up heads. Give an algorithm for this task. Assume you can multiply and add two numbers in in time.
Short Answer
It is given in that we have ‘n ’ biased coins that are tossed independently, i.e., no mutual exclusion and tossing of one coin have no effect on result of other coin.
Also, coin will produce head, with probability .