\documentclass[11pt]{article}
\input{headers00}
\begin{document}

\title{Homework 0}

\date{}

\maketitle 

\thispagestyle{empty} 
\pagestyle{empty}



\begin{enumerate}


\item {\bfseries Estimating Sums.} 
  In this problem we estimate two summations. 
  \begin{itemize}
  \item(8 + 8 points) $S = \sum_{i=1}^n \frac1i$. 
    Obtain (meaningful) upper and lower bounds for $S$ using integrals. 
  \item(9 points) In the lecture, we saw that if $f$ is a concave upwards function then the following is true. 
    $$\frac{f(x-1)+f(x)}{2} \geq \int_{x-1}^xf(t)\dif t$$
    Prove that, for a concave upwards function $f$, we have
    $$f(1) + f(2) + \dotsi + f(n) \geq \frac{f(1) + f(n)}2 + \int_{1}^nf(t)\dif t$$
  \end{itemize}



\item {\bfseries Some Group Theory.} 
  In this problem we shall derive some basic results based on the definition of groups introduced in the lectures. 
  Let $(G,\circ)$ be a group and let $e$ be the identity element of the group. 
  
  \begin{itemize}
  \item (5 points) Prove that it is impossible that there exists $a,b,c\in G$ such that $a\neq b$ but $a\circ c = b\circ c$. 
  \item(5 points) Suppose $a,b\in G$. 
     Let $\inv(a)$ and $\inv(b)$ be the inverses of $a$ and $b$, respectively (\ie, $a\circ\inv(a)=e$ and $b\circ\inv(b)=e$). 
     Prove that $\inv(a)=\inv(b)$ if and only if $a=b$. 
   \item(10+5 points) Let $G = \{x_1,x_2,\dotsc,x_n\}$, \ie $G$ is a finite group. 
     Suppose $G$ also has the {\bfseries commutativity} property, \ie, for all $a,b\in G$, we have $a\circ b = b\circ a$ (such groups are called Abelian). 
     Define $x = x_1\circ x_2\circ \dotsi \circ x_n$. 
     Prove that $x \circ x = e$. 
     Give an example of a commutative group where $x\neq e$.
     
     {\footnotesize
       (Comment: This demonstrates that the result is tight!)%
     }  
  \end{itemize} 



\item {\bfseries Some properties of $(\bbZ_p^*,\times)$.} 
  Recall that $\bbZ_p^*$ is the set $\{1,\dotsc,p-1\}$ and $\times$ is integer multiplication $\mod p$, where $p$ is a prime. 
  For example, if $p=5$, then $2\times 3$ is $1$. 
  In this problem we shall show that $(\bbZ_p^*,\times)$ is a group. 
  The only part missing in the lecture was the proof that every $x\in\bbZ_p^*$ has an inverse. 
  We will find the inverse of any element $x$. 
  \begin{itemize}
  \item(10 points) Recall $\smallchoose pk \defeq \frac{p!}{k!(n-p)!}$. 
    For a prime $p$, prove that $p$ divides $\smallchoose pk$, if $k\in\{1,2,\dotsc,p-1\}$. 
  \item(5 points) Recall that $(1+x)^p = \sum_{k=0}^p \smallchoose pk x^k$. 
    Prove by induction that, for any $x\in\bbZ_p^*$, we have  
      $$\overbrace{x\times x \times \dotsi \times x}^{p\text{-times}}=x$$
   \item(10 points) For $x\in\bbZ_p^*$, prove that the inverse of $x$ is given by 
     $$\overbrace{x\times x \times \dotsi \times x}^{(p-2)\text{-times}}$$ 
     
  \end{itemize} 


\item {\bfseries Efficient Exponentiation Algorithm.} (25 points) 
  Suppose $(G,\circ)$ is a group that is generated by $g$. 
  In the lecture notes, we have seen an algorithm that constructs the list
    $$n[0]=g, n[1]=g^2, n[2]=g^4,\dotsc, n[k]=g^{2^k}$$
  using the $\circ$ operation only $k$ times. 
  
  Suppose $i$ is an integer in the range $\{0,1,\dotsc,2^{k+1}-1\}$. 
  Give an algorithm that computes $g^i$ from the list presented above using at most $(k+1)$ additional uses of the $\circ$ operator. 
  
  


  


\end{enumerate}








\end{document}
