Math for Computer Science
by Yukong Zhang
Level 0
\[
c^2=a^2+b^2 \\
c=\sqrt{a^2+b^2}
\]
\[
Area=\pi r^2
\]
\[
Circumference=2 \pi r
\]
\[
ax^2+bx+c=0 \\
b^2-4ac >= 0 \\
x_1 = \frac{-b+\sqrt{b^2-4ac}}{2a}\\
x_2 = \frac{-b-\sqrt{b^2-4ac}}{2a}
\]
\[
\begin{aligned}
a^n & = a \times a \dots \times a \\
a^0 & = 1 \\
a^{-n} & = \frac{1}{a^n} \\
a^r \times a^s & = a^{r+s} \\
\frac{a^r}{a^s} & = a^{r-s} \\
(a^r)^s & = a^{rs} \\
(ab)^r & = a^rb^r \\
(\frac{a}{b})^r & = \frac{a^r}{b^r} \\
\end{aligned}
\]
\[
log_2 N = M \\
2^M=N
\]
\[
\bar a = \frac{a_1+a_2+\dots+a_n}{n}=\frac{1}{n} \sum_{k=1}^n a_k \\
\bar a_w = w_1 a_1+w_2 a_2+\dots+w_n a_n=\sum_{k=1}^n w_k a_k \\
w_1+w_2+\dots+w_n = 1 =100\%
\]
\[
C(n, k) = {n \choose k} = \frac{n!}{k!(n-k)!} \\
P(n, k) = \frac{n!}{(n-k)!}
\]