I have a probability problem, which I need to simulate in a reasonable amount of time. In its simplified form, I have 30 unfair coins each with a different known probability of being heads. I then want to answer such questions as *what is the probability that exactly 12 will be heads?* and *what is the probability that AT LEAST five will be tails?*

I know basic probability theory, so I know that I can enumerate all ${{30} \choose x}$ possibilities, but that's not efficient. The worst case—${{30} \choose {15}}$—exceeds 150 million combinations. Is there a better computational approach to this problem?