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

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

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


\begin{document}

\title{Homework 2}

\date{}

\maketitle 

\thispagestyle{fancy}  
\pagestyle{fancy}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% PLEASE LIST COLLABORATORS BELOW  %%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\bfseries Collaborators :} 
%%% List your collaborators and any online resources here.



\newpage
\centering
{\Huge{Practice Questions}}

These are practice questions.
They will \textbf{NOT} be graded.
We have also provided the final answers.
However, it is up to you to understand how or why the given solution is correct.

You do not need to submit these on Gradescope.
However, you may find it easier to just include them in the pdf.
In that case, please do not mark these questions on Gradescope.

\newpage


\begin{enumerate}
	\item {\bfseries Calculating Large Powers mod $p$ (0 points).} 
	      Recall that we learned the repeated squaring algorithm in class. 
	      Calculate the following using this concept 
	      $$ 10^{2025^{2025}+2025} \pmod{101} $$
	      (Hint: Note that $101$ is a prime number, and before applying the repeated squaring algorithm, try to simplify the problem using what you learned in part C of question 1.) 
	      	      
	      (Note: as can be seen from the latex file, the entirety of $2025^{2025}+2025$ is in the exponent of $10$. Also recall that $a^{b^c} = a^{\left(b^c\right)}$, not $\left(a^b\right)^c$, which is $a^{b\cdot c}$)
	      	          
	      {\bfseries Solution.} 
	      	      
	      $100$
	      \vfill
	      	          
	      	          
	\item {\bfseries Order of an Element in $(\bbZ_p^*,\times)$. (0 points)} 
	      The \textit{order} of an element $x$ in the multiplicative group $(\bbZ_p^*,\times)$ is the smallest positive integer $h$ such that $x^h = 1 \mod p $. 
	      For example, the order of 2 in $(\bbZ_5^*,\times)$ is 4, and the order of $4$ in $(\bbZ_5^*,\times)$ is 2. 
	      \begin{enumerate}
	      	\item (0 points) What is the order of 3 in $(\bbZ_{7}^*,\times)$? 
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	      
	      	      The order of 3 in $(\bbZ_{7}^*,\times)$ is 6.
	      	      	      	      
	      	      \vfill
	      	      	      	      
	      \end{enumerate}
	      \newpage
	      	      
	\item {\bfseries Elliptic curve (0 points).} 
	      In class, we have briefly discussed elliptic curves.
	      Here we will see some concrete examples of elliptic curves on finite prime fields.
	      	      
	      Let $Y^2 = X^3 + X$ be an elliptic curve over the field $(F_{23}, +, \cdot).$
	      A point $(X, Y)$ lies on the elliptic curve if it satisfies the equation $Y^2 = X^3 + X.$
	      \begin{enumerate}
	      	\item (0 points)
	      	      Are the two points $P = (9, 18)$ and $Q = (11, 10)$ on the curve?
	      	      	      	              
	      	      {\bfseries Solution.}  
	      	      	      	      
	      	      Yes, they are.
	      	      	      	      
	      	      \vfill
	      	      	      	          
	      	\item (0 points)
	      	      Find the point $R$ where the line connecting $P$ and $Q$ intersects the elliptic curve $Y^2 = X^3 + X.$ 
	      	      For $R=(x,y)$, define the ``inverse of $R$'' to be the point $S = (x,-y)$. 
	      	      Find the inverse of point $R.$
	      	      Recall from the lecture that ``$P + Q$'' is defined to be the point $S \defeq $ ``inverse of $R$.''  
	      	      	      	                  
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      The inverse of $R$ is $S = (19, 22).$
	      	      	      	      
	      	      \vfill
	      \end{enumerate}
	      	          
	      \newpage
\end{enumerate}


\newpage
\centering
{\Huge{Homework Questions}}

These are homework questions and will be graded.
Please make sure to clearly mark each problem on Gradescope.
\newpage

