\documentclass[12pt]{article}
\oddsidemargin  -0.25in
\evensidemargin -0.25in
\marginparwidth 40pt
\marginparsep 10pt
\topmargin -0.5in
\headsep 0pt
\textheight 9.5in
\textwidth 7.0in

\begin{document}

\title{CSc 461/561: Multimedia Systems (Spring 2006)}

\author{Assignment 2}

\date{To be handed in at the lecture on February 8, 2006}

\maketitle

\begin{enumerate}
  
\item An information source has 5 symbols with the following
  probability of appearance

  \begin{center}
    \begin{tabular}{c||c|c|c|c|c}
      \hline
      Symbol & A & B & C & D & E \\
      \hline\hline
      Probability to appear in input & 0.35 & 0.17 & 0.17 & 0.16 & 0.15 \\
      \hline
    \end{tabular}
  \end{center}
  
  \begin{enumerate}
  \item What is the entropy of this information source?
  \item If Shannon-Fano entropy encoding is applied, please write down
    the process of building the coding tree and assigning the code
    word.  Please also write down the average code word length per
    symbol of this information source with Shannon-Fano encoding.
  \item If Huffman entropy coding is applied, please write down the
    process of building the coding tree and assigning the code word.
    Please also write down the average code word length per symbol of
    this information source with Huffman encoding.
  \end{enumerate}
  
\item Given an initial dictionary

  \begin{center}
    \begin{tabular}{c||c|c|c|c|c}
      \hline
      Symbol & A & B & C & D & E \\
      \hline\hline
      Code in the dictionary & 1 & 2 & 3 & 4 & 5 \\
      \hline
    \end{tabular}
  \end{center}
  
  Please write down the output process of the input ABCDEABCDE with
  LZW compression.  Please also write down the expanded dictionary
  after parsing the input.
  
\item Assume we have a quantizer with 2-bit output precision, i.e.,
  corresponding to 4 quantization steps, which can be either uniform
  or nonuniform.

  \begin{enumerate}
  \item If the signal $x$ appears in the range of [-1,1] with uniform
    probability $p(x)=0.5$, please write down the range of each
    uniform quantization step.  Please also write down the mean square
    error due to this uniform quantization.
  \item If the signal $x$ appears in the range of [-1,1] with
    probability $p(x)=(x+1)/2$, please write down the range of each
    nonuniform quantization step to minimize the quantization error.
    Please also write down the best value to represent each
    quantization step.
  \end{enumerate}
  
\item Please explain the purpose of having chroma subsampling and
  discrete cosine transform, and how they are used in JPEG lossy image
  compression.
  
\item Please explain the effect of temporal masking and frequency
  masking, and how they are used in MP3 lossy audio compression.
  
\item For a group of pictures:
  I$_1$B$_1$B$_2$P$_1$B$_3$B$_4$P$_2$B$_5$B$_6$I$_2$, please write
  down the order in which these pictures arrive at the decoder.
  Please also explain the reason of such arrangement.

\end{enumerate}

\end{document}
