# Search

## other

### (10 points)2. Series 33. Year - S.

We are sorry. This type of task is not translated to English.

### (10 points)1. Series 33. Year - P. planet destroyer

How small could a weapon capable of destroying a planet be? We are interested in the smallest and the lightest such weapons. The process should be reasonably fast, at least shorter than a human lifetime, and the faster it is, the better.

Karel watches sci-fi too much, this time the subtitles of Men in Black II.

### (10 points)1. Series 33. Year - S. slow start-up

Karel wants to have the longest problem assignment.

### (3 points)5. Series 32. Year - 2. warm reachability into the ball

Imagine you have subcooled homogeneous metal ball that you have just taken out of a freezer set to very low temperature. You want to find out how fast the ball temperature will increase if you put it in a warm room. It would be a university-level problem. Because of that, we made it easier for you. We ask about how deep into the ball will the „warm area“ reach. You can estimate it using dimensional analysis. We know relevant parameters of the ball - its density $\left [ \rho \right ] = \jd {kg.m^{-3}}$, specific heat capacity $\left [c\right ] = \jd {J.kg^{-1}.K^{-1}}$, thermal conductivity of the ball $\left [ \lambda \right ] = \jd {W.m^{-1}.K^{-1}}$ and we are interested in dependence on time $\left [t\right ] = \jd {s}$.

Karel inspired himself by a problem from Eötvös Competition.

### (10 points)6. Series 31. Year - S. Matrices and populations

1. Simulate the dynamics of a predator-prey system using Lotka–Volterra equations \begin{align*} \frac{\d x}{\d t} &= r\_x x - D\_x xy ,\\ \frac{\d y}{\d t} &= r\_y xy - D\_y y . \end {align*} where $x$ and $y$ are the population sizes of prey and predator respectively, the parameters $r\_x$ and $r\_y$ represent the populations’ growth and the parameters $D\_x$ and $D\_y$ represent the shrinking of the populations. Set the parameters to be $r\_x = 0{.}8$, $D\_x0= 1{.}0$, $r\_y = 0{.}75$, $D\_y = 1{.}5$. Run the simulations for several different value pairs for initial population sizes $x = 0{.}5$ and $y = 2{.}0$; $x = 1{.}5$ and $y = 0{.}5$; $x = 1{.}95$ and $y = 0{.}75$. Plot the predator population size as a function of the prey population size. Discuss the results.
Bonus: Find the solutions for the same situations analytically (by integrating the differential equations).
2. Using the competitive Lotka–Volterra equations \begin{align*} \frac{\d x}{\d t} = r\_x x $1 - $$\frac {x + I\_{xy} y}{k\_x}$$$ , \frac{\d y}{\d t} = r\_y y $1 - $$\frac {y + I\_{yx} x}{k\_y}$$$ . \end {align*} simulate the dynamics of two competing populations (e.g. hawks and eagles) for the following values of parameters: $r\_h = 0{.}8$, $I\_{he} = 0{.}2$, $k\_h = 2{.}0$, $r\_e = 0{.}6$, $I\_{eh} = 0{.}3$, $k\_e = 1{.}0$. Set the initial population sizes to be $h = 0{.}01$, $e = 1{.}0$. Then, simulate the same situation, but change the interaction coefficients to $I\_{he} = 1{.}5$ a $I\_{eh} = 0{.}6$. Plot the results in one graph - the sizes of populations vs time. Discuss the results.
3. Verify the importance of pivoting.
Solve the system of linear equations $\begin{equation*} \begin{pmatrix} 10^{-20} & 1\\ 1 & 1 \end{pmatrix} \begin{pmatrix} x_1\\ x_2 \end{pmatrix} = \begin{pmatrix} 1\\ 0 \end{pmatrix} \end {equation*}$ at first exactly (on paper), then using LU factorization with partial pivoting (you may utilize some Python module, e.g. scipy.linalg.lu()), and finally, solve the system using LU factorization without pivoting. Compare the resultant  $\vect {x}$ obtained from the three methods and the results of matrix multiplication $L^{-1}\cdot U$ ($P\cdot L^{-1}\cdot U$ in the case of pivoting).
4. Consider an infinite parallel-plate capacitor. The gap between plates has a thickness $L=10 \mathrm{cm}$ and the voltage between the plates is $U=5 \mathrm{V}$. Between the plates of the capacitor grounded electrode in the shape of an infinitely long prism with square base of side length $a=2 \mathrm{cm}$, whose center lies $l=6{,}5 \mathrm{cm}$ away from the grounded plane of the original capacitor. The prism is oriented such that one of its short sides is perpendicular to the capacitor plates. Find the distribution of electric potential in the condensator. Since the problem has a translational symmetry in the direction of the infinite side of the prism, it is sufficient to solve it only in the plane parallel to the plates, i.e. it is a 2D problem. Render the potential distribution in this plane. You may utilize the code attached to this task.
Bonus: Calculate and render the distribution of the electric field strength $\vect {E}$.

Mirek and Lukáš fill matrices with atto-foxes.

### (9 points)5. Series 31. Year - P. floating mercury

Try to invent as much „physics tricks“ as possible thanks to which mercury would float on the liquid water for at least a limited time. The more permanent solution you find, the better.

### (10 points)5. Series 31. Year - S. Differential equations are growing well

