You have coins C1, C2, · · · , Cn. For each k, coin Ck is biased so that, when tossed, it has
probability 1/(2k + 1) of falling heads.
If the n coins are tossed, what is the probability that the number of
heads is odd?
Express the answer as a rational function of n.
Source:
Putnam 2001
prob=sym(1):50;
prob=1./(2.*prob+1);
for n=1:12
p=sym(0);
for ct=1:2:n
choices=combinator(n,ct,'c');
for i=1:size(choices,1)
choice=choices(i,:);
unchosen=setdiff([1:n],choice);
p=p+prod(prob(choice))*prod((1-prob(unchosen)));
end
end
fprintf('%d %s\n',n,p)
end
finds
n prob
1 1/3
2 2/5
3 3/7
4 4/9
5 5/11
6 6/13
7 7/15
8 8/17
9 9/19
10 10/21
11 11/23
12 12/25
...
P = n/(2*n+1)
|
Posted by Charlie
on 2024-03-04 13:28:43 |