Finished compression handout
This commit is contained in:
parent
0bfe54d69b
commit
237497c0c3
@ -8,12 +8,15 @@
|
||||
|
||||
\input{tikzset.tex}
|
||||
\usepackage{units}
|
||||
\usepackage{pdfpages}
|
||||
|
||||
\uptitlel{Advanced 2}
|
||||
\uptitler{\smallurl{}}
|
||||
\title{Compression}
|
||||
\subtitle{Prepared by Mark on \today{}}
|
||||
|
||||
% TODO: add a section on info theory,
|
||||
% shannon entropy. etc.
|
||||
|
||||
\begin{document}
|
||||
|
||||
@ -23,5 +26,6 @@
|
||||
\input{parts/1 runlength.tex}
|
||||
\input{parts/2 lzss.tex}
|
||||
\input{parts/3 huffman.tex}
|
||||
\input{parts/4 bonus.tex}
|
||||
|
||||
\end{document}
|
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB |
@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
\problem{}<runlenone>
|
||||
Using a na\"ive coding scheme, encode \texttt{AAAA$\cdot$AAAA$\cdot$BCD$\cdot$AAAA$\cdot$AAAA} in binary. \par
|
||||
Using the na\"ive coding scheme, encode \texttt{AAAA$\cdot$AAAA$\cdot$BCD$\cdot$AAAA$\cdot$AAAA} in binary. \par
|
||||
\note[Note]{
|
||||
We're still using the four-symbol alphabet $\{\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}\}$. \par
|
||||
Dots ($\cdot$) in the string are drawn for readability. Ignore them.
|
||||
@ -44,6 +44,11 @@ Using a na\"ive coding scheme, encode \texttt{AAAA$\cdot$AAAA$\cdot$BCD$\cdot$AA
|
||||
\begin{solution}
|
||||
There are eight \texttt{A}s on each end of that string. Mapping symbols as before, \par
|
||||
we get \texttt{[00 00 00 00 00 00 00 00 01 10 11 00 00 00 00 00 00 00 00]}
|
||||
|
||||
\begin{instructornote}
|
||||
In this handout, all encoded binary is written in square brackets. \par
|
||||
Spaces, dashes, dots, and etc are added for readability, and should be ignored.
|
||||
\end{instructornote}
|
||||
\end{solution}
|
||||
|
||||
|
||||
|
@ -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}
|
||||
|
||||
|
40
Advanced/Compression/parts/4 bonus.tex
Normal file
40
Advanced/Compression/parts/4 bonus.tex
Normal file
@ -0,0 +1,40 @@
|
||||
\section{Bonus problems}
|
||||
|
||||
|
||||
\problem{}
|
||||
Make sense of the document on the next page. \par
|
||||
What does it describe, and how does it work?
|
||||
|
||||
|
||||
\problem{}
|
||||
Given a table with a marked point, $O$, and with $2013$ properly working watches put down on the table, prove that there exists a moment in time when the sum of the distances from $O$ to the watches' centers is less than the sum of the distances from $O$ to the tips of the watches' minute hands.
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\problem{A Minor Inconvenience}
|
||||
A group of eight friends goes out to dinner. Each drives his own car, checking it in with valet upon arrival.
|
||||
Unfortunately, the valet attendant forgot to tag the friends' keys. Thus, when the group leaves the restaurant,
|
||||
each friend is handed a random key.
|
||||
\begin{itemize}
|
||||
\item What is the probability that everyone gets the correct set of keys?
|
||||
\item What is the probability that each friend gets the wrong set?
|
||||
\end{itemize}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\problem{Bimmer Parking}
|
||||
A parking lot has a row of 16 spaces, of which a random 12 are taken. \par
|
||||
Ivan drives a BMW, and thus needs two adjacent spaces to park. \par
|
||||
What is the probability he'll find a spot?
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\includepdf[
|
||||
pages=1,
|
||||
fitpaper=true
|
||||
]{parts/qoi-specification.pdf}
|
||||
|
||||
\pagebreak
|
Loading…
x
Reference in New Issue
Block a user