\begin{enumerate}
		
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%%%%%%%%% PROBLEM 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		
	\item {\bfseries Some properties of $(\bbZ_p^*,\times)$ (5+5 points).} 
	      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 prove that $(\bbZ_p^*,\times)$ is a group when $p$ is any prime. 
	      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\in\bbZ_p^*$. 
	      \begin{enumerate}
	      	\item(5 points) 
	      	For $x\in\bbZ_p^*$, prove that the inverse of $x\in\bbZ_p^*$ is given by
	      	$$\overbrace{x\times x \times \dotsi \times x}^{(p-2)\text{-times}}$$ 
	      	That is, prove that $x^{p-1}=1\mod p$, for any prime $p$ and $x\in\bbZ_p^*$.    
	      		      	    
	      	{\bfseries Solution.}
	      		      	
	      	\   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      		      	    
	      	\newpage
	      	\item (5 points)
	      	      Let $p$, and $q$ be two distinct primes. Prove that $(p^q-p)+(q^p-q)$ is divisible by $pq$.
	      	      	      	           
	      	      {\bfseries Solution.}
	      	      	      	      
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      \end{enumerate}
	      \newpage
	      	      
	      	      
	      	      
	      	      
	      	      
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%% PROBLEM 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      	      
	\item {\bfseries Understanding Groups: Part one (5+6+6+8+5 points).} 
	      Recall that when we defined a group $(G,\circ)$, we stated that there exists an element $e$ such that for all $x\in G$ we have $x\circ e=x$. 
	      Note that $e$ is ``applied on $x$ from the right.'' 
	      Similarly, for every $x\in G$, we are guaranteed that there exists $\inv(x)\in G$ such that $x\circ\inv(x)=e$. 
	      Note that $\inv(x)$ is again ``applied to $x$ from the right.'' 
	      	        
	      In this problem, however, we shall explore the following questions: (a) Is there an ``identity from the left?,'' and (b) Is there an ``inverse from the left?'' 
	      	        
	      We shall formalize and prove these results in this question. 
	      \begin{enumerate}
	      	\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$. 
	      	      	      	      
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      	      \newpage
	      	      	      	          
	      	\item (6 points) 
	      	      Prove that $e\circ x = x$, for all $x\in G$.  
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      	      \newpage
	      	      	      	          
	      	\item (6 points) 
	      	      Prove that if there exists an element $\alpha \in G$ such that for \textbf{some} $x\in G$, we have $\alpha \circ x=x$, then $\alpha=e$. 
	      	      (Remark: Note that these two steps prove that the ``left identity'' is identical to the right identity $e$.) 
	      	      	      	          
	      	      {\bfseries Solution.} 
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      	      \newpage
	      	      	      	      
	      	\item (8 points) 
	      	      Prove that $\inv(x)\circ x = e$.  
	      	      	      	          
	      	      {\bfseries Solution.} 
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      	      \newpage
	      	      	      	          
	      	\item (5 points) 
	      	      Prove that if there exists an element $\alpha\in G$ and $x\in G$ such that $\alpha\circ x=e$, then $\alpha=\inv(x)$. 
	      	      	      	          
	      	      (Remark: Note that these two steps prove that the ``left inverse of $x$'' is identical to the right inverse $\inv(x)$.) 
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      \end{enumerate}
	      \newpage
	      	      
	      	      
	      	      
	      	      
	      	      
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%% PROBLEM 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      	      
	\item {\bfseries Understanding Groups: Part Two (9+6 points).}
	      In this part, we will prove a crucial property of inverses in groups -- they are unique. And finally, using this property, we will prove a crucial result for the security of the one-time pad over the group $(G,\circ)$. 
	      \begin{enumerate} 
	      	\item(9 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$.  
	      		      	    
	      	{\bfseries Solution.}  
	      		      	    
	      	\   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      		      	    
	      	\newpage
	      		      	  
	      	\item (6 points) 
	      	      Suppose $m\in G $ is a message and $c\in G$ is a ciphertext. 
	      	      Prove that there exists a unique $\sk\in G$ such that $m\circ \sk = c$. 
	      	      	      	          
	      	      {\bfseries Solution.} 
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      \end{enumerate}
	      \newpage 
	      	      
	      	      
	      	      
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%% PROBLEM 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      	      
	\item {\bfseries Order of an Element in $(\bbZ_p^*,\times)$. (10+5+10+5 points)} 
	      The \textit{order} of an element $x$ in the multiplicative group $(\bbZ_p^*,\times)$ is the smallest positive integer $h$ such that $x^h = 1 \mod p $. 
	      For example, the order of 2 in $(\bbZ_5^*,\times)$ is 4, and the order of $4$ in $(\bbZ_5^*,\times)$ is 2. 
	      \begin{enumerate}
	      		      	    
	      	\item (10 points) 
	      	      Let $x$ be an element in $(\bbZ_p^*,\times)$ such that $x^n=1 \mod{p}$ for some positive integer $n$ and let $h$ be the order of $x$ in $(\bbZ_p^*,\times)$. 
	      	      Prove that $h$ divides $n$.
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	      
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      	      \vfill
	      	      	      	      
	      	      \newpage
	      	      	      	          
	      	\item (5 points) 
	      	      Let $h$ be the order of $x$ in $(\bbZ_p^*,\times)$. 
	      	      Prove that $h$ divides $(p-1)$.
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	      
	      	      	      	          
	      	      \newpage
	      	\item (10 points) 
	      	      Let $h$ be the order of $x$ in 
	      	      $(\bbZ_p^*,\times)$, and $k$ be a 
	      	      positive integer. Let $r$ denote the order of $y=x^k \mod p\in \bbZ_p^*$.
	      	      Show that $r=\frac{h}{d}\in \bbZ$ where $d$ denotes the 
	      	      greatest common divisor of $h$ and $k$.\newline
	      	      \textbf{Hint:} Use part (a) and prove 
	      	      that $r$ divides $\frac{h}{d}$ 
	      	      and $\frac{h}{d}$ divides $r$.
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	      
	      	      \newpage
	      	      	      	      
	      	\item (5 points)
	      	      Let $p>2$ be a prime, and $a\in (\bbZ_p^*,\times)$. Then, show that the element
	      	      $b=a^{\frac{p-1}{2}} \in (\bbZ_p^*,\times)$ is equal to $1$ or has order $2$.   
	      	      	      	      
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      \end{enumerate}
	      \newpage
	      	      
	      	      
	      	      
	      	      
	      	      
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%Problem 5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      	      
	\item {\bfseries Defining Multiplication over $\bbZ_{27}^*$ (5+10+10 points).} 
	      In the class, we had considered the group $(\bbZ_{26},+)$ to construct a one-time pad for a one-alphabet message. 
	      Can we define a group with 26 elements using a ``multiplication''-like operation? 
	      This problem will help you define the $(\bbZ_{27}^*,\times)$ group, which has 26 elements.
	      	        
	      {\bfseries The first attempt from class.}
	      Recall that in class we saw that the following is also a group.
	      $$ (\bbZ_{27}\setminus\{0,3,6,9,12,15,18,21,24\},\times),$$
	      where $\times$ is integer multiplication $\mod 27$. 
	      However, the set had only 18 elements. 
	      	        
	      In this problem, we shall define $(\bbZ_{27}^*,\times)$ in a different manner such that the set has 26 elements. 
	      	        
	      {\bfseries A new approach.} 
	      Interpret $\bbZ_{27}^*$ as the set of all triplets $(a_0,a_1,a_2)$ such that $a_0,a_1,a_2 \in \bbZ_3$ and at least one of them is non-zero. 
	      Intuitively, you can think of the triplets as the ternary representation of the elements in $\bbZ_{27}^*$. 
	      We interpret the triplet $(a_0,a_1,a_2)$ as the polynomial $a_0 + a_1X + a_2X^2$. 
	      So, every element in $\bbZ_{27}^*$ has an associated non-zero polynomial of degree at most 2, and every non-zero polynomial of degree at most 2 has an element in $\bbZ_{27}^*$ associated with it. 
	      	        
	      The multiplication ($\times$ operator) of the element $(a_0,a_1,a_2)$ with the element $(b_0,b_1,b_2)$ is defined as the element corresponding to the polynomial
	      $$(a_0 + a_1X + a_2X^2) \times (b_0 + b_1X + b_2X^2) \mod 2 + 2X + X^3$$
	      	          
	      The multiplication ($\times$ operator) of the element $(a_0,a_1,a_2)$ with the element $(b_0,b_1,b_2)$ is defined as follows.
	      	          
	      %%%%%%
	      \begin{boxedminipage}{\linewidth}
	      	Input $(a_0,a_1,a_2)$ and $(b_0,b_1,b_2)$.
	      	\begin{enumerate}
	      		\item Define $A(X) \defeq a_0 + a_1X + a_2X^2$ and $B(X) \defeq b_0+b_1X+b_2X^2$
	      		\item Compute $C(X) \defeq A(X)\times B(X)$ (interpret this step as ``multiplication of polynomials with integer coefficients'') 
	      		\item Compute $R(X) \defeq C(X) \mod 2+2X+X^3$ (interpret this as step as taking a remainder where one treats both polynomials as polynomials with integer coefficients). 
	      		      Let $R(X) = r_0 + r_1X + r_2X^2$
	      		\item Return $(c_0,c_1,c_2) = (r_0\mod 3, \; r_1\mod 3, \; r_2\mod 3)$
	      		      	      		          
	      	\end{enumerate}
	      \end{boxedminipage}
	      %%%%%%
	      	        
	      For example, the multiplication $(0,1,1)\times (1,1,2)$ is computed in the following way.
	      \begin{enumerate}
	      	\item $A(X) = X + X^2$ and $B(X) = 1+X+2X^2$. 
	      	\item $C(X) = X + 2X^2 + 3X^3 + 2X^4$.
	      	\item $R(X) = -6-9X-2X^2$.
	      	\item $(c_0,c_1,c_2) = (0,0,1)$.
	      \end{enumerate}
	      	      
	      % \newpage
	      According to \underline{this definition} of the $\times$ operator, solve the following problems. 
	      \begin{itemize}
	      	\item (5 points) 
	      	      Evaluate $(2,0,1) \times (2,0,2).$
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      	      \newpage
	      	      	      	          
	      	\item (10 points) 
	      	      Note that $e=(1,0,0)$ is an identity element. 
	      	      Find the inverse of $(0,0,2)$.
	      	      	      	      
	      	      {\bfseries Solution.}  
	      	      	      	          
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      	      \newpage
	      	      	      	        
	      	\item (10 points) 
	      	      Assume that $(\bbZ_{27}^*,\times)$ is a group. 
	      	      Find the order of the element $(0,0,1)$. 
	      	      	      	          
	      	      (Recall that, in a group $(G,\circ)$, the order of an element $x\in G$ is the smallest positive integer $h$ such that $\overbrace{x\circ x \circ \dotsi \circ x}^{h\text{-times}} = e$)
	      	      	      	          
	      	      {\bfseries Solution.}  
	      	      	      	      
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      	          
	      \end{itemize}
	      \newpage
	      	      
	      	      
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%Problem 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\item {\bfseries Special Group: Quotient Group $\left(\bbZ_p^*/\left\{-1, +1\right\}, \times\right)$ (1+1 points)}
	      
	      We will define the group $\left(\bbZ_p^*/\left\{-1, +1\right\}, \times\right)$ using the quotient group and coset notation.
	          
	      In general, given a group $G$ and a subgroup $H$, $G/H$ means the set of cosets formed by $H$ in $G$.
	      The cosets of $H$ in $G$ are $gH \defeq \left\{g\times h: h\in H\right\}$ for $g\in G$.
	      
	      Now, consider the elements in $\bbZ_p^*$, which are $$\left\{1, 2, 3, \dotsc, \frac{p-1}{2}-1, \frac{p-1}{2}, \frac{p-1}{2}+1, \frac{p-1}{2}+2, \dotsc, p-3, p-2, p-1\right\}.$$
	      The cosets $\bbZ_p^*/\left\{-1, +1\right\}$ are $$\left\{1\times \left\{ -1, +1\right\}, 2\times \left\{ -1, +1\right\}, 3\times \left\{ -1,  +1\right\}, \dotsc, \frac{p-1}{2}\times \left\{ -1, +1\right\}\right\}.$$
	      Observe that $1\times \left\{ -1, +1\right\}$ contains both $1$ and $-1=p-1$.
	      Similarly, $2\times\left\{ -1, +1\right\}$ contains both $2$ and $p-2$.
	      Finally, $\frac{p-1}{2}\times \left\{ -1, +1\right\}$ contains both $\frac{p-1}{2}$ and $\frac{-p+1}{2}=p+\frac{-p+1}{2}=\frac{p-1}{2}+1$.
	      The final set of elements in $\bbZ_p^*/\left\{-1, +1\right\}$ are $\left\{1, 2, \dotsc, \frac{p-1}{2}-1, \frac{p-1}{2}\right\}$.
	      
	      Intuitively, you can think of it as for any $x\in \bbZ_p^*$, both $x$ and $-x\in \bbZ_p^*$ represent the same element in $\bbZ_p^*/\left\{-1, +1\right\}$. The same way that an integer $x$ and $x+p$ represent the same element in $\bbZ_p^*$.
	      For this reason, $\bbZ_p^*$ can also be written as $\bbZ/p\bbZ$.
	      
	      Let us look at a concrete example:
	      $\left(\bbZ_7^*/\left\{-1, +1\right\}, \times\right)$.
	      The elements in $\bbZ_7^*$ are $\left\{1, 2, 3, 4, 5, 6\right\}$.
	      The elements in $\bbZ_7^*/\left\{-1, +1\right\}$ are $\left\{1, 2, 3\right\}$.
	      
	      $\times$ is defined as multiplication in $\bbZ_p^*$, then fitting it into elements in $\bbZ_p^*/\left\{-1, +1\right\}$.
	      For example, $2\times 2 = 4 = 1$.
	      
	      Answer the following questions:
	      \begin{enumerate}
	      	\item (1 point) What is $2\times 3$?
	      	      
	      	      {\bfseries Solution.}
	      	              
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      \vfill
	      	      
	      	\item (1 point) What is $3\times 3$?
	      	      
	      	      {\bfseries Solution.}
	      	              
	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      \vfill
	      \end{enumerate}
	      
	      
	      
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%Problem 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	      \newpage
	\item {\bfseries Special Group: Elliptic Curve Group (2+2+3+3+1+2 points)}
	      An elliptic curve over a field $K$ is the graph $E$ of an equation $Y^2 = X^3 + aX + b$ where $X, Y, a, b \in K.$
	      The identity of the elliptic curve group is a point at infinity, denoted as $\infty. $
	      Note that the point $\infty$ is not a point on the graph $Y^2 = X^3 + aX + b.$
	      
	      \begin{enumerate}
	      	\item \textbf{Addition Rule.}
	      	      Consider a point $P = (x, y)$ lies on the elliptic curve $E \colon \;Y^2 = X^3 + aX + b,$ we define $-P \defeq (x, -y)$ as $P$ reflected in the $x$-axis.
	      	      Given, two points $P = (x_p, y_p), Q = (x_q, y_q)$ on $E,$ if $x_p \neq x_q,$ the two points are not on the same vertical line, define the addition as $P + Q = -R,$ where $R$ is the third point on the straight line passing through $P$ and $Q.$
	      	      If $x_p = x_q,$ the two points are on the same vertical line, then $y_p = - y_q$ and $Q = -P.$
	      	      In this case, we define $P + Q = \infty,$ the identity of the elliptic curve group.
	      	      Moreover, define $P + \infty = \infty + P = P$ for any element $P \in E.$
	      	      
	      	      \begin{enumerate}
	      	      	\item (2 points) Consider $E \colon\; Y^2 = X^3 - 2X + 5$ over $F_{19}.$
	      	      	      Let $P = (2, 3)$ and $Q = (10, 4).$
	      	      	      Check that $P$ and $Q$ are points on $E.$
	      	      	      
	      	      	      {\bfseries Solution.}
	      	      	      
	      	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      
	      	      	      \vfill
	      	      	      
	      	      	\item (2 points) Compute $P + Q.$
	      	      	      
	      	      	      {\bfseries Solution.}
	      	      	      
	      	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      
	      	      	      \vfill
	      	      	      
	      	      	\item (3 points)
	      	      	      To add a point $P \neq \infty$ to itself, draw a tangent line on the elliptic curve $E$ at point $P.$
	      	      	      If the line is vertical, then $P + P = \infty.$
	      	      	      If the tangent line is not vertical, then it intersects $E$ at exactly one more point.
	      	      	      For $P = (2, 3), Q = (10, 4)$ and $-R = P + Q,$ compute $P + P, Q + Q$ and $R + R.$
	      	      	      
	      	      	      {\bfseries Solution.}
	      	      	      
	      	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	      
	      	      	      \vfill
	      	      \end{enumerate}
	      	      
	      	      \newpage
	      	\item \textbf{Elliptic Curve forms a group with identity element $\infty$.}
	      	      Consider elliptic curve $E \colon \; Y^2 = X^3 + aX +b$ over field $K.$
	      	      Let $P = (x_p, y_p), Q = (x_q, y_q)$ be two points on $E.$
	      	      Let $-R = P + Q = (x_r, -y_r).$
	      	      We will show the following.
	      	      \begin{enumerate}
	      	      	\item (3 points) Let $Y = mX + t$ be the line intersecting $P$ and $Q.$ 
	      	      	      Assume $x_p \neq x_q.$
	      	      	      Let $m = \frac{y_p - y_q}{x_p - x_q}$ be the slope of the line.
	      	      	      Show that $x_r = m^2 - x_p - x_q$ and $y_r = y_p - m (x_p - x_r).$
	      	      	      
	      	      	      (Hint: Recall Vieta's formula for degree $3$ polynomial $a_1X^3 + a_2 X^2 + a_1X + a_0 = 0$ over field $K,$ i.e. $a_0, a_1, a_2, a_3 \in K.$
	      	      	      Let $r_1, r_2, r_3 \in K$ be the roots of the polynomial. 
	      	      	      The following equality holds.
	      	      	      $$\begin{cases}
	      	      	      r_1 + r_2 + r_3 = - \frac{a_2}{a_3} \\
	      	      	      r_1r_2 + r_2r_3 + r_1r_3 = \frac{a_1}{a_3} \\
	      	      	      r_1r_2r_3 = -\frac{a_0}{a_3}
	      	      	\end{cases}.$$
	      	      	)
	      	      	
	      	      	{\bfseries Solution.}
	      	      	
	      	      	\   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
	      	      	
	      	      	
	      	      	\item (1 point) Show that if $x_p = x_q$ and $y_p = -y_q,$ then $P + Q = \infty.$
	      	      	      
	      	      	      {\bfseries Solution.}
	      	      	      
	      	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
                          \vfill
	      	      	      
	      	      	      
	      	      	\item (2 points) Show that if $x_p = x_q$ and $y_p = y_q \neq 0,$ then $x_r = m^2 - 2x_p$ and $y_r = m(x_p - x_r)-y_p$ with $m = \frac{3x_p^2 + a}{2y_p}.$
	      	      	      
	      	      	      {\bfseries Solution.}
	      	      	      
	      	      	      \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE

                          \vfill
	      	      	      
	      	      \end{enumerate}
	      	      
	      	              
	      	              
	      \end{enumerate}
	          
	      
	      
	      	      
\end{enumerate}
\end{document}
