diff --git a/exams/fermat-primality/index.md b/exams/fermat-primality/index.md index 06ff8fb..6505d1f 100644 --- a/exams/fermat-primality/index.md +++ b/exams/fermat-primality/index.md @@ -26,13 +26,13 @@ respective number, are avoided when testing your implementation of this task. To generate pseudorandom numbers in a given interval, use the *Linear Congruential Generator (LCG)* $$ - x_{n+1} = (A x_n + C) \ \texttt{mod }M, + x_{n+1} = (A x_n + C) \ \texttt{mod}\, M, $$ where $A$, $C$ and $M$ are constants. This equation generates the next pseudorandom number $x_{n+1}$ from the previous $x_n$. The number $x_0$ is the seed. The number $b$ drawn from $(1)$ can be transformed to the interval $b^\text{lower} \leq b' < b^\text{upper}$ as $$ - b' = (b \ \texttt{mod } (b^\text{upper} - b^\text{lower})) + b^\text{lower}. + b' = (b \ \texttt{mod}\, (b^\text{upper} - b^\text{lower})) + b^\text{lower}. $$ diff --git a/exams/minimum-spanning-tree/index.md b/exams/minimum-spanning-tree/index.md index 2b52872..6944c42 100644 --- a/exams/minimum-spanning-tree/index.md +++ b/exams/minimum-spanning-tree/index.md @@ -13,7 +13,7 @@ $E'\subseteq E$, $T$ is a tree (i.e., a connected graph without cycles) and $\su minimum possible among such trees. The figure shows an example of a connected weighted graph and its minimum spanning tree. -![Left: A connected, weighted graph. Right: Its minimum spanning tree of weight 16.](/img/minimum-spanning-tree-graph.svg){class="inverting-image"} +![Left: A connected, weighted graph. Right: Its minimum spanning tree of weight 16.](/img/minimum-spanning-tree-graph.svg){style="width: 100%; margin: auto", class="inverting-image"} Your task is to implement an algorithm computing the minimum spanning tree, i.e., a function returning for a given connected weighted graph $(V,E)$ the subset $E'$ diff --git a/exams/sierpinski-carpet/index.md b/exams/sierpinski-carpet/index.md index 8bf7634..27651ec 100644 --- a/exams/sierpinski-carpet/index.md +++ b/exams/sierpinski-carpet/index.md @@ -10,7 +10,7 @@ outline: deep The *Sierpiński carpet* is a plane fractal first described by Wacław Sierpiński in 1916. Your task is to generate this fractal in a text format represented as a list of strings. Each string represent a single row in the picture. The picture $f(n)$ is defined recursively. -For $n=0$, we define $f(0)="\#"$. For $n>0$, we define $f(n)$ as the picture depicted below. +For $n=0$, we define $f(0) = \texttt{"\#"}$. For $n>0$, we define $f(n)$ as the picture depicted below. In other words, $f(n)$ consists of eigth copies of $f(n-1)$ and the middle box of the same size as $f(n-1)$ filled with spaces.