diff --git a/content/posts/KBhconvolution.md b/content/posts/KBhconvolution.md new file mode 100644 index 000000000..4be19019c --- /dev/null +++ b/content/posts/KBhconvolution.md @@ -0,0 +1,133 @@ ++++ +title = "convolution" +author = ["Houjun Liu"] +draft = false ++++ + +For \\(f,g : \mathbb{R} \to \mathbb{C}\\), we have: + +\begin{equation} +(f \* g)(x) = \int\_{\mathbb{R}} f(x-y) g(y) \dd{y} = \int\_{\mathbb{R}} f(y) g(x-y) \dd{y} +\end{equation} + + +## properties of convolution {#properties-of-convolution} + +- \\((g \* f) (x) = (f \* g) (x)\\) +- \\(\mathcal{F}(f \* g) = \mathcal{F}(f)\mathcal{F}(g)\\) +- \\(\mathcal{F}^{-1}(\hat{f} \hat{g}) = f \* g\\) +- \\((f \* g)' = f \* g' = f' \* g\\) +- \\(\lambda ( f \* g ) = (\lambda f) \* g = f \* (\lambda g)\\) + +=> "in a convolution, if **ANY ONE** of the two functions are [Differentiable]({{< relref "KBhuniqueness_and_existance.md#differentiable" >}}), both are [Differentiable]({{< relref "KBhuniqueness_and_existance.md#differentiable" >}})."; think about smoothing a jagged function using a [Gaussian]({{< relref "KBhgaussian.md" >}}). + + +## examples {#examples} + + +### rolling average {#rolling-average} + +\begin{align} +U\_{L}(x) = \begin{cases} +L, |x| \leq \frac{1}{2L} \\\\ +0, |x| > \frac{1}{2L} +\end{cases} +\end{align} + +The width of the area for which the expression is positive is \\(2L\\), and the height is \\(L\\), so the area (integral) is \\(1\\). + +So now let's consider: + +\begin{equation} +(f \* U\_{L})(x) +\end{equation} + +which is: + +\begin{equation} +\int\_{\mathbb{R}} f(x-y) U\_{L}(y) \dd{y} +\end{equation} + +meaning: + +\begin{equation} +L \int\_{-\frac{1}{2}L}^{\frac{1}{2}L} f(x-y) \dd{y} +\end{equation} + +You will note that we are sweeping something of window width \\(\frac{1}{L}\\) over the function, which averages the function \\(f\\) over the window \\(L\\). + +So convolving with this function essentially smoothes function over a window \\(\frac{1}{L}\\); as \\(L\\) decreases, we are averaging over a greater interval; vise versa. + + +### signal compression {#signal-compression} + +Write your signal in terms of its Fourier transform: + +\begin{equation} +f(t) = \frac{1}{2\pi} \int\_{-\infty}^{\infty} e^{it\lambda} \hat{f}(\lambda) \dd{\lambda} +\end{equation} + +We can write: + +\begin{equation} +\hat{f}(\lambda) \cdot 1\_{J}(\lambda) +\end{equation} + +whose inverse Fourier transform would be: + +\begin{equation} +f(x) \* \mathcal{F}\qty(1\_{J}(\lambda)) +\end{equation} + + +## motivation {#motivation} + +What if we want the [Fourier Transform]({{< relref "KBhfourier_transform.md" >}}) of \\(\hat{f}(\lambda)\hat{g}(\lambda)\\) in terms of one expression? + +Consider: + +\begin{equation} +\hat{f}(\lambda) \hat{g}(\lambda) = \qty(\int\_{\mathbb{R}} f(x) e^{-i\lambda x} \dd{x}) \qty(\int\_{\mathbb{R}} g(y) e^{-i\lambda y} \dd{y}) +\end{equation} + +Notice that because neither integral have dependence on the other, we can actually: + +\begin{equation} +\hat{f}(\lambda) \hat{g}(\lambda) = \int\_{\mathbb{R}} \int\_{\mathbb{R}} f(x) g(y) e^{-i\lambda (x+y)} \dd{x}\dd{y} +\end{equation} + +writing this as a change of variable: + +\begin{equation} +\begin{cases} +u = x+y \\\\ +x = u-y \\\\ +\dd{x} = \dd{u} +\end{cases} +\end{equation} + +we can write: + +\begin{equation} +\hat{f}(\lambda) \hat{g}(\lambda) = \int\_{\mathbb{R}} \qty(\int\_{\mathbb{R}} f(u-y) g(y) e^{-i\lambda (u)} \dd{u})\dd{y} +\end{equation} + +Considering they the integrands are isolated and decaying, we can swap them, pulling out also \\(e^{-i\lambda(u)}\\) because it has no \\(y\\) dependence: + +\begin{equation} +\hat{f}(\lambda) \hat{g}(\lambda) = \int\_{\mathbb{R}} \qty(\int\_{\mathbb{R}} f(u-y) g(y) \dd{y})e^{-i\lambda (u)} \dd{u} +\end{equation} + +Notice! The inner part is a function, and the outer part is a Fourier transform! This is similar to a [convolution (probability)]({{< relref "KBhrandom_variables.md#adding-random-variables" >}})! + +Meaning: + +\begin{equation} +\hat{f}(\lambda) \hat{g}(\lambda) = \mathcal{F}(f \* g) = \mathcal{F}(f) \mathcal{F}(g) +\end{equation} + +Operating on the inverse, we can obtain a similar result: + +\begin{equation} +\mathcal{F}^{-1}(\hat{f} \hat{g}) = f \* g +\end{equation} diff --git a/content/posts/KBhos_index.md b/content/posts/KBhos_index.md index a18145c93..60f821e68 100644 --- a/content/posts/KBhos_index.md +++ b/content/posts/KBhos_index.md @@ -128,6 +128,11 @@ how do we [trust]({{< relref "KBhprivacy.md#trust" >}}) software? - [modern OS]({{< relref "KBhmodern_os.md" >}}) + +#### trust and OS {#trust-and-os} + +- [trust]({{< relref "KBhprivacy.md#trust" >}}) + --- An example of a good time: diff --git a/content/posts/KBhprivacy.md b/content/posts/KBhprivacy.md index a1a231393..69bb6750e 100644 --- a/content/posts/KBhprivacy.md +++ b/content/posts/KBhprivacy.md @@ -21,7 +21,58 @@ draft = false - "fiduciary": proxy between you and a company - "should anyone who has access to personal info have a fiduciary responsibility?" ---- + +## key trust questions {#key-trust-questions} + +- who/what do we trust? +- what do we do if trust isn't upheald? +- how to approach building trust + + +## trust {#trust} + +**trust**: to stop questioning the responsibility of something + +- intentions +- dependence +- extensions of agency + +We mostly don't trust software; instead, we trust the people that developed the software. + + +## accountability {#accountability} + +a lot of people who are accountable in this chain: + +- hardware designer (intel) +- OS developer (iOS, ec.) +- app developer +- users + + +## stakeholder {#stakeholder} + +1. **direct stakeholders** (people who are operating, technicians, etc.) +2. **indirect stakeholders**: patients + +purchase = long-term support ---- what do you do to get it fixed/repaired. + + +## time {#time} + +- support duration +- obsolescence (how long is the end of support) + - products/services may not be garanteed forever + - problems with halting use---requires deleting entire pentagram account + + +## meltdown vulnerability {#meltdown-vulnerability} + +**meltdown**: hardware vulnerability that allows an user program to access kernel level pages of system memory. + +**potential ways of fixing a vulnerability/violation of trust**: + + ## loss of privacy {#loss-of-privacy} diff --git a/content/posts/KBhsu_math53_mar112024.md b/content/posts/KBhsu_math53_mar112024.md index ddd1b0cd1..af6fa297e 100644 --- a/content/posts/KBhsu_math53_mar112024.md +++ b/content/posts/KBhsu_math53_mar112024.md @@ -4,56 +4,145 @@ author = ["Houjun Liu"] draft = false +++ -## convolution {#convolution} +## heat equation on the entire line {#heat-equation-on-the-entire-line} -For \\(f,g : \mathbb{R} \to \mathbb{C}\\), we have: +\begin{equation} +\pdv{u}{t} = \frac{1}{2} \pdv[2]{u}{x} +\end{equation} + +We can try to find a: \begin{equation} -(f \* g)(x) = \int\_{\mathbb{R}} f(x-y) g(y) \dd{y} +U(0,x) = f(x) \end{equation} +if we write: + +\begin{equation} +\hat{U}(t,\lambda) = \int e^{-i x \lambda} U(t,x) \dd{x} +\end{equation} -### properties of convolution {#properties-of-convolution} +which means we can write, with initial condtions: -- \\((g \* f) (x) = (f \* g) (x)\\) -- \\(\mathcal{F}(f \* g) = \mathcal{F}(f)\mathcal{F}(g)\\) +\begin{equation} +\hat{U} (t, \lambda) = \hat{f}(\lambda) e^{- t \frac{\lambda^{2}}{2}} +\end{equation} +We want to reach a close form: + +\begin{equation} +U (t, x) = \frac{1}{\sqrt{2\pi} t} \int\_{-\infty}^{\infty} f(y) e^{-\frac{(x-y)^{2}}{2t}} \dd{y} +\end{equation} + +--- + +Steps: recall we ended up at + +\begin{equation} +\hat{U} (t, \lambda) = \hat{f}(\lambda) e^{- t \frac{\lambda^{2}}{2}} +\end{equation} + +Let's call: + +\begin{equation} +\hat{g}(\lambda) = e^{- t \frac{\lambda^{2}}{2}} +\end{equation} + +so we have: + +\begin{equation} +\hat{U} (t, \lambda) = \hat{f}(\lambda) \hat{g}(\lambda) +\end{equation} + +we can use [convolution]({{< relref "KBhconvolution.md#convolution" >}}) to figure \\(U(t,x)\\). + +Recall that the Fourier transform of a Gaussian: + +\begin{equation} +\mathcal{F}\qty(e^{-\frac{ax^{2}}{2}}) = \sqrt{\frac{2\pi}{a}}e^{-\frac{\lambda^{2}}{2a}} +\end{equation} -### motivation {#motivation} +Let's first set: -What if we want the [Fourier Transform]({{< relref "KBhfourier_transform.md" >}}) of \\(\hat{f}(\lambda)\hat{g}(\lambda)\\) in terms of one expression? +\begin{equation} +a = \frac{1}{t} +\end{equation} -Consider: +Which will give us that: \begin{equation} -\hat{f}(\lambda) \hat{g}(\lambda) = \qty(\int\_{\mathbb{R}} f(x) e^{-i\lambda x} \dd{x}) \qty(\int\_{\mathbb{R}} g(y) e^{-i\lambda y} \dd{y}) +g(x) = \frac{1}{\sqrt{2\pi t} } e^{-\frac{x^{2}}{2t}} \end{equation} -Notice that because neither integral have dependence on the other, we can actually: +Meaning, with convolution: \begin{equation} -\hat{f}(\lambda) \hat{g}(\lambda) = \int\_{\mathbb{R}} \int\_{\mathbb{R}} f(x) g(y) e^{-i\lambda (x+y)} \dd{x}\dd{y} +\mathcal{F}^{-1}(\hat{f} \hat{g}) = f \* g \end{equation} -writing this as a change of variable: + +### why does this make sense {#why-does-this-make-sense} + +We are convolving a Gaussian against \\(f(x)\\). Meaning, at very small \\(t\\) , we are taking a very small window of size \\(1\\) against. + + +### Heavyside function {#heavyside-function} \begin{equation} -\begin{cases} -u = x+y \\\\ -\dd{x} = \dd{u} +f(x) = \begin{cases} +1, x\geq 0 \\\\ +0, x<0 \end{cases} \end{equation} -we can write: +This gives: if we split the room by \\(x\\). Recall: \begin{equation} -\hat{f}(\lambda) \hat{g}(\lambda) = \int\_{\mathbb{R}} \qty(\int\_{\mathbb{R}} f(u-y) g(y) e^{-i\lambda (u)} \dd{u})\dd{y} +U (t, x) = \frac{1}{\sqrt{2\pi} t} \int\_{-\infty}^{\infty} f(y) e^{-\frac{(x-y)^{2}}{2t}} \dd{y} \end{equation} -Considering they the integrands are isolated and decaying, we can swap them, pulling out also \\(e^{-i\lambda(u)}\\) because it has no \\(y\\) dependence: +Given our \\(f\\), this becomes: + +\begin{equation} +U (t, x) = \frac{1}{\sqrt{2\pi} t} \int\_{0}^{\infty} e^{-\frac{(x-y)^{2}}{2t}} \dd{y} +\end{equation} + +If we change variables: + +\begin{align} +\frac{(x-y)^{2}}{2t} - \qty( \frac{x}{\sqrt{2t}} - \frac{y}{\sqrt{2t}})^{2} +\end{align} + +which means: + +\begin{equation} +z = \frac{y}{2\sqrt{t}} +\end{equation} \begin{equation} -\hat{f}(\lambda) \hat{g}(\lambda) = \int\_{\mathbb{R}} \qty(\int\_{\mathbb{R}} f(u-y) g(y) \dd{y})e^{-i\lambda (u)} \dd{u} +\frac{1}{\sqrt{\pi}} \int\_{0}^{\infty} e^{^{-\qty(\frac{x}{\sqrt{2t}} - z)^{2}}} \dd{z} \end{equation} -Notice! The inner part is a function, and the outer part is a Fourier transform! This is similar to a [convolution (probability)]({{< relref "KBhrandom_variables.md#adding-random-variables" >}})! +and we will also apply: + +\begin{equation} +w = z - \frac{x}{\sqrt{2t}} +\end{equation} + +which will give: + +\begin{equation} +\frac{1}{\sqrt{\pi}} \int\_{-\frac{x}{\sqrt{2t}}}^{\infty} e^{-w^{2}} \dd{w} +\end{equation} + +notice, as \\(x\\) increases, we are integrating more of a Gaussian, which will be exceedingly close to \\(1\\); as \\(x\\) decreases, we'll get closer to \\(0\\). And also, \\(t\\) smoothed \\(x\\) out, which means as \\(t\\) increases the interface between \\(0\\) and \\(1\\) becomes smoother. + + +## erf {#erf} + +[erf](#erf) + + +## [convolution]({{< relref "KBhconvolution.md#convolution" >}}) {#convolution--kbhconvolution-dot-md} + +see [convolution]({{< relref "KBhconvolution.md#convolution" >}}) diff --git a/content/posts/KBhsu_math53_problem_session.md b/content/posts/KBhsu_math53_problem_session.md new file mode 100644 index 000000000..8d06df3b7 --- /dev/null +++ b/content/posts/KBhsu_math53_problem_session.md @@ -0,0 +1,45 @@ ++++ +title = "SU-MATH53 Problem Session" +author = ["Houjun Liu"] +draft = false ++++ + +## L-Periodic Functions {#l-periodic-functions} + +So, we have: + +\begin{equation} +f(x+L) = f(x) +\end{equation} + +The integral is equivalent for any: + +\begin{equation} +\int\_{a}^{a+L} f(x) +\end{equation} + +for any \\(a\\). + + +## Heat Equation Recipe {#heat-equation-recipe} + +1. are we on a finite interval? then, decompose into product-type solution \\(A(t)B(x)\\) and solve. +2. are we not? Fourier transform on the space variable and solve. + + +### What if \\(\lambda \in \mathbb{C} \backslash \mathbb{R}\\) {#what-if-lambda-in-mathbb-c-backslash-mathbb-r} + +Shush. + + +### Why can we guess \\(A(t)B(x)\\) {#why-can-we-guess-a--t--b--x} + +Because we were able to find solutions. Believe that the solution set spans. + + +## Fourier Transform on Three-Variable Expressions {#fourier-transform-on-three-variable-expressions} + +We have better Fourier transforms on n-space rather than on a line. Use those. + + +## Existence and Uniqueness + Superposition {#existence-and-uniqueness-plus-superposition}