Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit46a127b42678f79827fd558e05a7334dabce0a98 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-03-27 17:00:38 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-03-27 17:00:38 +0300
Files5db12f03c1a436232aef943d906c39bc45e99661
uni-projects-46a127b42678f79827fd558e05a7334dabce0a98.tar
uni-projects-46a127b42678f79827fd558e05a7334dabce0a98.tar.gz
uni-projects-46a127b42678f79827fd558e05a7334dabce0a98.zip
Parent537f74d46862f96f8370a212749791bdf3034514 (diff)
[DAA/H1] Fixed typo with z in ex 2
2 files changed, 1 insertions, 1 deletions
-rw-r--r--Year 2/Design and analysis of algorithms/Homeworks/Homework1.pdfbin60095 -> 60083 bytes
-rw-r--r--Year 2/Design and analysis of algorithms/Homeworks/Homework1.tex2
diff --git a/Year 2/Design and analysis of algorithms/Homeworks/Homework1.pdf b/Year 2/Design and analysis of algorithms/Homeworks/Homework1.pdf
index de29aab..b96b97e 100644
--- a/Year 2/Design and analysis of algorithms/Homeworks/Homework1.pdf
+++ b/Year 2/Design and analysis of algorithms/Homeworks/Homework1.pdf
Binary files differ
diff --git a/Year 2/Design and analysis of algorithms/Homeworks/Homework1.tex b/Year 2/Design and analysis of algorithms/Homeworks/Homework1.tex
index b631e3d..762021e 100644
--- a/Year 2/Design and analysis of algorithms/Homeworks/Homework1.tex
+++ b/Year 2/Design and analysis of algorithms/Homeworks/Homework1.tex
@@ -95,7 +95,7 @@
x & = 6(i+1) \\
y & = 1+\sum_{j=0}^i6j = 1+3i(i+1) \\
z & = \sum_{j=0}^{i-1}(1 + 3j(j+1)) = i + 3 \sum_{j=0}^{i-1}j(j+1) = i + 3 \left( \sum_{j=0}^{i-1} j^2 + \sum_{j=0}^{i-1} j \right) \\
- & = i + 3 \left( \frac{(i-1)i(2(i-1)+1)}{6} + \frac{(i-1)i}{2} \right) = i + 3 \left( \frac{2i^3-2i^2}{6} \right) = i^3
+ & = i + 3 \left( \frac{(i-1)i(2(i-1)+1)}{6} + \frac{(i-1)i}{2} \right) = i + 3 \left( \frac{2i^3-2i}{6} \right) = i^3
\end{align*}
\textit{База:} При първото достигане на ред 4, $i = 0$ и променливите $x, y, z$ имат стойностите, зададени на ред 2. В същото време, при инварианта $x = 6(0+1) = 6, y = 1+3.0.(0+1) = 1, z = \sum\limits_{j=0}^{-1}(1 + 3j(j+1)) = 0$.