From 47a27d198778fb541e2996dff6c807614064be9e Mon Sep 17 00:00:00 2001
From: Zheyuan Wu <60459821+Trance-0@users.noreply.github.com>
Date: Tue, 28 Oct 2025 11:55:11 -0500
Subject: [PATCH] restore search functionality
---
app/layout.tsx | 2 +-
content/CSE5313/CSE5313_L17.md | 84 ++++++++++++++++++++++++++++++++++
content/CSE5313/_meta.js | 1 +
3 files changed, 86 insertions(+), 1 deletion(-)
create mode 100644 content/CSE5313/CSE5313_L17.md
diff --git a/app/layout.tsx b/app/layout.tsx
index 28041a8..867e026 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -84,7 +84,7 @@ export default async function RootLayout({ children }) {
sidebar={{ defaultMenuCollapseLevel: 1 }}
pageMap={pageMap}
// TODO: fix algolia search
- search={}
+ // search={}
>
{children}
{/* SpeedInsights in vercel */}
diff --git a/content/CSE5313/CSE5313_L17.md b/content/CSE5313/CSE5313_L17.md
new file mode 100644
index 0000000..e98aeed
--- /dev/null
+++ b/content/CSE5313/CSE5313_L17.md
@@ -0,0 +1,84 @@
+# CSE5313 Coding and information theory for data science (Lecture 17)
+
+## Shannon's coding Theorem
+
+**Shannon’s coding theorem**: For a discrete memoryless channel with capacity $C$,
+every rate $R < C = \max_{x\in \mathcal{X}} I(X; Y)$ is achievable.
+
+### Computing Channel Capacity
+
+$X$: channel input (per 1 channel use), $Y$: channel output (per 1 channel use).
+
+Let the rate of the code be $\frac{\log_F |C|}{n}$ (or $\frac{k}{n}$ if it is linear).
+
+The Binary Erasure Channel (BEC): analog of BSC, but the bits are lost (not corrupted).
+
+Let $\alpha$ be the fraction of erased bits.
+
+### Corollary: The capacity of the BEC is $C = 1 - \alpha$.
+
+
+
+Proof
+
+$$
+\begin{aligned}
+C&=\max_{x\in \mathcal{X}} I(X;Y)\\
+&=\max_{x\in \mathcal{X}} (H(Y)-H(Y|X))\\
+&=H(Y)-H(\alpha)
+\end{aligned}
+$$
+
+Suppose we denote $Pr(X=1)\coloneqq p$.
+
+$Pr(Y=0)=Pr(X=0)Pr(no erasure)=(1-p)(1-\alpha)$
+
+$Pr(Y=1)=Pr(X=1)Pr(no erasure)=p(1-\alpha)$
+
+$Pr(Y=*)=\alpha$
+
+So,
+
+$$
+\begin{aligned}
+H(Y)&=H((1-p)(1-\alpha),p(1-\alpha),\alpha)\\
+&=(1-p)(1-\alpha)\log_2 ((1-p)(1-\alpha))+p(1-\alpha)\log_2 (p(1-\alpha))+\alpha\log_2 (\alpha)\\
+&=H(\alpha)+(1-\alpha)H(p)
+\end{aligned}
+$$
+
+So $I(X;Y)=H(Y)-H(Y|X)=H(\alpha)+(1-\alpha)H(p)-H(\alpha)=(1-\alpha)H(p)$
+
+So $C=\max_{x\in \mathcal{X}} I(X;Y)=\max_{p\in [0,1]} (1-\alpha)H(p)=(1-\alpha)$
+
+So the capacity of the BEC is $C = 1 - \alpha$.
+
+
+
+### General interpretation of capacity
+
+Recall $I(X;Y)=H(Y)-H(Y|X)$.
+
+Edge case:
+
+- If $H(X|Y)=0$, then output $Y$ reveals all information about input $X$.
+ - rate of $R=I(X;Y)=H(Y)$ is possible. (same as information compression)
+- If $H(Y|X)=H(X)$, then $Y$ reveals no information about $X$.
+ - rate of $R=I(X;Y)=0$ no information is transferred.
+
+> [!NOTE]
+>
+> Compression is transmission without noise.
+
+## Side notes for Cryptography
+
+Goal: Quantify the amount of information that is leaked to the eavesdropper.
+
+- Let:
+ - $M$ be the message distribution.
+ - Let $Z$ be the cyphertext distribution.
+- How much information is leaked about $m$ to the eavesdropper (who sees $operatorname{Enc}(m)$)?
+- Idea: One-time pad.
+
+### One-time pad
+
diff --git a/content/CSE5313/_meta.js b/content/CSE5313/_meta.js
index 4d7622b..e04cfa5 100644
--- a/content/CSE5313/_meta.js
+++ b/content/CSE5313/_meta.js
@@ -20,4 +20,5 @@ export default {
CSE5313_L14: "CSE5313 Coding and information theory for data science (Lecture 14)",
CSE5313_L15: "CSE5313 Coding and information theory for data science (Lecture 15)",
CSE5313_L16: "CSE5313 Coding and information theory for data science (Exam Review)",
+ CSE5313_L17: "CSE5313 Coding and information theory for data science (Lecture 17)",
}
\ No newline at end of file