Polish
This commit is contained in:
@ -9,7 +9,7 @@ A \textit{string} is a sequence of symbols from an alphabet. \par
|
||||
For example, \texttt{CBCAADDD} is a string over the alphabet $\{\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}\}$.
|
||||
|
||||
\problem{}
|
||||
Say we want to store a length-$n$ string over the alphabet $\{\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}\}$ as a binary blob. \par
|
||||
Say we want to store a length-$n$ string over the alphabet $\{\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}\}$ as a binary sequence. \par
|
||||
How many bits will we need? \par
|
||||
\hint{
|
||||
Our alphabet has four symbols, so we can encode each symbol using two bits, \par
|
||||
@ -32,6 +32,6 @@ using $n \times \lceil \log_2k \rceil$ bits. Convince yourself that this is true
|
||||
|
||||
|
||||
\vfill
|
||||
Of course, this isn't ideal---we can do much better than $n \times \lceil \log_2k \rceil$.
|
||||
As you might expect, this isn't ideal: we can do much better than $n \times \lceil \log_2k \rceil$.
|
||||
We will spend the rest of this handout exploring more efficient ways of encoding such sequences of symbols.
|
||||
\pagebreak
|
||||
|
Reference in New Issue
Block a user