Skip to content

Commit

Permalink
Today's lectures
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Jan 26, 2024
1 parent 683f0b7 commit fdc382e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CodingAndCryptography/01_noiseless_coding.tex
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,14 @@ \subsection{Huffman coding}
which yields a prefix-free code with strictly smaller expected word length.
\end{proof}

\begin{theorem}
\begin{theorem}[Huffman 1952]
Huffman codes are optimal.
\end{theorem}

\begin{proof}
The proof is by induction on $m$.
If $m = 2$, then the codewords are 0 and 1, which is clearly optimal.

Assume $m > 2$, and let $c_m$ be the Huffman code for $X_m$ which takes values $\mu_1, \dots, \mu_m$ with probabilities $p_1 \geq \dots \geq p_m$.
$c_m$ is constructed from a Huffman code $c_{m-1}$ with random variable $X_{m-1}$ taking values $\mu_1, \dots, \mu_{n-2}, \nu$ with probabilities $p_1, \dots, p_{m-2}, p_{m-1} + p_m$.
The code $c_{m-1}$ is optimal by the inductive hypothesis.
Expand Down
6 changes: 5 additions & 1 deletion CodingAndCryptography/02_noisy_channels.tex
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
\section{Noisy channels}

\subsection{Decoding rules}
\begin{definition}
\begin{definition}[Binary {$[n,m]$}-code]
A \vocab{binary $[n,m]$-code} is a subset $C$ of $\qty{0,1}^n$ of size $m = \abs{C}$.
We say $n$ is the \vocab{length} of the code, and elements of $C$ are called \vocab{codewords}.
\end{definition}

We use an $[n,m]$-code to send one of $m$ messages through a channel using $n$ bits.
For instance, if the channel is a binary symmetric channel, we use the channel $n$ times.
Note that $1 \leq m \leq 2^n$, so the information rate $\rho(C) = \frac{1}{n} \log m$ satisfies $0 \leq \rho(C) \leq 1$.
If $m = 1$, $\rho(C) = 0$, and if $C = \qty{0,1}^n$, $\rho(C) = 1$.

\begin{definition}
Let $x, y \in \qty{0,1}^n$.
The \vocab{Hamming distance} between $x$ and $y$ is
\begin{align*}
d(x,y) = \abs{\qty{i \mid x_i \neq y_i}}
\end{align*}
\end{definition}

In this section, we consider only the binary symmetric channel with probability $p$.

\begin{definition}
Let $C$ be a binary $[n,m]$-code.
\begin{itemize}
Expand Down
Binary file modified CodingAndCryptography/cc.pdf
Binary file not shown.
12 changes: 6 additions & 6 deletions CodingAndCryptography/cc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
\maketitle
\tableofcontents

\input{00_modelling_communication.tex}
\input{01_noiseless_coding.tex}
\input{02_noisy_channels.tex}
\input{03_information_theory.tex}
\input{04_algebraic_coding_theory.tex}
\input{05_cryptography.tex}
\include{00_modelling_communication.tex}
\include{01_noiseless_coding.tex}
\include{02_noisy_channels.tex}
\include{03_information_theory.tex}
\include{04_algebraic_coding_theory.tex}
\include{05_cryptography.tex}
\end{document}
Binary file modified LogicAndSetTheory/logicandsettheory.pdf
Binary file not shown.
Empty file.
Binary file added at.pdf
Binary file not shown.

0 comments on commit fdc382e

Please sign in to comment.