~shreyasminocha/uni-notes

b343c48e746986e5a0537bc5a748314533f92655 — Shreyas Minocha a month ago c29d619 main
Update
2 files changed, 28 insertions(+), 7 deletions(-)

M comp/182.md
M elec/220.md
M comp/182.md => comp/182.md +15 -7
@@ 767,7 767,7 @@ $$\left(x + y\right)^n = \sum_{i = 0}^n \binom{n}{i} x^{n - i} y^i$$

**pascal's identity**: $\binom{n}{k} = \binom{n - 1}{k - 1} + \binom{n - 1}{k}$

**vandermonde's identity**: $\binom{m + n}{k} = \sum{l = 0}{k} \binom{m}{k - l} \binom{n}{l}$
**vandermonde's identity**: $\binom{m + n}{k} = \sum_{l = 0}^{k} \binom{m}{k - l} \binom{n}{l}$

## Disscrete Probability



@@ 869,24 869,32 @@ Run $n$ independent Bernoulli trials and count the number of successes in the se

$p(X = k) = \binom{n}{k} p^k {(1 - p)}^{n - k}$

$\mathbb{E}(x) = np$
$\mathbb{E}(X) = np$

$V(x) = np(1 - p)$
$V(X) = np(1 - p)$

#### Geometric Distribution

$p(x) = {(1 - p)}^{k - 1} p$
$p(X = k) = {(1 - p)}^{k - 1} p$

$\mathbb{E}(x) = \frac{1}{p}$
$\mathbb{E}(X) = \frac{1}{p}$

$V(x) = \frac{1 - p}{p^2}$
$V(X) = \frac{1 - p}{p^2}$

#### Negative Binomial Distribution

$l$ trials until we see $k$ successes

$p(X = l) = \binom{l - 1}{k - 1} {(1 - p)}^{l - k} p^k$

#### Poisson Distribution

### Markov Chains and Hidden Markov Models (HMMs)

-   initial distribution ($\pi$)
-   emission probability ($E_l(X_i)$)
-   transition matrix ($A_{l', l}$)

### Parameter Estimation For Markov Chains

## Dynamic Programming


@@ 973,7 981,7 @@ If there exists a 1-1 function $f : X \rightarrow Y$, then $|X| \leq |Y|$.

There exists a bijection $f : X \rightarrow Y$ iff there exists a bijection $g : Y \rightarrow X$.

**Shröder-Bernstein Theorem**: if $A$ and $B$ are two sets such that $|A| \leq |B|$ and $|B| \leq |A|$, then $|A| = |B|$.
**Shröder-Bernstein Theorem**: if $A$ and $B$ are two sets such that $|A| \leq |B|$ and $|B| \leq |A|$, then $|A| = |B|$. Show a one-to-one function $f : A \rightarrow B$ and a one-to-one function $g : B \rightarrow A$.

### An infinity of infinities


M elec/220.md => elec/220.md +13 -0
@@ 302,3 302,16 @@ locality:

-   temporal locality
-   spatial locality

types:

-   direct-mapped cache
-   set associative cache

$C = S \times E \times B$ data bytes

-   $S = 2^s$
-   $E = 2^e$. when direct-mapped, $e = 1$
-   $B = 2^b$

Word length: $t + s + b$