Finished compression handout

This commit is contained in:
2024-04-25 14:59:29 -07:00
parent 0bfe54d69b
commit 237497c0c3
6 changed files with 52 additions and 4 deletions

View File

@ -3,7 +3,7 @@
\example{}
Now consider the alphabet $\{\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}, \texttt{E}\}$. \par
With a na\"ive coding scheme, we can encode a length $n$ string with $3n$ bits, by mapping...
With the na\"ive coding scheme, we can encode a length $n$ string with $3n$ bits, by mapping...
\begin{itemize}
\item $\texttt{A}$ to $\texttt{000}$
\item $\texttt{B}$ to $\texttt{001}$
@ -12,8 +12,7 @@ With a na\"ive coding scheme, we can encode a length $n$ string with $3n$ bits,
\item $\texttt{E}$ to $\texttt{100}$
\end{itemize}
For example, this encodes \texttt{ADEBCE} as \texttt{[000 011 100 001 010 100]}. \par
To encode strings over $\{\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}, \texttt{E}\}$ with this scheme, we
need an average of three bits per symbol.
It is easy to see that this scheme uses an average of three bits per symbol.
\vspace{2mm}