



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main topics for this course are Stochastic process, random variables, linear congruent generators, pdfs and cdfs, rejection method, metropolis methods, sampling techniques, random walks and genetic algorithm. This lecture includes: Topics, Stochastic, Process, Random, Variables, Congruent, Generators, Rejection, Metropolis, Sampling, Radiation, Transport, Genetic, Algorithm
Typology: Slides
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















Topics:
Stochastic processes
Random variables
Linear Congruent Generators
Pdfs
and cdfs
Rejection Method
Metropolis methods
Sampling Techniques
Variance rejection techniques
Random Walks
Application to Radiation Transport
Introduction to Genetic Algorithms
Recommended Text: M. H. Kalos, P.A. Whitlock,Monte Carlo Methods, Vol. I,John Wiley and Sons, NY.
First Mid-term: 20% Home-work assignments: 5% Final examination: (Half of 50%
)
Computational Methods properties.
Stanis
ł
aw
Marcin
Ulam
(
April 13
,
1909
-
May 13
,
1984
)
was a
Polish
mathematician
who participated in the
Manhattan Project
and proposed the
Teller–Ulam
design
of
thermonuclear weapons
. He also invented
nuclear
pulse propulsion
and developed a number of
mathematical tools in
number theory
,
set theory
,
ergodic
theory
, and
algebraic topology
.
He suggested the
Monte Carlo method
for evaluating complicated
mathematical
integrals
that arise in the theory of nuclear
chain reactions
(not knowing that
Fermi
and others had used a similar method earlier).
This suggestion led to the more systematic development of Monte Carloby Von Neumann,
Metropolis
, and others.
In gambling often dice, roulette, cards, etc. are used to generate random events.
When is MC helpful? We have all the probabilities we need for the computation. But actually doing the computation is too hard. For example:
Integration in many dimensions
Optimization in many dimensions
Simulation
Some define the Monte Carlo method as a numerical stochasticmethod for statistical simulation which utilizes sequences ofrandom numbers to perform the simulation.
Modelling light transport in multi-layered tissues (MCML)
Graphics, particularly for ray tracing;
Monte Carlo methods in finance
Reliability Engineering
In simulated annealing for protein structure prediction
In semiconductor device research,
Environmental science,
Monte Carlo molecular modeling
Search And Rescue and Counter-Pollution.
In computer science (Las Vegas algorithm etc)
Modelling the movement of impurity atoms (or ions) in plasmas in existing andtokamaks
In experimental particle physics, for designing detectors, Nuclear and particlephysics codes using the Monte Carlo method
Many Other Applications.
Advantages of MC Methods:
Direct simulation: PDF vs. conventional differential equations
Discontinuous, multi-value, multi-dimension functions
Doesn't require significant memory or computation time
Easily to modified for more complex problem, always
providing a solution.
Disadvantages:
Convergence problem
Robust –
subtle effect can be lost
Let us find area under thecurve
The
shaded
area
is
quarter of the circle shownin Figure.
1
2
2
=
y
x
1.2 1.0 0.8 0.6 0.4 0.2 0.
x
2
+ y
2
= 1
O
C
Y
i
X
i
B
A
y(x)
x
If we throw series of darts atrandom on a rectangular boardhaving dimensions of one unit
one unit, what is the probabilityP
that
the
darts
will
hit
the
shaded area? The probability isgiven by the following ratio:
thrown
darts
of
number
Total
area
shaded
the
hitting
darts
of
Number
P
=
MC method: Area Under the Curve
docsity.com
Step 1:
Get two random numbers for X
i
and Y
i
representing the
abscissa and ordinate of impact point of the dart such that
i
i
both reside in [0, 1] domain. Step 2:
Then compare the Y
i
with the value of y
i
corresponding to
i
. If the conditions are satisfied we register a hit.
Step 3:
Then calculate the probability, P using above equation.
Step 4:
Repeat N times the step 1 through 3.
Step 5:
Then compute the area under the curve. The total area of
the circle with radius one and center at origin, is four times thisarea.
Area Under the Curve
docsity.com
%
area
under
curve
by
Monte
Carlo
method
N
=
5
;
hit
=
0;
mis
=
0;
rand('state',
0)
%
this
sets
an
initial
state
nframes =
100
;
%
number
of
frames
for
movie
for
j
=
1:
nframes
j
axis([-1.
1.
-1.
1.2])
hold
on
for
k
=
1:
N
x
=
1.
-
2.rand;*
y
=
1.
-
2.rand;*
if((xx*
+
yy)<=*
1
)
hit
=
hit
+ 1;
plot(x,
y,
'r:o')
hold
on
else
mis
= mis
+ 1;
plot(x,
y,
'')*
end
end
m(k)=
getframe;
end
MATLAB PROGRAM:
Area Under the Curve
N = 100; delta = 1.0/N; rand('state', 0)
% initialize the state zero
probability(1) = 1; area(1)= 3.; xn(1)= N;
exact_area(1)=3.
for i = 2: 240
hit = 0; mis = 0;
for k = 1: N
x = rand;
y = rand;
if((xx + yy)<= 1 )**
hit = hit + 1;
else
mis = mis + 1;
end
end
probability(i) = hit/N; area(i) = 4probability(i); N = N + 100;*
xn(i) = N; exact_area(i) = 3.14156;
error(i) = 100(area(i) - exact_area(i));*
end
plot(xn, area, xn, exact_area)
Area Under the Curve
Figure 5.3 Effect of number of histories on an estimate of area within a
circle using Monte Carlo method.
Area Under the Curve