# 数学代写|模拟和蒙特卡洛方法作业代写simulation and monte carlo method代考|ME777

## 数学代写|模拟和蒙特卡洛方法作业代写simulation and monte carlo method代考|GENERATING DIFFUSION PROCESSES

The Wiener process, denoted in this section by $\left{W_t, t \geqslant 0\right}$, plays an important role in probability and forms the basis of so-called diffusion processes, denoted here by $\left{X_t, t \geqslant 0\right}$. These are Markov processes with a continuous time parameter and with continuous sample paths, like the Wiener process.

A diffusion process is often specified as the solution of a stochastic differential equation (SDE), which is an expression of the form
$$\mathrm{d} X_t=a\left(X_t, t\right) \mathrm{d} t+b\left(X_t, t\right) \mathrm{d} W_t,$$
where $\left{W_t, t \geqslant 0\right}$ is a Wiener process and $a(x, t)$ and $b(x, t)$ are deterministic functions. The coefficient (function) $a$ is called the $d r i f t$, and $b^2$ is called the diffusion coefficient. When $a$ and $b$ are constants, say $a(x, t)=\mu$ and $b(x, t)=\sigma$, the resulting diffusion process is of the form
$$X_t=\mu t+\sigma W_t$$
and is called a Brownian motion with drift $\mu$ and diffusion coefficient $\sigma^2$.

A simple technique for approximately simulating diffusion processes is Euler’s method; see, for example, [4]. The idea is to replace the SDE with the stochastic difference equation
$$Y_{k+1}=Y_k+a\left(Y_k, k h\right) h+b\left(Y_k, k h\right) \sqrt{h} Z_{k+1}, \quad k=0,1,2, \ldots,$$
where $Z_1, Z_2, \ldots$ are independent $\mathrm{N}(0,1)$-distributed random variables. For a small step size $h$, the process $\left{Y_k, k=0,1,2, \ldots\right}$ approximates the process $\left{X_t, t \geqslant 0\right}$ in the sense that $Y_k \approx X_{k h}, k=0,1,2, \ldots$.

## 数学代写|模拟和蒙特卡洛方法作业代写simulation and monte carlo method代考|GENERATING RANDOM PERMUTATIONS

Many Monte Carlo algorithms involve generating random permutations, that is, random ordering of the numbers $1,2, \ldots, n$, for some fixed $n$. For examples of interesting problems associated with the generation of random permutations, see the traveling salesman problem in Chapter 6 , the permanent problem in Chapter 9, and Example $2.15$ below.

Suppose that we want to generate each of the $n$ ! possible orderings with equal probability. We present two algorithms to achieve this. The first is based on the ordering of a sequence of $n$ uniform random numbers. In the second, we choose the components of the permutation consecutively. The second algorithm is faster than the first.

For example, let $n=4$ and assume that the generated numbers $\left(U_1, U_2, U_3\right.$, $\left.U_4\right)$ are $(0.7,0.3,0.5,0.4)$. Since $\left(U_2, U_4, U_3, U_1\right)=(0.3,0.4,0.5,0.7)$ is the ordered sequence, the resulting permutation is $(2,4,3,1)$. The drawback of this algorithm is that it requires ordering a sequence of $n$ random numbers, which requires $n \ln n$ comparisons.

As we mentioned, the second algorithm is based on the idea of generating the components of the random permutation one by one. The first component is chosen randomly (with equal probability) from $1, \ldots, n$. The next component is randomly chosen from the remaining numbers, and so on. For example, let $n=4$. We draw component 1 from the discrete uniform distribution on ${1,2,3,4}$. Say we obtain 2. Our permutation is thus of the form $(2, \cdot, \cdot, \cdot)$. We next generate from the three-point uniform distribution on ${1,3,4}$. Now, say 1 is chosen. Thus our intermediate result for the permutation is $(2,1, \cdot, \cdot)$. Last, for the third component, we can choose either 3 or 4 with equal probability. Suppose that we draw 4 . The resulting permutation is $(2,1,4,3)$. Generating a random variable $X$ from a discrete uniform distribution on $\left{x_1, \ldots, x_k\right}$ is done efficiently by first generating $I=\lfloor k U\rfloor+1$, with $U \sim \mathrm{U}(0,1)$ and returning $X=x_I$.

# 模拟和蒙特卡洛方法代考

## 数学代写|模拟和蒙特卡洛方法作业代写模拟和蒙特卡罗方法代考|生成扩散过程

$$\mathrm{d} X_t=a\left(X_t, t\right) \mathrm{d} t+b\left(X_t, t\right) \mathrm{d} W_t,$$

$$X_t=\mu t+\sigma W_t$$
，被称为漂移$\mu$和扩散系数$\sigma^2$的布朗运动

$$Y_{k+1}=Y_k+a\left(Y_k, k h\right) h+b\left(Y_k, k h\right) \sqrt{h} Z_{k+1}, \quad k=0,1,2, \ldots,$$

## 数学代写|模拟和蒙特卡洛方法作业代写模拟和蒙特卡罗方法代考|生成随机排列

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: