# 密码学| CM30173 Cryptography代写

0

There are various solutions that students might put forward. They should note the requirement for Diffiffiffie-Hellman key exchange and assumptions regarding the fact that attackers can not currently broadcast so that they are assuming that no man in the middle attack can take place. They should note that there is no way to avoid having to make this assumption and may even conclude that it increases risks to trust a system where this is a fundamental issue and that management should wait til summer.

• $\mathcal{P}=\mathcal{C}=\mathbb{Z}_{2}$
• $\mathcal{K}=\mathbb{Z}{2}$ and we generate a keystream $k{1} k_{2} k_{3} \ldots$ with $k_{i} \in \mathcal{K}$.
• We encrypt plaintext $x=x_{1} x_{2} x_{3} \ldots$ with the keystream thus
$$e_{k_{i}}\left(x_{i}\right)=\left(x_{i}+k_{i}\right) \quad \bmod 2$$
(the exclusive-or of $x_{i}$ and $k_{i}$ this is also written $x_{i} \oplus k_{i}$ ) and decrypt
$$d_{k_{i}}\left(y_{i}\right)=\left(y_{i}+k_{i}\right) \quad \bmod 2$$

## CM30173 COURSE NOTES ：

We can use the cipher block chaining (CBC) mode for a block cipher with a fixed public $I V$ to create a MAC.
CBC mode a message $x=x_{1} x_{2} \ldots x_{n}$ split into blocks and calculates
\begin{aligned} y_{0} &=I V \ y_{i} &=e_{k}\left(y_{i-1} \oplus x_{i}\right) \quad i \geq 1 \end{aligned}
This idea is adapted to form CBC-MAC by carrying out the same series of calculations but only returning the output from the last loop:
Inputs: $x$, a block cipher such as DES
$$y_{0}=I V=00 \ldots 0$$
for $i$ from 1 to $n$ do
$$y_{i}=e_{k}^{\mathrm{DES}}\left(y_{i-1} \oplus x_{i}\right)$$
end do
return $y_{n}$

# 数学方法2|MA30059/MA40059/MA50059 Mathematical Methods 2代写

0

In some sense, the unifying theme of the unit is partial differential equations (we shall see that
although variational principles such as those mentioned in Section 1.1.3 are not differential equations, they are intimately linked to them). You have met several PDEs over the last few years, but
we shall (hopefully) study PDEs in a different manner to how you may have done so up to this
point.

Fix $\mathbf{x} \in \mathbb{R}^{m}$.
(i) A distribution $T: C_{c}^{\infty}\left(\mathbb{R}^{m}\right) \rightarrow \mathbb{R}$ is called a fundamental solution of Laplace’s equation with respect to the point $\mathbf{x} \in \mathbb{R}^{m}$ if
$$\Delta T=\delta_{\mathrm{x}},$$
that is, equality as distributions. Here $\delta_{\mathbf{x}}$ is the shifted Dirac Delta distribution defined by $\delta_{\mathbf{x}}(\phi)=\phi(\mathbf{x})$ for all $\phi \in C_{c}^{\infty}\left(\mathbb{R}^{m}\right)$.
(ii) Let $\phi \in C_{c}^{\infty}\left(\mathbb{R}^{m}\right)$. As $\phi$ is compactly supported, there exists $\rho>0$ such that $|\mathbf{x}|<\rho$ and $\phi(\mathbf{y})=0$ for all $\mathbf{y} \in \mathbb{R}^{m}$ with $|\mathbf{y}| \geq \rho$. Choose $\Omega:=B(\mathbf{0}, \rho+1)$, so that
$\phi, \frac{\partial \phi}{\partial n}=0 \quad$ on $\partial \Omega$,
and $\mathbf{x} \in \Omega$. Since evidently $\phi \in C^{2}(\bar{\Omega})$, Green’s Integral Representation reduces to
$$\int_{\mathbb{R}^{m}} N_{\mathbf{x}}(\mathbf{y}) \Delta \phi(\mathbf{y}) \mathrm{d} \mathbf{y}=\phi(\mathbf{x}) .$$
As $\phi$ was arbitrary, in terms of distributions, this reads
$$\Delta T_{N_{\mathrm{x}}}=\delta_{\mathrm{x}}$$
where $T_{N_{\mathbf{x}}}$ is the distribution corresponding to $N_{\mathbf{x}}$, as required.

## MA30059/MA40059/MA50059 COURSE NOTES ：

