Random commentary about Machine Learning, BigData, Spark, Deep Learning, C++, STL, Boost, Perl, Python, Algorithms, Problem Solving and Web Search
Let's define:head = 0 with p = 0.4tail = 1 with p = 0.6We say:0&0 with p = 0.160&1 with p = 0.241&0 with p = 0.241&1 with p = 0.36Solution:Toss the coin two times. If you get 0&1 you say 0, if you get 1&0 you say 1, else toss again.
Let's define:
ReplyDeletehead = 0 with p = 0.4
tail = 1 with p = 0.6
We say:
0&0 with p = 0.16
0&1 with p = 0.24
1&0 with p = 0.24
1&1 with p = 0.36
Solution:
Toss the coin two times. If you get 0&1 you say 0, if you get 1&0 you say 1, else toss again.