\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}

\usepackage{amssymb}
\begin{document}

%%%%%%%%%%% QUESTION 0 %%%%%%%%%%%%%
\section*{Q0 $x(t)=cos(2\pi2t), f_s=8Hz, f_c = 2Hz$}

\begin{description}
\item[(a)] $f_c < \frac{1}{2}f_s$ Therefore the sampling is \emph{above} the Nyquist rate 
\item[(b)] $X[n]=x(\frac{n}{8}) \cos(\frac{\pi n}{2}) \Rightarrow $ periodic with $N_0 =4$
\item[(c)] Assume the signal is:
   \begin{enumerate}
    \item periodic
    \item period 4
    \item bandlimited (and sampled higher than the Nyquist rate)
   \end{enumerate}
\item[(d)] $x[n]=\{1,0,-1,0,1,0,-1,0\}$
\item[(e)] $X[k]=\{0,0,4,0,0,0,4,0\}$
\end{description}
\begin{figure}[!h]
\begin{center}
\includegraphics[width=4in]{ece431quest1.eps}
\end{center}
\end{figure}



%%%%%%%%%% QUESTION 1 %%%%%%%%%%%%%%
\section*{Q1 $g(t)=cos(2\pi f_c t)$}

\begin{description}
\item[(a)] 
   \begin{itemize}
   \item $|f_c|<4$ above Nyquist rate
   \item $|f_c|=4$ at Nyquist rate
   \item $|f_c|>4$ below Nyquist rate
   \end{itemize}

\item[(b)]
   For any rational $f_c$

\item[(c)]
   $|f_c|<4,f_c$ \emph{integer} (Use similar assumptions as in Q0 (i.e. 
       periodicity, bandlimited, etc.))

\item[(d)]
   any \emph{integer} $f_c$ (will sample at all zero crossings and the two peaks)
\end{description}

%%%%%%%%% QUESTION 2 %%%%%%%%%%%%%%%
\section*{Q2}

\begin{description}
\item[(a)] $X[0]=x[0]$ just pass the signal
\item[(b) and (c)] $X[k] = \sum^1_0 x[n]e^{-j \frac{2\pi kn}{2}}= x[0]+x[1]e^{-j\pi k}$\\
                    $\therefore X[0]=x[0]+x[1]$ (adder)\\
                    $\therefore X[1]=x[0]-x[1]$ (subtractor)
\item[(d)] Use twosies to create a 4-DFT, then build 8-DFT using 2 4-DFT,
           then 16 using two 8-DFT, and finally 32-DFT using 2 16-DFT.
\begin{figure}[!h]
\begin{center}
\includegraphics[width=6in]{quest2dft.eps}
\end{center}
\end{figure}

\begin{align*}
  X_{32}  =& X_{16_1}[k]+e^{-j\frac{2\pi k}{32}}X_{16_2}[k]\quad k=0,1,\ldots,15 \\
          =& X_{16_1}[16-k]+e^{-j\frac{2\pi k}{32}}X_{16_2}[16-k]\quad k=16,17,\ldots,31 \\
\end{align*}

\item[(e)] $X_{480}[k]=X_1[k]+X_2[k]e^{-j\frac{2\pi k}{480}}+\ldots+X_{15}[k]e^{-j\frac{2\pi k(l-1)}{480}}$\\
$X_l[k]:$32-DFT\\
$X_{480}[k]=\sum_{l=1}^{15} X_l[k]e^{-j\frac{2\pi k(l-1)}{480}}$\\
where $e^{-j\frac{2\pi k(l-1)}{480}}$ is periodic with different $N_0$ depending on $(l-1)$.

\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|}
\hline
l-1&1&2&3&4&5&6&7&8&9&10&11&12&13&14\\
\hline
$N_0$&480&240&160&120&96&80&480&60&160&48&480&40&480&240\\
\# of amps&240&120&80&60&48&40&240&30&80&24&240&20&240&120\\
\hline
\end{tabular}
Total number of amps: $1582+49\times15=2317$\\
$\therefore$ cost of 480-DFT: $\$4634$

\item[(f)]
$X_{640}[k]=\sum^{20}_{l=1}X_l[k]e^{-j\frac{2\pi k(l-1)}{640}}$\\
note that $X_l[k]$ is the 32-DFT and $\frac{2\pi k(l-1)}{640}$ is periodic with maximum period 640\\
using a similar procedure as in (e) we have: total number of amps: 3580+49*20=4560\\
$\therefore$ cost of 640-DFT is $9120$
\end{description}


%%%%%%%%% QUESTION 3 %%%%%%%%%%%%%%%%
\section*{Q3 prove that the Fourier operator is unitary}
\begin{proof}

\begin{align*}
G_n =& F^*F\\
G_{lm} =& \sum^N_{j=1} \frac{1}{\sqrt{N}} e^{\frac{2\pi i(l-1)(j-1)}{N}} \frac{1}{\sqrt{N}}e^{\frac{-2\pi i(m-1)(j-1)}{N}}\\
    =&\frac{1}{N} \sum^N_{j=1} e^{\frac{2\pi i (j-1)(l-m)}{N}}\\
    =&\frac{1}{N} \frac{\left(1-e^{2\pi i (l-m)}\right)}{\left(1-e^{\frac{2\pi i(l-m)}{N}}\right)}\\
    =&1 \text{  if $l=m$}\\
    =&0 \text{  if $l \ne m$}\\
\end{align*}
\end{proof}

\end{document}
