Re:The Beginning of the Monte Carlo Method (1987)
by commandlinefan on Wednesday June 06, 2018 @10:40AM
(#17247485)
How do you figure out how many holes are inside the circle if you don't already know pi, though? I mean, a human could do it, but I don't follow how this extrapolates to a mathematical process.
Re:The Beginning of the Monte Carlo Method (1987)
by tntn on Wednesday June 06, 2018 @11:39AM
(#17248010)
Check the distance from the center to the dart?
Re:The Beginning of the Monte Carlo Method (1987)
by commandlinefan on Wednesday June 06, 2018 @02:39PM
(#17249822)
Ok, that makes sense.
1) Draw a unit square.
2) Inscribe a circle inside the square.
3) Throw a whole bunch of darts at the square, distributing them as randomly as possible.
4) Count the number of dart holes inside the circle. Divide by the total number of dart holes. Now you have an estimate of the ratio of the areas of the circle and the square. Call this number C. Since you know the area of the square is 1, the area of the circle must be C. C is also equal to pi * r^2, where r is the radius of the inscribed circle (which is 0.5). Thus, C = pi * (0.5)^2 = pi/4. Pi is therefore approximately 4C.