Monte carlo integration XLSin(0)/2 S与m0 d/2 L/2 S can be calculated from Pd/4(Pis the probability of finding a random point in the area under the red curve) π/2 Exercise Write a program to calculate t by using the method of Buffon with d=l and L=3 /4
Exercise Write a program to calculate p by using the method of Buffon with d=1 and L=3/4. Monte Carlo integration x d/2 L/2 p/2 q x=Lsin(q)/2 I = /2 0 sin 2 p dq q L SI SI can be calculated from Pdp/4 (P is the probability of finding a random point in the area under the red curve)
Random number generation General remark All the random numbers generated on a computer are in fact pseudo random numbers which are produced through a deterministic algorithm Basic generator: It produces uniformly distributed random numbers on 0, 11 Desirable properties ofa random number generator It should generate sequences of random numbers which are uniform, uncorrelated with an extremely long period
Random number generation General remark: All the random numbers generated on a computer are in fact pseudorandom numbers which are produced through a deterministic algorithm! Basic generator: It produces uniformly distributed random numbers on [0,1]. Desirable properties of a random number generator: It should generate sequences of random numbers which are •uniform, •uncorrelated, •with an extremely long period