1. Solve the two-body problem using the Verlet algorithm and the fourth-order Runge-Kutta method (RK4) over several (many) periods. Use a step size large enough for the numerical errors to become significant. Observe the way the errors manifest themselves on the shape of the trajectories.
2. Solve for the time-dependent position equation of a damped linear harmonic oscillator described by the equation $\ddot {x}+2\delta \omega \dot {x}+\omega ^2 x=0$, where $\omega$ is the angular velocity and $\delta$ is the damping ratio. Change the parameters around and observe the changes in the oscillator’s motion. For which values of the parameters is damping the fastest?
3. Model sedimentation using the method of ballistic deposition $\begin{equation*} h_i(t+1) = max($h_{i-1}(t), h_i(t)+1, h_{i+1}(t)$) \, , \end {equation*}$ where $h_i$ is the height of i-th column. And study the development of the roughness of the surface $W(t,L)$ (see this year’s series 4, problem S). Initially (for small values of $t$) the roughness is proportional to some power of $t$: $W(t,L) \sim t^{\beta }$. For large values of $t$, however, it is proportional to some (possibly different) power of the grid length $L$. $W(t,L) \sim L^{\alpha }$. Find the powers $\alpha$ and $\beta$. Choose an appropriate step size so that you could study both modes of sedimentation. The length of the surface should be at least $L = 256$. (Warning: the simulations may take several hours.)
4. Simulate on a square grid the growth of a tumor using the Eden growth model with the following variation: when a healthy and an infected cell come into contact, the probability of the healthy one being infected is $p_1$ and the probability of the infected one being healed is $p_2$. Initially, try out $p_1 \gg p_2$, the proceed with $p_1 > p_2$ and then with $p_1 < p_2$. At the beginning, let only 5 cells (arranged into the shape of a cross) be infected.
Describe qualitatively what you observe.
5. Rewrite the attached code for the growth of a fractal (diffusion limited aggregation model) on a hexagonal grid to the growth of a fractal on a square grid and calculate the dimension of the resultant fractal.

Note: Using the codes attached to this task is not mandatory, but it is recommended.

Mirek and Lukáš have already grown their algebra, now they have different seeds.

### (10 points)4. Series 31. Year - S. Rootses and automatons

1. Find all (three) real roots of the function $\exp (x)-5x^2$. Choose an appropriate method yourself and comment on the reasons behind your choice.
2. Newton’s method works even for functions of complex variable. Your task is to render so called Newton fractals, i.e. areas in complex plane in which choosing an initial guess for Newton’s method leads to converging on a specific root. Render the fractals for the functions $z^3-1$ and $z^6+z^3-1$, where $z$ is a complex number. The derivations of these functions are $3z^2$, and $6z^5+3z^2$ respectively. For calculations and rendering you may utilize the Python code attached to this task.
Note: Complex derivation, if it exists, can be calculated the same way as normal derivation..
Bonus: Find as beautiful or interesting Newton fractal as you can.
3. Simulate on computer (or calculate by hand) an elementary cellular automaton abiding by the rule 54 on a grid with size 20 and periodical conditions for at least 10 time steps (more certainly can’t hurt). At the beginning, one arbitrary cell has the value 1, the rest 0. Plot the result on a spacetime diagram.
4. Simulate the changes in roughness $W$ of a 1D surface using a model of random deposition. The roughness $W$ is given by the equation $\begin{equation*} W(t,L) = \sqrt {\frac {1}{L^d}\sum _i h_i^2-$\frac {1}{L^d}\sum _i h_i$^2} \, . \end {equation*}$ Where $d$ is the dimension, $L = 100$ is the length of the surface and $h_i$ is the height of the i-th column. Initially, the surface is perfectly flat. Plot the roughness as a function of time for at least $10^8$ steps (one step $=$ one new particle), discuss the results.
Note: Random deposition simply means that in each step of the simulation, the height of one randomly selected column will increase by one.

Lukáš and Mirek take inspiration from their lectures.

### (8 points)3. Series 31. Year - P. folded paper

Everyone has certainly heard and surely tried it: „Sheet of paper can not be folded in a half more than seven times.“ Is it really true? Find boundary conditions.

Kuba was bored and folded a paper.

### (10 points)3. Series 31. Year - S. a walk with integrals

1. Propose three different examples of Markov chains, at least one of which is related to physics. Is a random walk without backtracking (a step cannot be time reversed previous step) an example of Markov chain? What about a random walk without a crossing (it can lead to each point at most once)?
2. Consider a 2D random walk without backtracking on a square grid beginning at the point $(x,y) = (0,0)$. It is constrained by absorbing states $b_1\colon y = -5$, $b_2\colon y = 10$. Find the probability of the walk ending in $b_1$ rather than in $b_2$.
3. Simulate the motion of a brownian particle in 2D and plot the mean distance from the origin as a function of time. Assume a discrete time and a constant step size. (One step takes $\Delta t = \textrm{const}$, and the step size is $\Delta l = \textrm{const}$). A step in any arbitrary direction is possible, i.e. every step is described by it’s length and an angle $\theta \in [0,2\pi )$, while all directions are equally probable. Focus especially on the asymptotic behavior, i.e. the mean distance for $t \gg \Delta t$.
4. Error function is defined as $\begin{equation*} {erf}(x)=\frac {2}{\sqrt {\pi }}\int _0^x \eu ^{-t^2} \d t . \end {equation*}$ Calculate the integral for many different values of $x$ and plot it’s value as a function of $x$. What do you get by numerically deriving this function?
5. Look up the definition of Maxwell-Boltzmann probability distribution $f(v)$, i.e. the probability distribution of speeds of particles in an idealized gas. Utilizing MC integration calculate the mean value of speed defined as $\begin{equation*} \langle v\rangle = \int _0^{\infty } vf(v) \d v , \end {equation*}$ Use the Metropolis-Hastings algorithm for sampling the Maxwell-Boltzmann distribution. Compare the values of particular parameters with the values from literature.

Mirek and Lukáš random-walk to school.