Skip to content

Commit

Permalink
fix remaining refs
Browse files Browse the repository at this point in the history
  • Loading branch information
nmheim committed May 2, 2024
1 parent cfe422d commit 1aa403f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion exams/least-common-ancestor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To find the least common ancestor of two nodes $x$ and $y$ in a tree $t$, we fol
3. consider the common prefix of $p_x$ and $p_y$, the last node in the common prefix is the least
common ancestor.

Consider, for example, the binary tree depicted in Figure~\ref{fig:tree}. The least common ancestor
Consider, for example, the binary tree depicted below. The least common ancestor
of $3$ and $5$ is $2$. Indeed, the path from the root $1$ to $3$ is $1,2,3$. The path from $1$
to $5$ is $1,2,4,5$. Their common prefix is $1,2$ whose last element is $2$.

Expand Down
4 changes: 2 additions & 2 deletions exams/unit-propagation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $$
$$
is represented as
$$
\varphi=\{\{a,b,\neg c,\neg f\}, \{b,c\}, \{\neg b, e\}, \{\neg b\}\}.
\varphi=\{\{a,b,\neg c,\neg f\}, \{b,c\}, \{\neg b, e\}, \{\neg b\}\}. \qquad (1)
$$

One of the subroutines of the DPLL algorithm is the unit propagation simplifying the input formula.
Expand All @@ -29,7 +29,7 @@ $c_k=\{u\}$ for some $k$ and literal $u$, then $\varphi$ can be simplified by th
1. if $u\in c_i$, then $c_i$ can be removed from $\varphi$,
2. if $\neg u\in c_i$, then $\neg u$ can be removed from $c_i$.

For example, the formula $\varphi$ in~(\ref{ex1}) has a unit $\{\neg b\}$, so we can simplify to
For example, the formula $\varphi$ in $(1)$ has a unit $\{\neg b\}$, so we can simplify to
$\{\{a,\neg c,\neg f\}, \{c\}\}$. Note that by propagating the unit, a new unit was created. Thus we
can continue and propagate the unit $\{c\}$ obtaining $\{\{a,\neg f\}\}$. The resulting set of
clauses has no unit.
Expand Down
4 changes: 2 additions & 2 deletions homework/hw01.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ $\lfloor{i}\rfloor$ is that $i$ might be slightly larger than $255$ due to round

The function returned by `ascii-art` should split the matrix of intensities into blocks. The size of
blocks is given by the arguments `width` and `height` The separation of the matrix into blocks is
depicted in Figure~\ref{fig:separation}. In case the width (resp. height) of the matrix is not
depicted below. In case the width (resp. height) of the matrix is not
divisible by `width` (resp. `height`) the incomplete blocks have to be removed from the matrix as is
illustrated by the red area in the figure below:
illustrated by the red area:

<img src="/img/blocks.svg" style="width: 50%; margin-left: auto; margin-right: auto;" />

Expand Down

0 comments on commit 1aa403f

Please sign in to comment.