Skip to main content
Contents
Search Book
Search Results:
No results.
Read aloud
Readability settings Prev Up Next
\(\def\ds{\displaystyle}
\def\d{\displaystyle}
\def\N{\mathbb N}
\def\B{\mathbf{B}}
\def\Z{\mathbb Z}
\def\Q{\mathbb Q}
\def\R{\mathbb R}
\def\C{\mathbb C}
\def\F{\mathbb F}
\def\pow{\mathcal P}
\def\inv{^{-1}}
\def\iff{\leftrightarrow}
\def\Iff{\Leftrightarrow}
\def\land{\wedge}
\def\And{\bigwedge}
\def\entry{\entry}
\def\AAnd{\d\bigwedge\mkern-18mu\bigwedge}
\def\Vee{\bigvee}
\def\VVee{\d\Vee\mkern-18mu\Vee}
\def\imp{\rightarrow}
\def\Imp{\Rightarrow}
\def\Fi{\Leftarrow}
\def\var{\mbox{var}}
\def\Th{\mbox{Th}}
\def\entry{\entry}
\def\sat{\mbox{Sat}}
\def\con{\mbox{Con}}
\def\iffmodels{\bmodels\models}
\def\dbland{\bigwedge \!\!\bigwedge}
\def\dom{\mbox{dom}}
\def\rng{\mbox{range}}
\def\isom{\cong}
\def\st{\mid}
\def\divides{\mid}
\def\and{\text{ and }}
\def\lcm{\text{lcm}}
\def\modulus{\mathbin{\%}}
\newcommand{\vtx}[2]{node[fill,circle,inner sep=0pt, minimum size=4pt,label=#1:#2]{}}
\newcommand{\va}[1]{\vtx{above}{#1}}
\newcommand{\vb}[1]{\vtx{below}{#1}}
\newcommand{\vr}[1]{\vtx{right}{#1}}
\newcommand{\vl}[1]{\vtx{left}{#1}}
\renewcommand{\v}{\vtx{above}{}}
\def\circleA{(-.5,0) circle (1)}
\def\circleAlabel{(-1.5,.6) node[above]{$A$}}
\def\circleB{(.5,0) circle (1)}
\def\circleBlabel{(1.5,.6) node[above]{$B$}}
\def\circleC{(0,-1) circle (1)}
\def\circleClabel{(.5,-2) node[right]{$C$}}
\def\twosetbox{(-2,-1.4) rectangle (2,1.4)}
\def\threesetbox{(-2.5,-2.4) rectangle (2.5,1.4)}
\def\ansfilename{practice-answers}
\def\shadowprops{{fill=black!50,shadow xshift=0.5ex,shadow yshift=0.5ex,path fading={circle with fuzzy edge 10 percent}}}
\newcommand{\hexbox}[3]{
\def\x{-cos{30}*\r*#1+cos{30}*#2*\r*2}
\def\y{-\r*#1-sin{30}*\r*#1}
\draw (\x,\y) node{#3};
}
\renewcommand{\bar}{\overline}
\newcommand{\card}[1]{\left| #1 \right|}
\newcommand{\twoline}[2]{\begin{pmatrix}#1 \\ #2 \end{pmatrix}}
\newcommand{\fixspacing}{\vspace{0pt plus 1filll}\mbox{}}
\usepackage{cancel}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 3.1 Divisibility and Congruences
The purpose of this section is twofold. First, Now that we have some experience with mathematical proof, weβre now going to expand the types of questions we can prove by introducing the Divides and Congruence relations. Second, this is the first step in building the tools we need towards working with some encryption algorithms.
Subsection The Divides Relation
In
ExampleΒ 1.3.3 , we saw the divides relation. Because weβre going to use this relation frequently, we will introduce its own notation.
Definition 3.1.2 . The Divides Relation.
Let
\(a \and b\) be two integers with
\(a \not= 0\text{.}\) We say
\(a\) divides \(b\) and write
\(a \divides b\) if there exists an integer
\(m\) such that
\(b = am\text{.}\)
We say that
\(a\) is a
factor of
\(b\text{,}\) and
\(b\) is a
multiple of
\(a\text{.}\)
Example 3.1.3 .
The following are examples of the divides relation:
\(3 \divides 6\) since \(6 = 3\cdot 2\)
\(4 \divides 100\) since \(100 = 4 \cdot 25\)
Here are some non-examples:
\(4 \nmid 10\) since there is no integer \(m\) for which \(10 = 4m\text{.}\)
\(6 \nmid 3 \text{.}\) Order matters.
This is a good time to remember that the relational statment
\(a \mid b\) is a propositional statement. It is true or false. Letβs compare the divides relation with some similar symbols.
Example 3.1.4 .
What kind of object are each of the following? What is the value, truth or numeric?
\(\displaystyle 2 \mid 8 \)
\(\displaystyle 14 \modulus 5 \)
\(\displaystyle 20 / 4 \)
\(\displaystyle 8 \mid 4 \)
\(\displaystyle 8 \div 4\)
Solution .
This is a statement. It is saying β2 divides into 8 evenly.β This statement is true.
This is a number. Its value is 4, since the remainder of 14 divided by 5 is 4.
This is a number. Its value is 5.
This is a statement. It says β8 divides into 4 evenly.β This is false.
This is a number. Its value is 2.
The divisibility relation has some very nice properties that let us practice our new skill of mathematical proof on this new object.
Proposition 3.1.5 . Properties of divisibility.
Let \(a, b, c \in \Z\) with \(a \not= 0\text{.}\) Then:
If \(a \divides b\) and \(a \divides c\) then \(a \divides ( b + c ) \text{.}\)
If \(a \divides b\) then \(a \divides bc\) for all \(c\in \Z\text{.}\)
If \(a \divides b\) and \(b \divides c\) then \(a \divides c \text{.}\)
Video / Answer .
Corollary 3.1.6 .
If
\(a, b, c\in \Z\) with
\(a\not= 0\) such that
\(a\divides b\) and
\(a \divides c\text{,}\) then
\({ a\divides (bm+cn)}\) where
\(m \and n\) are some integers.
Video / Answer .
Theorem 3.1.7 . The Division Algorithm.
Let \(n\) be an integer and \(d\) be a positive integer. Then there exist unique integers \(q \and r\) such that
\begin{equation*}
n = dq + r \hspace{1em} \text{with} \hspace{1em} 0\le r \lt d
\end{equation*}
Aside
This theorem is badly named. Itβs not actually an βalgorithmβ, a series steps to arrive at an answer. Thatβs what itβs always called, though. π€·ββοΈ
Example 3.1.8 .
Use the Division Algorithm to write each division as \(n = dq +r\) with \(0 \le r \lt d\text{,}\) with the variables defined in the statement above.
\(\displaystyle 543 \div 7\)
\(\displaystyle -42 \div 13\)
Subsection The Congruence Relation
Definition 3.1.9 . The Congruence Relation.
Let \(a \and b\) be two integers and \(m\) be a positive integer. We say that \(a\) is congruent to \(b\) modulo \(m\) if
\begin{equation*}
m \divides (b-a)
\end{equation*}
We write
\(a \equiv b \pmod m\)
We call
\(m\) the
modulus .
Example 3.1.10 .
Each of these statements is true:
\(\displaystyle 13 \equiv 6 \pmod 7 \)
\(\displaystyle -8 \equiv 6 \pmod 7 \)
\(\displaystyle 7 \equiv 0 \pmod 7\)
Definition 3.1.12 . Congruence Classes.
If \(a\) is an integer and \(m\) is a positive integer, we define the congruence class of \(a\) modulo \(m\) to be the set of all integers congruent to \(a\) modulo \(m\text{.}\)
\begin{equation*}
\left[ a \right]_m = \left\{ b \mid b \equiv a\pmod{m} \right\}
\end{equation*}
Example 3.1.13 .
What congruence class is indicated by the set:
\(\displaystyle \left\{\dots, -6, -1, 4, 9, 14, \dots\right\}\)
\(\displaystyle \left\{\dots, -13, 20, 53, 86, \dots \right\}\)
Example 3.1.14 .
Find all congruence classes modulo 5.
Hint .
To what numbers is 0 congruent modulo 5? Is 1? 2? 3? 4? 5? 6? 7?... Have we covered everything?
Solution .
There are a total of five congruence classes modulo 5:
\(\displaystyle [0]_5 = \{ \dots, -5, 0, 5, 10, \dots \}\)
\(\displaystyle [1]_5 = \{ \dots, -4, 1, 6, 11, \dots \}\)
\(\displaystyle [2]_5 = \{ \dots, -3, 2, 7, 12, \dots \}\)
\(\displaystyle [3]_5 = \{ \dots, -2, 3, 8, 13, \dots \}\)
\(\displaystyle [4]_5 = \{ \dots, -1, 4, 9, 14, \dots \}\)
In general, there will always be \(m\) distinct congruence classes modulo \(m\text{.}\)
Proposition 3.1.15 .
Let
\(m\) be a positive integer. Then integers
\(a \and b\) are congruent modulo
\(m\) if and only if there exists and integer
\(k\) such that
\({a = b + km}\text{.}\)
Video / Answer .
Proposition 3.1.16 .
Let \(m\) be a positive integer. If \({ a \equiv b \pmod m}\) and \({c \equiv d \pmod m }\) then
\begin{equation*}
a + c \equiv b + d \pmod m \hspace{1em} \and \hspace{1em} ac \equiv bd \pmod m
\end{equation*}
Video / Answer .
We call the collection of the operations of addition and multiplication modulo
\(m\) modular arithmetic .
Exercises Exercises
1.
Show that if
\(a \equiv b\pmod{m}\text{,}\) then
\(b \equiv a \pmod{m}\)
Hint .
If
\(m \divides (b-a)\text{,}\) how can we write that
\(m \divides (a-b)\text{?}\)
2.
Show that if
\(a, b, \and c\) are integers with
\(a\not=0 \and c \not= 0\) such that
\(ac \divides bc\) then
\(a\divides b\text{.}\)
Solution .
Proof.
Assume that
\(a, b, c\) are integers with
\(a \ne 0\) and
\(c\ne 0\) such that
\(ac \divides bc\text{.}\) Then there exists an integer
\(m\) such
\(bc = acm\)
Since
\(c \ne 0\text{,}\) we can divide both sides of the equation by
\(c\text{,}\) yielding the equality
\(b = am\text{.}\) Thus
\(a \divides b\text{.}\)
3.
Use the division algorithm to write the following divisions as \(n = dq + r\) with the variables defined in the theorem:
17 is divided by 9
1234 is divided by 23
0 is divided by 13
8 is divided by 1
Solution .
\(\displaystyle 17 = 9\cdot 1 + 8 \)
\(\displaystyle 1234 = 23 \cdot 53 + 15\)
\(\displaystyle 0 = 13 \cdot 0 + 0\)
\(\displaystyle 8 = 1 \cdot 8 + 0\)
4.
Determine whether the following integers are congruent to 3 modulo 7:
37
66
-17
-67
80
Solution .
Since \(37 - 3 = 34\) is not divisible by 7, we conclude \(37 \not\equiv 3\pmod 7\)
Since \(66 - 3 = 63\) is divisible by 7, we conclude \(66 \equiv 3\pmod 7\)
Since \(-17 - 3 = -20\) is not divisible by 7, we conclude \(-17 \not \equiv 3\pmod 7\)
Since \(-67 - 3 = -70\) is divisible by 7, we conclude \(-67 \equiv 3\pmod 7\)
Since \(80 - 3 = 77\) is divisible by 7, we conclude \(80 \equiv 3\pmod 7\)
5.
List all integers between -100 and 100 that are congruent to -1 modulo 25
Solution .
These numbers are
\(-1, -26, -51, -76, 24, 49, 74, 99,\) all numbers that are of the form
\(-1 + 25 \cdot k\) for integers
\(k\text{.}\)
6.
Suppose that \(a \and b\) are integers, \(a \equiv 4 \pmod{13}\) and \(b \equiv 9\pmod{13}\text{.}\) Find the integer \(c\) with \(0 \le c \le 12\) such that:
\(\displaystyle c \equiv 9a \pmod{13} \)
\(\displaystyle c \equiv 11b \pmod{13} \)
\(\displaystyle c \equiv a+b \pmod{13} \)
\(\displaystyle c \equiv a^2 + b^2 \pmod{13} \)
\(\displaystyle c \equiv a^2 - b^2 \pmod{13} \)
7.
Find counterexamples to the following statements:
If \(ac \equiv bc \pmod m\) where \(a, b, c, m \in \Z\) with \(m \ge 2\text{,}\) then \(a \equiv b \pmod m\text{.}\)
If \(a \equiv b \pmod m\) and \(c \equiv d \pmod m\) where \(a, b, c, m \in \Z\) with \(m \ge 2\text{,}\) then \(a^c \equiv b^d \pmod m\text{.}\)
The first part of this exercise should convince you: you cannot βdivideβ both sides by
\(c\) in modular arithmetic!
Solution .
One possible counterexample is \(a = 2, b=4, c=4, and m=6\text{.}\) Certainly \(2\cdot 3 \equiv 4 \cdot 3 \pmod 6\) but \(2 \not \equiv 4 \pmod 6\text{.}\)
One possible counterexample here is \(a = 2, b=7, c=7, b=2, m=5\text{.}\) Then we can see \(2\equiv 7\pmod 5\) satisfies both parts of the hypothesis, but \(2^7 \equiv 3 \pmod 5\) while \(7^2 \equiv 4 \pmod 5\text{.}\)