We need to find a $v$ satisfying $(1)-(3)$ above. Then we set $G(\mathbf{x}, \mathbf{y}):=N_{\mathbf{x}}(\mathbf{y})+v(\mathbf{x}, \mathbf{y})$ If $\mathbf{x}=0$, then (3) becomes
$$v(\mathbf{0}, \mathbf{y})=\frac{1}{4 \pi} \quad \forall y \in \partial \Omega_{0},$$
so we can just choose
$$v(\mathbf{0}, \mathbf{y})=\frac{1}{4 \pi} \quad \forall y \in \bar{\Omega}{0},$$ which satisfies Laplace’s equation in $\Omega$ (and is in $C^{2}(\bar{\Omega})$ ) since it is constant. We now consider the case $\mathbf{x} \neq 0$. In light of the key property of $\mathbf{r}(\mathbf{x})$, namely, $$|\mathbf{x}| \cdot|\mathbf{y}-\mathbf{r}(\mathbf{x})|=|\mathbf{y}-\mathbf{x}| \quad \forall \mathbf{x} \in \Omega{0} \backslash{\mathbf{0}}, \forall \mathbf{y} \in \partial \Omega_{0},$$
the requirement (3) becomes
$$v(\mathbf{x}, \mathbf{y})=\frac{1}{4 \pi} \frac{1}{|\mathbf{x}-\mathbf{y}|}=\frac{1}{4 \pi} \frac{1}{|\mathbf{x}| \cdot|\mathbf{y}-\mathbf{r}(\mathbf{x})|} \quad \forall \mathbf{y} \in \partial \Omega_{0}$$
Thus, we let $v$ equal the function on the right hand side of the above for all $\mathbf{y} \in \Omega_{0}$, which is well defined since $\mathbf{r}(\mathbf{x})-\mathbf{y} \neq \mathbf{0}$ for all $\mathbf{y} \in \bar{\Omega}{0}$ and $\mathbf{x} \in \Omega{0} \backslash{\mathbf{0}}$. Furthermore, since
$$v(\mathbf{x}, \mathbf{y})=-\frac{1}{|\mathbf{x}|} N_{\mathbf{r}(\mathbf{x})}(\mathbf{y}) \quad \forall \mathbf{y} \in \bar{\Omega}_{0},$$

# 优化算法|STAT0025 Optimisation Algorithms代写

0

This module aims to provide an introduction to the ideas underlying the optimal choice of component variables, possibly subject to constraints, that maximise (or minimise) an objective function. The algorithms described are both mathematically interesting and applicable to a wide variety of complex real-life situations.

there is a flow of diffeomorphisms $x \rightarrow \xi_{s, t}(x)$ associated with this system, together with their non-singular Jacobians $D_{s, t}$.

In the terminology of Harrison and Pliska [150], the return process $Y_{t}=\left(Y_{t}^{1}, \ldots, Y_{t}^{d}\right)$ is here given by
$$d Y_{t}=(\mu-\rho) d t+\Lambda d W_{t}$$

can be removed by applying the Girsanov change of measure. Write
$$\eta(t, S)=\Lambda(t, S)^{-1}(\mu(t, S)-\rho),$$
and define the martingale $M$ by
$$M_{t}=1-\int_{0}^{t} M_{s} \eta\left(s, S_{s}\right)^{\prime} d W_{s}$$

## STAT0025 COURSE NOTES ：

Consider a standard Brownian motion $\left(B_{t}\right){t \geq 0}$ defined on $(\Omega, \mathcal{F}, P)$. The filtration $\left(\mathcal{F}{t}\right)$ is that generated by $B$. Recall that $B_{t}$ is normally distributed, and
$$P\left(B_{t}<x\right)=\Phi\left(\frac{x}{\sqrt{t}}\right)$$
Therefore
$$P\left(B_{t} \geq x\right)=1-\Phi\left(\frac{x}{\sqrt{t}}\right)=\Phi\left(-\frac{x}{\sqrt{t}}\right)$$
For a real-valued process $X$, we shall write
$$M_{t}^{X}=\max {0 \leq s \leq t} X{s}, \quad m_{t}^{X}=\min {0 \leq s \leq t} X{s}$$

# 数值方法|MATH0033 Numerical Methods代写

0

Many phenomena in engineering and the physical and biological sciences can be described using mathematical models. Frequently the resulting models cannot be solved analytically, in which case a common approach is to use a numerical method to find an approximate solution. The aim of this course is to introduce the basic ideas underpinning computational mathematics, study a series of numerical methods to solve different problems, and carry out a rigorous mathematical analysis of their accuracy and stability.

