Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nmheim committed Jun 6, 2024
1 parent 75848a1 commit 7f7634d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions exams/fermat-primality/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
$$


Expand Down
2 changes: 1 addition & 1 deletion exams/minimum-spanning-tree/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'$
Expand Down
2 changes: 1 addition & 1 deletion exams/sierpinski-carpet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 7f7634d

Please sign in to comment.