aboutsummaryrefslogtreecommitdiffstats
path: root/main.tex
diff options
context:
space:
mode:
authorYigit Sever2020-11-07 03:51:35 +0300
committerYigit Sever2020-11-07 03:51:35 +0300
commitd7bee95a5538e10ac13dd8f91aa773e3a776bff5 (patch)
tree4f1f105560b6c75506a046dd9d45903b76e5e238 /main.tex
parentf292c5a0e54c010bb7a00586a6e3c1b14831a5bc (diff)
downloadhw1-d7bee95a5538e10ac13dd8f91aa773e3a776bff5.tar.gz
hw1-d7bee95a5538e10ac13dd8f91aa773e3a776bff5.tar.bz2
hw1-d7bee95a5538e10ac13dd8f91aa773e3a776bff5.zip
Answer 4.a done
Diffstat (limited to 'main.tex')
-rw-r--r--main.tex32
1 files changed, 16 insertions, 16 deletions
diff --git a/main.tex b/main.tex
index 21235f0..8002998 100644
--- a/main.tex
+++ b/main.tex
@@ -461,7 +461,7 @@ And when the limit of two functions $f, g$ converge to some constant $c$, then $
461\section{Big $\mathcal{O}$ and $\Omega$}% 461\section{Big $\mathcal{O}$ and $\Omega$}%
462\label{sec:big_o_and_omega_} 462\label{sec:big_o_and_omega_}
463 463
464% question a ALMOST DONE {{{1 % 464% question a {{{1 %
465 465
466\begin{question} 466\begin{question}
467 Let $f(n)$ and $g(n)$ be asymptotically positive functions. Prove or disprove the following conjectures. 467 Let $f(n)$ and $g(n)$ be asymptotically positive functions. Prove or disprove the following conjectures.
@@ -484,7 +484,7 @@ If we rearrange the right hand side of the Proposition~\ref{eq:a_bigo};
484 0 \le \frac{1}{c} f(n) \le g(n) \\ 484 0 \le \frac{1}{c} f(n) \le g(n) \\
485\end{equation*} 485\end{equation*}
486 486
487or simply, 487Or simply,
488 488
489\begin{equation} 489\begin{equation}
490 \label{eq:a_bio_rearranged} 490 \label{eq:a_bio_rearranged}
@@ -503,21 +503,11 @@ Has to be true, yet from Equation~\ref{eq:a_bio_rearranged} we know that $f(n)$
503 $f(n) = \mathcal{O}((f(n))^{2})$ 503 $f(n) = \mathcal{O}((f(n))^{2})$
504\end{info} 504\end{info}
505 505
506% TODO: this is dumb ask this <05-11-20, yigit> %
507
508% https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/assignments/ps1sol.pdf 506% https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/assignments/ps1sol.pdf
509 507
510The question text states that $f(n)$ is a positive function. 508We can reuse the definition of Big $\mathcal{O}$ notation given in Equation~\ref{eq:a_bigo}, and using the question text, we have;
511
512By the definition of Big $\mathcal{O}$ notation, we have;
513 509
514\begin{equation*}% 510For $c > 1$ and $n_{0} > 1$;
515 \exists ~ c > 0 \quad \text{and} \quad n_{0} \ge 0 \mid ~ 0 \le f(n) \le c \cdot g(n) \quad \forall n \ge n_{0}
516\end{equation*}
517
518For $c > 1$ and $n_{0} > 1$ we have;
519
520% TODO: this makes zero sense? <06-11-20, yigit> %
521 511
522\begin{align*}% 512\begin{align*}%
523 f(n) &\le f(n)^{2} \quad \forall n \ge n_{0} \\ 513 f(n) &\le f(n)^{2} \quad \forall n \ge n_{0} \\
@@ -525,6 +515,8 @@ For $c > 1$ and $n_{0} > 1$ we have;
525 f(n) &\le c\cdot g(n) \quad \forall n \ge n_{0} 515 f(n) &\le c\cdot g(n) \quad \forall n \ge n_{0}
526\end{align*} 516\end{align*}
527 517
518For $f(n) \ge 1$. The conjecture is true for asymptotically positive function $f(n)$ but does not hold for an $f(n) < 1$.
519
528\begin{info}[] 520\begin{info}[]
529 $f(n) + o(f(n)) = \Theta(f(n))$ 521 $f(n) + o(f(n)) = \Theta(f(n))$
530\end{info} 522\end{info}
@@ -556,10 +548,18 @@ It's trivial to pick $c_1 < 1$ to deal with the left hand side of the inequality
556 f(n) \le f(n) + g(n) 548 f(n) \le f(n) + g(n)
557\end{equation*} 549\end{equation*}
558 550
559For the right hand side, we can pick $n_{0} = 1$ and $c = 1$ in the Equation~\ref{eq:a_little_o}; keeping $g(n) < f(n)$. 551For the right hand side; we can start by picking $n_{0} = 1$ and $c = 1$ in the Equation~\ref{eq:a_little_o}; keeping $g(n)$ strictly smaller than $f(n)$.
552
553In order to prove the right hand side of the inequality; we can pick $c_2 > 2$ which equals;
560 554
561Finally, picking $c2 > 2$ proves the conjecture. 555\begin{eqnarray*}%
556 \label{eq:c2gt2}
557 f(n) + g(n) \le 2 \cdot f(n) \\
558 \cancel{f(n)} + g(n) \le \cancel{2 \cdot} f(n) \\
559 g(n) \le f(n)
560\end{eqnarray*}
562 561
562Which we proved above using Equation~\ref{eq:a_little_o}. This conjecture is \emph{true}.
563 563
564% 1}}} % 564% 1}}} %
565 565