
\documentclass[11pt]{article}
\usepackage{amsfonts,amsthm,amsmath,amssymb}
\usepackage{array}
\usepackage{epsfig}
\usepackage{fullpage}
\usepackage{color}


%%%%%%%%%%%%%%% MACROS specific to this PSET %%%%%%%%%%%%%%%%%%%%%%


\newcommand{\lat}{\mathcal{L}}
\newcommand{\basis}{\mathbf{B}}

\newcommand{\vol}{\mathsf{vol}}
\newcommand{\sh}{\lambda_1}
%\newcommand{\det}{\mathsf{det}}

\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\N}{\mathbb{N}}

%%%%%%%%% Vectors and Matrices

\newcommand{\vecv}{\mathbf{v}}
\newcommand{\vecb}{\mathbf{b}}
\newcommand{\vecbt}{\widetilde{\vecb}}
\newcommand{\vecs}{\mathbf{s}}
\newcommand{\vect}{\mathbf{t}}
\newcommand{\vecy}{\mathbf{y}}

\newcommand{\matB}{\mathbf{B}}

\newcommand{\poly}{\mathsf{poly}}
\newcommand{\Span}{\mathsf{Span}}
\newcommand{\dist}{\mathsf{dist}}


\def\rot{\mathsf{Rot}}
\def\bydef{\stackrel{\Delta}{=}}


\def\matA{\mathbf{A}}
\def\vecy{\mathbf{y}}
\def\vece{\mathbf{e}}
\def\vecz{\mathbf{z}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\title{MAT 301 Problem Set 2\\{\large [Posted: January 20, 2012. Due: January 30, 2012. Worth: 100 points]}}
\author{}
\date{}

\begin{document}
\maketitle
%\input{pset-preamble.tex}

%\lecture{1}{Vinod Vaikuntanathan}{September 13, 2011}{October 3, 2011}


\def\sslwe{\mathsf{ssLWE}}
\def\lwe{\mathsf{LWE}}

% Macros for vectors
\def\veca{\mathbf{a}}
\def\vecs{\mathbf{s}}
\def\vecc{\mathbf{c}}

\vspace*{-0.7in}

\medskip\noindent
{\bf Note:} I value {\em succinct} and {\em clearly written} solutions {\em without unnecessary verbiage}. Such solutions will be rewarded with bonus points.

\begin{enumerate}

\item {\bf (10 points)} Compute the multiplicative inverse of $a \pmod{n}$ for the following values of $a$ and $n$ (if it exists), using Extended Euclid. Show your work.

\begin{itemize}

\item $a = 2011$, $n = 2012$.



\item $a = 5678$, $n = 8765$.



\end{itemize}

\item {\bf (10 points)} Solve for $x$ in the following equations. You may use any method you like, but you have to show your work.

\begin{itemize}

\item $2x = 19 \pmod{127}$.
\item $111x = 4 \pmod{496}$.

\end{itemize}

\item {\bf (10 points)} Find a multiple of $203$ that ends with the digits $999$. Show your work.


\item {\bf (30 points)} You are in Strangeland, where the only official coins are the $7$ cent coin and the $11$ cent coin. How can you accomplish the following tasks?

\begin{itemize}
\item {\bf (10 points)} You go to a shop and buy an item for $1$ cent. Assume that you and the shopkeeper have an unlimited supply of the
$7$ cent and $11$ cent coins. You have to pay the shopkeeper $1$ cent for the item.


\item {\bf (20 points)} You have to pay a $59$ cent parking charge for your strangemobile on a strangeland parking meter. The meter takes in coins, but
does not dispense change. You have to pay exactly $59$ cents at the meter. If this is possible, how would you do it? If not, prove that this is impossible.

\end{itemize}


\item {\bf (10 points)}  You have two drinking glasses, one that holds exactly $15\ell$. and the other that holds exactly $19\ell$.
(The glasses are plain, and have no measuring scales). How do you measure $1\ell$ of liquid using the two glasses?


\item {\bf (30 points)} The Fibonacci sequence of numbers $F_0, F_1, F_2, \ldots$ is defined by the following recurrence:
$F_0 = 0, F_1 = 1$ and $F_i = F_{i-1} + F_{i-2} \mbox{ for all $i > 1$}$.
Thus, the first few Fibonacci numbers are
\[ F_0 = 0, F_1 = 1, F_2 = 1, F_3 = 2, F_4 = 3, F_5 = 5, F_6 = 8, F_7 = 13, \ldots \]

\begin{itemize}

\item {\bf (10 points)}
{\bf Prove} that any two adjacent Fibonacci numbers $F_i$ and $F_{i+1}$ are relatively prime.

\item {\bf (20 points)}
{\bf Prove} the identity $F_{i+1}F_{i-1}-F_i^2 = (-1)^{i}$.

[{\em Hint: Use Induction. Show your work.}]

Using the identity, compute
$F_{i}^{-1} \pmod{F_{i+1}}$.


\end{itemize}




\end{enumerate}


\end{document}
