\documentclass[11pt]{article}
\input{headers3}

\usepackage{fancyhdr}   
\pagestyle{fancy}      
\lhead{}               
\rhead{Name: Hemanta K. Maji} %%% <-- YOUR NAME HERE

\usepackage[strict]{changepage}  
\newcommand{\nextoddpage}{\checkoddpage\ifoddpage{\ \newpage\ \newpage}\else{\ \newpage}\fi}  


\begin{document}

\title{Homework 3\\(150 points)}

\date{}

\maketitle 

\thispagestyle{fancy}  
\pagestyle{fancy}  

    




\begin{enumerate}

%%% Problem 1 
\item {\bfseries (15 + 15 + 15 + 15 points) Fourier Analysis on Larger Domains.}
  Recall that we apply discrete Fourier Analysis on the Boolean Hypercube to analyze functions with domain $\zo^n$. 
  We will generalize this construction to arbitrary domains. 
  \begin{enumerate}
  \item Consider the space of all function $\bbZ_p\to\bbC$, where $p$ is a prime number. 
    Here $\bbZ_p$ is the set $\{0,1,\dotsc,p-1\}$. 
    And addition and multiplication of two elements from this set is defined using integer addition and multiplication, respectively, $\mod p$. 
    The set of complex numbers is represented by \bbC. 
    
    Suppose $f,g\colon\bbZ_p\to\bbC$ be two functions. 
    Recall that the {\em complex conjugate} of a complex number $z=a + \imath b$, represented by $\overline z$, is defined to be $a -\imath b$. 
    The inner-product of these two functions is defined by 
    $$\tuple{f,g} \defeq \frac1p \sum_{x\in\bbZ_p}f(x)\overline{g(x)}$$ 
    Let $\omega_p \defeq \exp\left(2\pi\imath/p\right)$ and define $\chi_a(x) \defeq \omega_p^{ax}$, for $a\in\bbZ_p$. 
    Prove that $\{\chi_a \colon a\in\bbZ_p$ is an orthonormal basis for the space of all function $\bbZ_p\to\bbC$. 
  \item Consider the space of all functions $\bbZ_p^n \to \bbC$. 
    Define the inner-product of functions, write the Fourier basis functions, and show their orthonormality. 
  \item Consider the space of all functions $\bbZ_p\times\bbZ_q\to\bbC$, for primes $p$ and $q$. 
    The primes $p$ and $q$ need not necessarily be distinct. 
    Define the inner-product of functions, write the Fourier basis functions, and show their orthonormality. 
  \item Consider the space of all functions $\bbZ_{p_1}\times \bbZ_{p_2} \times\dotsi\times\bbZ_{p_n} \to \bbC$. 
    Note that the primes $p_1,\dotsc,p_n$ need not be distinct. 
    Define the inner-product of functions, write the Fourier basis functions, and show their orthonormality. 
  \end{enumerate}  
 
\nextoddpage
%%% Problem 2
\item {\bfseries (10 + 10 points) Majority Functions.} 
  Let $n$ be odd and $f(x)\colon\zo^n\to\{+1,-1\}$ be the majority function. 
  That is, if the majority of the bits in $x$ is $0$, then $f(x)=+1$; otherwise $f(x)=-1$. 
  \begin{enumerate}
  \item Compute the Fourier coefficients of $f$ when $n=3$. 
  \item Let us define odd and even functions. 
    For $x\in\zo^n$, define $\pred{flip}(x)$ to be the string where we flip every bit of $x$. 
    For example $\pred{flip}(0010)=1101$. 
    
    A function is {\em odd} if $f(\pred{flip}(x)) = -f(x)$, for all $x\in\zo^n$. 
    Note that the majority function defined above is an odd function. 
    
    A set $S\in\zo^n$ is {\em even} if the number of 1s in $S$ is even. For example, when $n=3$, the sets $S=000, 011, 101, 110$ are even sets. 
    
    Prove that if $f$ is an odd function then $\hf(S)=0$ for all even $S\in\zo^n$. 
  \end{enumerate}  
    
  
  
\nextoddpage
%%% Problem 3
\item {\bfseries (20 points) Generalized BLR.}
  Recall that a function $f\colon\zo^n\to\{+1,-1\}$ is linear if $f(0^n) = +1$ and $f(x+y)=f(x)\cdot f(y)$, for all $x,y\in\zo^n$. 
  Consider the following generalization of the BLR algorithm to test whether a function $f$ is close to linear of the function $-f$ is close to linear. 
  \begin{boxedalgo}
  $\pred{BLR-Gen}^f$:
  \begin{enumerate}
  \item Let $a,b,c \getsr\zo^n$ 
  \item Let $w=f(a)$, $x=f(b)$, $y=f(c)$, and $z=f(a+b+c)$ 
  \item Return $(q\cdot x\cdot y == z)$
  \end{enumerate} 
  \end{boxedalgo} 
  State and prove a theorem that intuitively proves that ``the algorithm return trues with high probability'' if and only if ``the function $f$ or $-f$ is close to a linear function.''  
  
\nextoddpage
%%% Problem 4
\item {\bfseries (20 points) An Alternate Proof.} 
  Recall that the convolution of two function $f,g\colon\zo^n\to\bbR$ is defined as follows 
  $$(f*g)(x) \defeq\frac1N \sum_{y\in\zo^n} f(y)g(x-y)$$
  In this problem we shall develop a new technique to prove that $\widehat{(f*g)} = \hf \hg$.  
  
  \begin{enumerate}
  \item Compute the function $(\chi_S * \chi_T)$
  \item Note that the convolution operator is a bilinear operator. 
    That is, we have $\left((f_1+f_2)*g\right) = (f_1*g) + (f_2*g)$ and $(cf)*g = c(f*g)$ from the definition of convolution. 
    Similarly, we have $\left(f*(g_1+g_2)\right) = (f*g_1) + (f*g_2)$ and $f*(cg) = c(f*g)$. 
    
    Recall that we have $f = \sum_{S\in\zo^n} \hf(S) \chi_S$ and $g=\sum_{S\in\zo^n} \hg(S)\chi_S$. 
    Prove that $$(f*g) = \sum_{S\in\zo^n} \hf(S)\hg(S) \chi_S$$
  \end{enumerate} 
  
  
  
\nextoddpage
%%% Problem 5
\item {\bfseries (5 + 15 + 5 + 5 points) A Few Properties of Fourier Transformation.} 
  Let $f,g\colon\zo^n\to\bbR$ be two functions. 
  \begin{enumerate}
  \item Express $\widehat{(fg)}$ using the functions \hf and \hg. 
    Here the function $(fg)$ defined as $(fg)(x) = f(x)\cdot g(x)$, for all $x\in\zo^n$. 
  \item Let $\max\{f,g\}$ is the function that satisfies $\max\{f,g\}(x) = \max\{f(x),g(x)\}$, for all $x\in\zo^n$. 
    Suppose the range of $f$ and $g$ is $\{+1,-1\}$. 
    Express $\widehat{\max\{f,g\}}$ is terms of \hf and \hg. 
  \item Recall that if $f(x) = g(x-c)$ for some $c\in\zo^n$ then we have $\hf = \chi_c\hg$. 
    Find a function $h\colon\zo^n\to\bbR$ such that $f = (h* g)$. 
  \item For $1\leq i<j\leq n$, define 
    $$\pred{swap}_{i,j}(x_1,\dotsc,x_n) = (x_1,\dotsc,x_{i-1},x_j,x_{i+1},\dotsc,x_{j-1},x_i,x_{j+1},\dotsc,x_n)$$. 
    Suppose $f(x) = g(\pred{swap}_{i,j}(x))$, for all $x\in\zo^n$. 
    Express $\hf$ as a function of \hg. 
  \end{enumerate} 
  


\end{enumerate}









\end{document}
