Skip to content

Commit 47fefcf

Browse files
authored
Fix lecture 1 errors (#23)
* fix(ln1): fix some error thanks @L-LYR for pointing it out fix #20 * fix(ln1): remove unused assertions
1 parent a3d6bb5 commit 47fefcf

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

src/Ln1-AsymptoticOrderGrowth.tex

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ \subsection{渐进上界 $O$}
4545
\forall n \geq 1,t & hen\ qn\leq qn^2,r\leq rn^2 \\
4646
\Longrightarrow f(n) & =pn^2+qn+r \\
4747
& \leq pn^2+pn^2+rn^2 \\
48-
& =(p+q+r)n^2
48+
& =(p+q+r)n^2 \\
49+
& = O(n^2)
4950
\end{align*}
5051
\end{proof}
5152
注意到$O(\cdot)$仅仅代表一个上界,并不代表函数准确的增长率,例如$pn^2+qn+r=O(n^3)$也是成立的
@@ -63,10 +64,9 @@ \subsection{渐进下界\ $\Omega$}
6364
证明如下:
6465
\begin{proof}
6566
\begin{align*}
66-
\forall n \geq 1,t & hen\ qn\leq 0,r\geq 0 \\
67-
\Longrightarrow f(n) & =pn^2+qn+r \\
68-
& \geq pn^2+pn^2+rn^2 \\
69-
& =(p+q+r)n^2
67+
\forall n \geq 1,\,f(n) & =pn^2+qn+r \\
68+
& \geq pn^2 \\
69+
& = \Omega (n^2)
7070
\end{align*}
7171
\end{proof}
7272

@@ -77,7 +77,7 @@ \subsection{渐进紧界$\Theta$}
7777
,在这种情况下,我们可以说$f(n)=\Theta(g(n))$
7878
\begin{definition}{$\Theta(\cdot)$}{def3}
7979
\[
80-
\Theta(g(n)) = \{f(n): \exists\ c_1,c_2,n_0\in R^+,such\ that: \forall n\ge n_0:0\le c_1 g(n)\le f(n)\le c_2 g(n)\}
80+
\Theta(g(n)) = \{f(n): \exists\ c_1,c_2,n_0\in R^+,\text{such that:} \forall n\ge n_0:0\le c_1 g(n)\le f(n)\le c_2 g(n)\}
8181
\]
8282
\end{definition}
8383

@@ -94,20 +94,19 @@ \subsection{渐进紧界$\Theta$}
9494
\]
9595
那么$f(n)=\Theta(g(n))$,关于该部分的证明,留给读者自行探索。
9696

97-
9897
\section{渐进增长的一些性质}
9998
下面将给出渐进增长的一些性质,对于性质的证明,可以自己证明,然后与\cite{textbook1}的P38-P40的证明进行对照
10099
\begin{theorem}{Transitivity}{}
101-
(a)\ If\ $f=O(h)$\ and\ $g=O(h)$, then $f=O(h)$\\
102-
(b)\ If\ $f=\Omega(h)$\ and\ $g=\Omega(h)$, then $f=\Omega(h)$\\
103-
(c)\ If\ $f=\Theta(h)$\ and\ $g=\Theta(h)$, then $f=\Theta(h)$
100+
(a)\ If\ $f=O(g)$\ and\ $g=O(h)$, then $f=O(h)$\\
101+
(b)\ If\ $f=\Omega(g)$\ and\ $g=\Omega(h)$, then $f=\Omega(h)$\\
102+
(c)\ If\ $f=\Theta(g)$\ and\ $g=\Theta(h)$, then $f=\Theta(h)$
104103
\end{theorem}
105104

106105
\begin{theorem}{Sum\ of\ Functions}{}
107106
假设$f$$g$是两个函数,若对某个其他的函数$h$,都有:$f=O(h),g=O(h)$\\
108107
那么,$f+g=O(h)$\\
109108
推广开来:令k是确定的常数,$f_1,f_2,f_3,\ldots,f_k$$h$是函数,且
110-
$f_i=O(h)$ \ \ $i\in (1,k)$,\\
109+
$f_i=O(h)$ \ \ $i\in [1,k]$,\\
111110
那么,$\sum^{k}_{i=1}f_i=O(h)$
112111
\end{theorem}
113112

0 commit comments

Comments
 (0)