Step 1 . Evaluate the function
$$\boldsymbol{F}\left(\boldsymbol{p}{k}\right)=\left[\begin{array}{l} f{1}\left(p_{k}, q_{k}\right) \ f_{2}\left(p_{k}, q_{k}\right) \end{array}\right]$$
Step 2. Evaluate the Jacobian
$$\boldsymbol{J}\left(\boldsymbol{P}{k}\right)=\left[\begin{array}{ll} \frac{\partial}{\partial x} f{1}\left(p_{k}, q_{k}\right) & \frac{\partial}{\partial y} f_{\mathrm{I}}\left(p_{k}, q_{k}\right) \ \frac{\partial}{\partial x} f_{2}\left(p_{k}, q_{k}\right) & \frac{\partial}{\partial y} f_{2}\left(p_{k}, q_{k}\right) \end{array}\right]$$

Step 3. Solve the linear system
$$J\left(P_{k}\right) \Delta P=-F\left(P_{k}\right) \text { for } \Delta P$$
Step 4. Compute the next point:
$$P_{k+1}=P_{k}+\Delta P .$$

## MATH0033 COURSE NOTES ：

$$f(x)=P_{N}(x)+E_{N}(x),$$
where $P_{N}(x)$ is a polynomial that can be used to approximate $f(x)$ :
$$f(x) \approx P_{N}(x)=\sum_{k=0}^{N} \frac{f^{(k)}\left(x_{0}\right)}{k !}\left(x-x_{0}\right)^{k} .$$
The error term $E_{N}(x)$ has the form
$$E_{N}(x)=\frac{f^{(N+1)}(c)}{(N+1) !}\left(x-x_{0}\right)^{N+1}$$
for some value $c=c(x)$ that lies between $x$ and $x_{0}$.

# 图论|MATH0029 Graph Theory代写

0

The course aims to introduce students to discrete mathematics, a fundamental part of mathematics with many applications in computer science and related areas. The course provides an introduction to graph theory and combinatorics, the two cornerstones of discrete mathematics. The course will be offered to third or fourth year students taking Mathematics degrees, and might also be suitable for students from other departments. There will be an emphasis on extremal results and a variety of methods.

$$(1-\epsilon) p q n=(1-\epsilon) c n \leq \sum_{i=1}^{r}\left|X_{i}\right|=r \ell \leq q \ell$$
whence $(1-\epsilon) n \leq \epsilon \ell$ and hence $j<n \leq 2 \epsilon \ell$. Because $\left|Y_{s}\right| \geq 4^{-d_{j, k} \ell} \geq 4^{-\Delta} \ell$ and $\left(\Delta^{2}+2\right) \epsilon<4^{-\Delta}$,

$$\left|Y_{s}\right|-\Delta^{2} \epsilon \ell-j>4^{-\Delta} \ell-\Delta^{2} \epsilon \ell-2 \epsilon \ell=\left(4^{-\Delta}-\left(\Delta^{2}+2\right) \epsilon\right) \ell>0$$
Also, because $\epsilon<\frac{1}{4}$ and $\left|Y_{t}\right| \geq 4^{-d_{j, k} \ell}$,
$$\left(\frac{1}{2}-\epsilon\right)\left|Y_{t}\right| \geq \frac{1}{4}\left(4^{-d_{j, k}} \ell\right)=4^{-d_{j, k}-1} \ell=4^{-d_{j+1, k} \ell}$$

## MATH0029 COURSE NOTES ：

For a pair ${X, Y}$ of disjoint sets of vertices of a graph $G$, we define its index of regularity by:
$$\rho(X, Y):=|X | Y|(d(X, Y))^{2}$$
This index is nonnegative. We extend it to a family $\mathcal{P}$ of disjoint subsets of $V$ by setting:
$$\rho(\mathcal{P}):=\sum_{X, Y \in \mathcal{P}} \rho(X, Y)$$
In the case where $\mathcal{P}$ is a partition of $V$, we have:
$$\rho(\mathcal{P})=\sum_{\substack{X \in Y \in \mathcal{P} \ X \neq Y}}|X | Y|(d(X, Y))^{2} \leq \sum_{\substack{X, Y \in \mathcal{P} \ X \neq Y}}|X||Y|<\frac{n^{2}}{2}$$

# 金融数学|MATH0031 Financial Mathematics代写

0

This is a first course at the advanced undergraduate level in mathematical finance; centring on the mathematics of financial derivatives which relies on both probability theory and PDE based approaches. It assumes no prior knowledge of finance. The module begins with an introduction to the type of language and terminology used in the investment banking arena, followed by the essential elements of probability theory and stochastic calculus required for the pricing of options later in the course.

