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

\usepackage{fancyhdr}   
\pagestyle{fancy}      
\lhead{CS 355, FALL 2024}               
\rhead{Name: Hemanta K. Maji} %%% <-- REPLACE Hemanta K. Maji WITH YOUR NAME HERE

\begin{document}

\title{Homework 1}

\date{}

\maketitle 

\thispagestyle{fancy}  
\pagestyle{fancy}      

\begin{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Estimating $(1-x)$ using $\exp(\cdot)$ function.} 
For $x\in[0,1),$ we know that 
    $$\ln(1-x) = -x - \frac{x^2}2 - \frac{x^3}3 - \dotsi.$$
        
    \begin{enumerate} 
    \item {\bfseries (5 points)} 
    Prove that $1-x \leq \exp\left( - x - \frac{x^2}2 \right) .$
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    \newpage
    
    \item {\bfseries (5 points)} 
    For $x\in[0,1/2]$, prove that 
        $$1- x \geq \exp\left(-x-x^2\right) .$$
        
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    \end{enumerate}
\newpage 




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Tight Estimations}
Provide meaningful upper and lower bounds for the following expressions.

    \begin{enumerate}
    \item {\bfseries (5 points)}
    $\sum_{i = 1}^{\infty}(2i-1)^{-\frac{19}{17}}$

    Note: Please evaluate/simplify the expression/bound as much as possible.
    
    Hint: Your upper and lower bounds should be constants.
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
    \newpage
    
    \item {\bfseries (10 points)} 
    $A_n = {}_{2n}P_n$
    Hint: Note that ${}_{2n}P_n = \frac{(2n)!}{(2n-n)!}.$

    Note: Please evaluate/simplify the expression/bound as much as possible.
    
    Hint: You may want to start by upper and lower bounding $S_n = \sum_{i=1}^n \ln i.$
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
    \newpage
    \end{enumerate} 
\newpage





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Understanding Joint Distribution.}
Twelve balls are to be tossed into six bins numbered $\{1, 2, 3, 4, 5,6\}$. 
Each ball is thrown into a bin uniformly and independently into the bins. 
For $i\in\{1,2,3,4,5,6\}$, let $X_i$ represent the number of balls that fall into bin $i$.

\begin{enumerate}
    \item {\bfseries (5 points)} 
    Find the (marginal) distribution of $X_5$ and compute its expected value. 

    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  

    \vspace{0.3\textheight} %%% <-- ERASE THIS LINE

    \item {\bfseries (3 points)}
    Find the expected value of $X_1+X_3+X_5$. 

    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE

    \vspace{0.3\textheight} %%% <-- ERASE THIS LINE

    \newpage
    
    \item {\bfseries (7 points)}
    Find $\prob{[X_2 = 2 \vert X_1 + X_3 + X_5  = 5]}.$

    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
\end{enumerate}
\newpage
    
    
    
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Sending one bit.}

Alice intends to send a bit $b\in\{0,1\}$ to Bob. 
When Alice sends the bit, it goes through a series of $n$ relays before reaching Bob.
Each relay flips the received bit independently with probability $p$ before forwarding that bit to the next relay.

    \begin{enumerate}
    \item {\bfseries (5 points)} 
    Show that Bob will receive the correct bit with probability 
        $$\sum_{k = 0}^{\lfloor n/2 \rfloor} {\binom{n}{2k}} p^{2k} \cdot (1 - p)^{n - 2k}.$$
    Hint: Be careful that Alice could be sending either $0$ or $1$.
 
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE

    
    \newpage
      
    \item {\bfseries (5 points)} 
    Let us consider an alternative way to calculate this probability.
    We say that the relay has {\em{bias}} $q$ if the probability it flips the bit is $(1-q)/2$.
    The bias $q$ is a real number between $-1$ and $+1$.
    Show that sending a bit through two relays with bias $q_1$ and $q_2$ is equivalent to sending a bit through a single relay with bias $q_1 \cdot q_2$.
    
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \vspace{0.35\textheight} %%% <-- ERASE THIS LINE
      
    \item {\bfseries (5 points)} 
    Prove that the probability you receive the correct bit when it passes through $n$ relays is $$\frac{1+(1-2p)^n}{2}.$$
   
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    \end{enumerate}
\newpage




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries An Useful Estimate.}

