From 191e37908a445751ec66d7ae829bda51c7b1aa5c Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Tue, 9 Nov 2021 15:48:34 -0500 Subject: [PATCH] [F] A4 P3.2 Fix typo --- assignments/a4/a4.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assignments/a4/a4.tex b/assignments/a4/a4.tex index c76743c..4ced7dc 100644 --- a/assignments/a4/a4.tex +++ b/assignments/a4/a4.tex @@ -274,7 +274,7 @@ Let $c_0, \dots, c_n$ be constants that doesn't depend on any variables. The inner loop \code{for p in primes} runs $P$ iterations, and since each iteration contains only a constant number of constant-time operations, taking $c_0P$ steps where $c_0$ is a constant. The outer loop iterates $m - 1$ times, taking $c_0P + c_1$ steps each time, with a total of $(m - 1)(c_0P + c_1)$ steps. -Since there are only constant-time operations outisde the outer loop, the entire function will take $(m - 1)(c_0P + c_1) + c_2$ steps. +Since there are only constant-time operations outside the outer loop, the entire function will take $(m - 1)(c_0P + c_1) + c_2$ steps. Thus, the total number of basic operations is: \begin{align} @@ -282,8 +282,9 @@ RT_{\code{starting\_coprime\_numbers}}(P, m) &= (m - 1)(c_0P + c_1) + c_2 \\ & = c_0mP + c_1m - c_0P + c_3 \\ & \in \Theta(mP) \end{align} + \item[3.] -TODO: Running-time analysis of \texttt{coprime\_to\_all}. +Running-time analysis of \texttt{coprime\_to\_all}. \end{enumerate} \section*{Part 4: Two New Cryptosystems}