3 ducks have landed in a circular pond. What is the probability there is a diameter such that the semicircle on one side contains all of them?
Repeat for 4 ducks.
Note: consider the ducks to be randomly chosen points in a circle.
Results seem also to verify p = 1/2 for 4 ducks:
ct=0; hit=0;
a=0;
for trial=1:100000000
b=360*rand; c=360*rand; d=360*rand;
ct=ct+1;
set=sort([a b c d]);
aa=set(1);bb=set(2);cc=set(3);dd=set(4);
diff=[bb-aa cc-bb dd-cc aa-dd+360];
if max(diff)>180
hit=hit+1;
end
end
disp([hit ct hit/ct])
runs with 1 million, 10 million and 100 million trials:
fits on one side trials fraction
>> ducksInAPond
499033 1000000 0.499033
>> ducksInAPond
4997068 10000000 0.4997068
>> ducksInAPond
50007263 100000000 0.50007263
|
Posted by Charlie
on 2023-01-24 11:15:22 |