For an integers $n$ and $t$ satisfying $0\leq t\leq n/2,$ define 
  $$ P_n(t) = \left(1-\frac1n\right)\left(1-\frac2n\right)\dotsi\left(1-\frac{t}n\right) $$
We will estimate the above expression.
({\footnotesize {\em Remark}: You shall see the usefulness of this estimation in the topic ``Birthday Bound'' that we shall cover in the forthcoming lectures.})

    \begin{enumerate}
    \item {\bfseries (13 points)}
    Show that 
        $$ \exp\left(-\frac{t^2}{2n} - \frac{t}{2n} - \frac{\Theta\left(t^3\right)}{6n^2}\right) 
        \geq P_n(t) \geq 
        \exp\left(-\frac{t^2}{2n} - \frac{t}{2n} -\frac{\Theta\left(t^3\right)}{3n^2}\right).$$
        
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \newpage
    
    \item {\bfseries (2 points)}
    Show that when $t=\sqrt{2cn},$ where $c$ is a positive constant, the expression above is
      $$ P_n(t) = \exp\left( \; -c - \; \Theta\left(1/\sqrt n\right) \; \right).$$
    
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \end{enumerate}
\newpage


\providecommand{\diff}[0]{\ensuremath{\;{\mathrm d}}\xspace}
%%% Extra credit: Abel
\item {\bfseries (Extra Credit)} {\bfseries An Application of Abel's Summation Formula.}
    One consequence of Abel's summation formula is the following summation estimate:
        $$ \sum_{i=1}^n f(i) = n\cdot f(n) - \int_1^n \floor{t} \cdot f'(t) \diff t.$$
    For a constant $k\geq 0$, use this formula to conclude that: 
        $$ \sum_{i=1}^n i^k \leq \frac{n^{k+1}}{k+1} + n^k - \frac1{k+1}.$$

    {\em Remark: Using the technique discussed in class, the upper bound we get is 
        $$ \int_1^{n+1} t^k \diff t \leq \frac{(n+1)^{k+1}}{k+1} - \frac1{k+1},$$
    which is worse than the bound we get using Abel's formula. 
    }
    
    {\bfseries Solution.}

\newpage

\item {{\bfseries (Extra Credit)}} {\bfseries An Application of Euler-Maclaurin Summation Formula.}
    A usable form of the Euler-Maclaurin Summation formula is the following
        $$ \sum_{i=1}^n f(i) = \int_1^n f(t)\diff t + \frac12\cdot f(n)  + C_f + \sum_{1\leq j \leq m}\frac{B_{2j}}{(2j)!}\cdot f\p{2j-1}(n) + R_m,$$
    where
    \begin{enumerate}
        \item $m\in\{1,2,\dotsc\}$ is an arbitrary parameter. 
        \item $C_f$ is a suitable constant depending only on the function $f$. 
        \item $B_{2j}$ is the $2j$-th Bernoulli number. 
            For example, $B_2 = 1/6$, $B_4 = -1/30$, $B_6 = 1/42$, and so on...
        \item $f\p{2j-1}$ is the $(2j-1)$-th derivative of the function $f$ 
        \item $R_m$ is the remainder, where 
            $$ R_m = O\left( \int_n^\infty \abs{f\p{2m}(t)} \diff t\right).$$
    \end{enumerate}
    Use this formula to prove the Stirling approximation: 
    For any $m\in\{1,2,\dotsc\}$
        $$ \ln(n!) = \sum_{i=1}^n \ln i = n\ln n - n + \frac12\ln n + \frac12\ln{2\pi} + \sum_{1\leq j\leq m} \frac{B_{2j}}{2j\cdot (2j-1) }\cdot \frac1{n^{2j-1}} + R_m,$$
    where $R_m = O\left(\frac{(2m-2)!}{n^{2m-1}}\right) $

    {\bfseries Solution.}
    
\end{enumerate}
\end{document}