Under the equivalent martingale measure $\mathcal{Q}$, the one-factor Vasicek (1FV) model is given by
$$d r_{t}=\chi_{r}\left(\bar{r}-r_{t}\right) d t+\sigma_{r} d W_{r, t}^{\mathcal{Q}}$$

Under this specification bond prices are defined by $D(t, T)=\exp (A(t, T)-$ $\left.B(t, T) r_{t}\right)$, where $B(t, T) \equiv \frac{1-e^{-x_{f} t}}{x_{t}}$,
$$A(t, T) \equiv \frac{(B(t, T)-\tau)\left(x_{r}^{2} \bar{r}-\frac{\sigma_{r}^{2}}{2}\right)}{x_{r}^{2}}-\frac{\sigma_{r}^{2} B^{2}(t, T)}{4 \chi_{r}}$$
and, for notational convenience, $\tau \equiv T-t$.
Let $\tilde{X}{t} \equiv\left[y{l, L}(t) r_{t}\right]^{\prime}$ and $\tau_{l} \equiv T_{l}$, the term-to-maturity of the swaptions contract to be priced. The associated transform of the state vector $\tilde{X}{t}$ is given by $$\psi^{\mathcal{Q}{l+\perp L}}\left(\tilde{u} \equiv(\tilde{u} 0)^{\prime}, \tilde{X}{t}, 0, T{l}\right)=\exp \left[\alpha\left(\tau_{l}\right)+\tilde{u} y_{l, L}(0)\right]$$

## MATH0031 COURSE NOTES ：

The one-factor generalized Vasicek (1FGV) model defines the short rate $r_{t}=$ $\delta+x_{1, t}$, where $\delta \in \mathbb{R}$ is constant, and
$$d x_{1, t}=-x_{1} x_{1, t} d t+\sigma_{1} d W_{1, t^{*}}^{\mathcal{Q}}$$
Bond prices are given by $D(t, T)=\exp \left(A(t, T)+B_{x_{1}}(t, T) x_{1, t}\right)$, where, in general, $B_{x}(t, T) \equiv \frac{1-e^{-x t}}{x}$ and
$$A(t, T) \equiv-\delta \tau+\frac{1}{2} \frac{\sigma_{1}^{2}}{x_{1}^{2}}\left[\tau-2 B_{x_{1}}(t, T)+B_{2 x_{1}}(t, T)\right]$$

# 数学生态学|MATH0030 Mathematical Ecology代写

0

Mathematical models are used extensively in many areas of the Biological Sciences. This course aims to give a sample of the construction and mathematical analysis of such models in Population Ecology. The fundamental question to be addressed is: what natural (or human) factors control the abundance and distribution of the various populations of animals and plants that we see in Nature?

The rate of change in the concentrations of $n$ interacting molecular species $\left(c_{i}, i=1,2, \ldots n\right)$ is determined by their reaction kinetics and expressed in terms of ordinary differential equations
$$\frac{d c_{i}}{d t}=F_{i}\left(c_{1}, c_{2} \ldots c_{n}\right) .$$
The explicit form of the functions $F_{i}$ in Eq. (4.1) depends on the details of the reactions. Spatial inhomogeneities also cause time variations in the concentrations even in the absence of chemical reactions. If these inhomogeneities are governed by diffusion, then in one spatial dimension,

$$\frac{\partial c_{i}}{\partial t}=D_{i} \frac{\partial^{2} c_{i}}{\partial x^{2}} .$$
Here $D_{i}$ is the diffusion coefficient of the $i$ th species. In general, both diffusion and reactions contribute to the change in concentration and the time dependence of the $c_{i} \mathrm{~s}$ is governed by reaction-diffusion equations
$$\frac{\partial c_{i}}{\partial t}=D_{i} \frac{\partial^{2} c_{i}}{\partial x^{2}}+F_{i}\left(c_{1}, c_{2} \ldots c_{n}\right) .$$

## MATH0030 COURSE NOTES ：

In addition, one can also define the average value of $X$ per vertex, $X_{a}$, as well as its normalized value, $0 \leq X_{n} \leq 1$ :
$$\begin{array}{r} X_{a}=\frac{X}{V} ; \quad{ }^{k} X_{a}=\frac{{ }^{k} X}{V} \ X_{n}=\frac{X}{X\left(K_{V}\right)} ; \quad{ }^{k} X_{n}=\frac{{ }^{k} X}{{ }^{k} X\left(K_{V}\right)} \end{array}$$