From 3fe8ee352845741d97a76e2ed6a390cb1481d755 Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Sat, 16 Nov 2024 21:43:46 +0100 Subject: minor changes --- content/other/other.tex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'content/other/other.tex') diff --git a/content/other/other.tex b/content/other/other.tex index 426875a..9f8cfce 100644 --- a/content/other/other.tex +++ b/content/other/other.tex @@ -86,8 +86,7 @@ $n$ Personen im Kreis, jeder $k$-te wird erschossen. \begin{description} \item[Spezialfall $\boldsymbol{k=2}$:] Betrachte $n$ Binär. - Für $n = 1b_1b_2b_3..b_n$ ist $b_1b_2b_3..b_n1$ die Position des letzten Überlebenden. - (Rotiere $n$ um eine Stelle nach links) + Für $n = 1b_1b_2b_3..b_n$ ist $b_1b_2b_3..b_n0$ die Position des letzten Überlebenden. \end{description} \sourcecode{other/josephus2.cpp} @@ -98,7 +97,6 @@ Also: $F(n,k) = (F(n-1,k)+k)\%n$. Basisfall: $F(1,k) = 0$. \end{description} \sourcecode{other/josephusK.cpp} - \textbf{Beachte bei der Ausgabe, dass die Personen im ersten Fall von $\boldsymbol{1, \ldots, n}$ nummeriert sind, im zweiten Fall von $\boldsymbol{0, \ldots, n-1}$!} \end{algorithm} \begin{algorithm}[optional]{Zeileneingabe} -- cgit v1.2.3