• Aucun résultat trouvé

January28 ,2021 DIVISIBILITYIN ℤ ConceptsinAbstractMathematics

N/A
N/A
Protected

Academic year: 2022

Partager "January28 ,2021 DIVISIBILITYIN ℤ ConceptsinAbstractMathematics"

Copied!
31
0
0

Texte intégral

(1)

MAT246H1-S – LEC0201/9201

Concepts in Abstract Mathematics

DIVISIBILITY IN ℤ

January 28th, 2021

(2)

Divisibility – 1

Definition: divisibility

Given𝑎, 𝑏 ∈ ℤ, we write𝑏|𝑎if∃𝑘 ∈ ℤ, 𝑎 = 𝑏𝑘.

We say that”𝑎is divisible by𝑏”or”𝑏is divisor of𝑎”or”𝑎is a multiple of𝑏”.

Examples

• (−5)|10 • 5 ∤ (−11)

Remarks

• When𝑏 ≠ 0,𝑏|𝑎if and only if the remainder of the Euclidean division of𝑎by𝑏is0.

• Any integer is a divisor of0, i.e∀𝑏 ∈ ℤ, 𝑏|0. Indeed,0 = 𝑏 × 0.

• Any integer is divisible by1and itself, i.e. ∀𝑎 ∈ ℤ, 1|𝑎and𝑎|𝑎. Indeed,𝑎 = 1 × 𝑎 = 𝑎 × 1.

• The only integer divisible by0is0, i.e. ∀𝑎 ∈ ℤ, 0|𝑎 ⟹ 𝑎 = 0. Indeed, then𝑎 = 0 × 𝑘for some𝑘 ∈ ℤand hence𝑎 = 0.

(3)

Divisibility – 1

Definition: divisibility

Given𝑎, 𝑏 ∈ ℤ, we write𝑏|𝑎if∃𝑘 ∈ ℤ, 𝑎 = 𝑏𝑘.

We say that”𝑎is divisible by𝑏”or”𝑏is divisor of𝑎”or”𝑎is a multiple of𝑏”.

Examples

• (−5)|10 • 5 ∤ (−11)

Remarks

• When𝑏 ≠ 0,𝑏|𝑎if and only if the remainder of the Euclidean division of𝑎by𝑏is0.

• Any integer is a divisor of0, i.e∀𝑏 ∈ ℤ, 𝑏|0. Indeed,0 = 𝑏 × 0.

• Any integer is divisible by1and itself, i.e. ∀𝑎 ∈ ℤ, 1|𝑎and𝑎|𝑎. Indeed,𝑎 = 1 × 𝑎 = 𝑎 × 1.

• The only integer divisible by0is0, i.e. ∀𝑎 ∈ ℤ, 0|𝑎 ⟹ 𝑎 = 0. Indeed, then𝑎 = 0 × 𝑘for some𝑘 ∈ ℤand hence𝑎 = 0.

(4)

Divisibility – 1

Definition: divisibility

Given𝑎, 𝑏 ∈ ℤ, we write𝑏|𝑎if∃𝑘 ∈ ℤ, 𝑎 = 𝑏𝑘.

We say that”𝑎is divisible by𝑏”or”𝑏is divisor of𝑎”or”𝑎is a multiple of𝑏”.

Examples

• (−5)|10 • 5 ∤ (−11)

Remarks

• When𝑏 ≠ 0,𝑏|𝑎if and only if the remainder of the Euclidean division of𝑎by𝑏is0.

• Any integer is a divisor of0, i.e∀𝑏 ∈ ℤ, 𝑏|0.

Indeed,0 = 𝑏 × 0.

• Any integer is divisible by1and itself, i.e. ∀𝑎 ∈ ℤ, 1|𝑎and𝑎|𝑎.

Indeed,𝑎 = 1 × 𝑎 = 𝑎 × 1.

• The only integer divisible by0is0, i.e. ∀𝑎 ∈ ℤ, 0|𝑎 ⟹ 𝑎 = 0.

Indeed, then𝑎 = 0 × 𝑘for some𝑘 ∈ ℤand hence𝑎 = 0.

(5)

Divisibility – 2

Proposition

1 ∀𝑎, 𝑏 ∈ ℤ, (𝑎|𝑏and𝑏|𝑎) ⟹ |𝑎| = |𝑏|

2 ∀𝑎, 𝑏, 𝑐 ∈ ℤ, (𝑎|𝑏and𝑏|𝑐) ⟹ 𝑎|𝑐

3 ∀𝑎, 𝑏, 𝑐, 𝑑 ∈ ℤ, (𝑎|𝑏and𝑐|𝑑) ⟹ 𝑎𝑐|𝑏𝑑

4 ∀𝑎, 𝑏, 𝑐, 𝜆, 𝜇 ∈ ℤ, (𝑎|𝑏and𝑎|𝑐) ⟹ 𝑎|(𝜆𝑏 + 𝜇𝑐)

5 ∀𝑎 ∈ ℤ, 𝑎|1 ⟹ |𝑎| = 1

(6)

Divisibility – 3

Proof.

1 ∀𝑎, 𝑏 ∈ ℤ, (𝑎|𝑏and𝑏|𝑎) ⟹ |𝑎| = |𝑏|

Let𝑎, 𝑏 ∈ ℤsatisfying𝑎|𝑏and𝑏|𝑎. If𝑎 = 0then𝑏 = 0(from0|𝑏). So we may assume that𝑎 ≠ 0. There exist𝑘, 𝑙 ∈ ℤsuch that𝑏 = 𝑎𝑘and𝑎 = 𝑏𝑙. Then𝑎 = 𝑏𝑙 = 𝑎𝑘𝑙, thus1 = 𝑘𝑙since𝑎 ≠ 0. Therefore,1 = |1| = |𝑘𝑙| = |𝑘| × |𝑙|. Since|𝑘|, |𝑙| ∈ ℕ, we get that|𝑘| = |𝑙| = 1.

Finally,|𝑎| = |𝑏𝑙| = |𝑏| × |𝑙| = |𝑏| × 1 = |𝑏|.

2 ∀𝑎, 𝑏, 𝑐 ∈ ℤ, (𝑎|𝑏and𝑏|𝑐) ⟹ 𝑎|𝑐

Let𝑎, 𝑏, 𝑐 ∈ ℤsatisfying𝑎|𝑏and𝑏|𝑐. Then𝑏 = 𝑎𝑘and𝑐 = 𝑏𝑙for some𝑘, 𝑙 ∈ ℤ. Therefore𝑐 = 𝑏𝑙 = 𝑎𝑘𝑙, so𝑎|𝑐.

3 ∀𝑎, 𝑏, 𝑐, 𝑑 ∈ ℤ, (𝑎|𝑏and𝑐|𝑑) ⟹ 𝑎𝑐|𝑏𝑑

Let𝑎, 𝑏, 𝑐, 𝑑 ∈ ℤsatisfying𝑎|𝑏and𝑐|𝑑. Then𝑏 = 𝑎𝑘and𝑑 = 𝑐𝑙for some𝑘, 𝑙 ∈ ℤ. Therefore𝑏𝑑 = 𝑎𝑐𝑘𝑙, so𝑎𝑐|𝑏𝑑.

4 ∀𝑎, 𝑏, 𝑐, 𝜆, 𝜇 ∈ ℤ, (𝑎|𝑏and𝑎|𝑐) ⟹ 𝑎|(𝜆𝑏 + 𝜇𝑐)

Let𝑎, 𝑏, 𝑐 ∈ ℤsatisfying𝑎|𝑏and𝑎|𝑐. Then𝑏 = 𝑘𝑎and𝑐 = 𝑙𝑎for some𝑘, 𝑙 ∈ ℤ. Hence𝜆𝑏 + 𝜇𝑐 = 𝜆𝑘𝑎 + 𝜇𝑙𝑎 = (𝜆𝑘 + 𝜇𝑙)𝑎. Thus𝑎|(𝜆𝑏 + 𝜇𝑐).

5 ∀𝑎 ∈ ℤ, 𝑎|1 ⟹ |𝑎| = 1

Let𝑎 ∈ ℤ. Assume that𝑎|1. Then𝑎|1and1|𝑎. So by the first item,|𝑎| = 1. ■

(7)

Divisibility – 3

Proof.

1 ∀𝑎, 𝑏 ∈ ℤ, (𝑎|𝑏and𝑏|𝑎) ⟹ |𝑎| = |𝑏|

Let𝑎, 𝑏 ∈ ℤsatisfying𝑎|𝑏and𝑏|𝑎. If𝑎 = 0then𝑏 = 0(from0|𝑏). So we may assume that𝑎 ≠ 0.

There exist𝑘, 𝑙 ∈ ℤsuch that𝑏 = 𝑎𝑘and𝑎 = 𝑏𝑙. Then𝑎 = 𝑏𝑙 = 𝑎𝑘𝑙, thus1 = 𝑘𝑙since𝑎 ≠ 0.

Therefore,1 = |1| = |𝑘𝑙| = |𝑘| × |𝑙|. Since|𝑘|, |𝑙| ∈ ℕ, we get that|𝑘| = |𝑙| = 1.

Finally,|𝑎| = |𝑏𝑙| = |𝑏| × |𝑙| = |𝑏| × 1 = |𝑏|.

2 ∀𝑎, 𝑏, 𝑐 ∈ ℤ, (𝑎|𝑏and𝑏|𝑐) ⟹ 𝑎|𝑐

Let𝑎, 𝑏, 𝑐 ∈ ℤsatisfying𝑎|𝑏and𝑏|𝑐. Then𝑏 = 𝑎𝑘and𝑐 = 𝑏𝑙for some𝑘, 𝑙 ∈ ℤ.

Therefore𝑐 = 𝑏𝑙 = 𝑎𝑘𝑙, so𝑎|𝑐.

3 ∀𝑎, 𝑏, 𝑐, 𝑑 ∈ ℤ, (𝑎|𝑏and𝑐|𝑑) ⟹ 𝑎𝑐|𝑏𝑑

Let𝑎, 𝑏, 𝑐, 𝑑 ∈ ℤsatisfying𝑎|𝑏and𝑐|𝑑. Then𝑏 = 𝑎𝑘and𝑑 = 𝑐𝑙for some𝑘, 𝑙 ∈ ℤ.

Therefore𝑏𝑑 = 𝑎𝑐𝑘𝑙, so𝑎𝑐|𝑏𝑑.

4 ∀𝑎, 𝑏, 𝑐, 𝜆, 𝜇 ∈ ℤ, (𝑎|𝑏and𝑎|𝑐) ⟹ 𝑎|(𝜆𝑏 + 𝜇𝑐)

Let𝑎, 𝑏, 𝑐 ∈ ℤsatisfying𝑎|𝑏and𝑎|𝑐. Then𝑏 = 𝑘𝑎and𝑐 = 𝑙𝑎for some𝑘, 𝑙 ∈ ℤ.

Hence𝜆𝑏 + 𝜇𝑐 = 𝜆𝑘𝑎 + 𝜇𝑙𝑎 = (𝜆𝑘 + 𝜇𝑙)𝑎. Thus𝑎|(𝜆𝑏 + 𝜇𝑐).

5 ∀𝑎 ∈ ℤ, 𝑎|1 ⟹ |𝑎| = 1

Let𝑎 ∈ ℤ. Assume that𝑎|1. Then𝑎|1and1|𝑎. So by the first item,|𝑎| = 1. ■

(8)

Greatest common divisor – 1

Theorem

Given𝑎, 𝑏 ∈ ℤnot both zero, the set common divisors of𝑎and𝑏admits a greatest element denotedgcd(𝑎, 𝑏)and called thegreatest common divisor of𝑎and𝑏.

Proof.Let𝑎, 𝑏 ∈ ℤnot both zero. We set𝑆 = {𝑑 ∈ ℤ ∶ 𝑑|𝑎and𝑑|𝑏}.

• 𝑆is non-empty since it contains1.

• Without loss of generality, let assume that𝑎 ≠ 0.

Let𝑑 ∈ 𝑆then𝑎 = 𝑑𝑘for some𝑘 ∈ ℤ. Note that𝑘 ≠ 0(otherwise𝑎 = 𝑑𝑘 = 0), hence1 ≤ |𝑘|. Thus𝑑 ≤ |𝑑| ≤ |𝑑| × |𝑘| = |𝑑𝑘| = |𝑎|.

Hence𝑆is bounded from above by|𝑎|.

Therefore,𝑆admits a greatest element (as an non-empty subset ofℤbounded from above). ■

Remark

Note thatgcd(𝑎, 𝑏) ≥ 1since1is a common divisor of𝑎and𝑏(particularlygcd(𝑎, 𝑏) ∈ ℕ).

(9)

Greatest common divisor – 1

Theorem

Given𝑎, 𝑏 ∈ ℤnot both zero, the set common divisors of𝑎and𝑏admits a greatest element denotedgcd(𝑎, 𝑏)and called thegreatest common divisor of𝑎and𝑏.

Proof.Let𝑎, 𝑏 ∈ ℤnot both zero. We set𝑆 = {𝑑 ∈ ℤ ∶ 𝑑|𝑎and𝑑|𝑏}.

• 𝑆is non-empty since it contains1.

• Without loss of generality, let assume that𝑎 ≠ 0.

Let𝑑 ∈ 𝑆then𝑎 = 𝑑𝑘for some𝑘 ∈ ℤ. Note that𝑘 ≠ 0(otherwise𝑎 = 𝑑𝑘 = 0), hence1 ≤ |𝑘|.

Thus𝑑 ≤ |𝑑| ≤ |𝑑| × |𝑘| = |𝑑𝑘| = |𝑎|.

Hence𝑆is bounded from above by|𝑎|.

Therefore,𝑆admits a greatest element (as an non-empty subset ofℤbounded from above). ■

Remark

Note thatgcd(𝑎, 𝑏) ≥ 1since1is a common divisor of𝑎and𝑏(particularlygcd(𝑎, 𝑏) ∈ ℕ).

(10)

Greatest common divisor – 1

Theorem

Given𝑎, 𝑏 ∈ ℤnot both zero, the set common divisors of𝑎and𝑏admits a greatest element denotedgcd(𝑎, 𝑏)and called thegreatest common divisor of𝑎and𝑏.

Proof.Let𝑎, 𝑏 ∈ ℤnot both zero. We set𝑆 = {𝑑 ∈ ℤ ∶ 𝑑|𝑎and𝑑|𝑏}.

• 𝑆is non-empty since it contains1.

• Without loss of generality, let assume that𝑎 ≠ 0.

Let𝑑 ∈ 𝑆then𝑎 = 𝑑𝑘for some𝑘 ∈ ℤ. Note that𝑘 ≠ 0(otherwise𝑎 = 𝑑𝑘 = 0), hence1 ≤ |𝑘|.

Thus𝑑 ≤ |𝑑| ≤ |𝑑| × |𝑘| = |𝑑𝑘| = |𝑎|.

Hence𝑆is bounded from above by|𝑎|.

Therefore,𝑆admits a greatest element (as an non-empty subset ofℤbounded from above). ■

Remark

Note thatgcd(𝑎, 𝑏) ≥ 1since1is a common divisor of𝑎and𝑏(particularlygcd(𝑎, 𝑏) ∈ ℕ).

(11)

Greatest common divisor – 2

Given𝑎, 𝑏 ∈ ℤnot both zero and𝑑 ∈ ℕ ⧵ {0}, how do we prove that𝑑 =gcd(𝑎, 𝑏)?

Quite often the strategy is the following:

1 Prove:𝑑|𝑎.

2 Prove:𝑑|𝑏.

3 Prove:∀𝛿 ∈ ℕ, (𝛿|𝑎and𝛿|𝑏) ⟹ 𝛿|𝑑.

Indeed, then𝑑is a common divisor of𝑎and𝑏by the first two steps.

And it is the greatest one by the last step, as we show below.

Let𝛿 ∈ ℤbe a common divisor of𝑎and𝑏.

• If𝛿 ≤ 0then𝛿 ≤ 𝑑.

• If𝛿 > 0then𝑑 = 𝛿𝑘for some𝑘 ∈ ℤ.

Note that𝑘 ≥ 1since𝑑, 𝛿 > 0.

Thus𝛿 ≤ 𝛿𝑘 = 𝑑

(12)

Bézout’s identity – 1

Theorem: Bézout’s identity

Given𝑎, 𝑏 ∈ ℤnot both zero, there exist𝑢, 𝑣 ∈ ℤsuch that𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

Example

gcd(15, 25) = 5 = 15 × 2 + 25 × (−1)

Remarks

• The couple(𝑢, 𝑣)is not unique:

5 = 15 × 27 + 25 × (−16)

= 15 × 2 + 25 × (−1)

• The converse is false:2 = 3 × 4 + 5 × (−2)butgcd(3, 5) = 1 ≠ 2.

Nonetheless, we will see later that there is a partial converse whengcd(𝑎, 𝑏) = 1.

(13)

Bézout’s identity – 1

Theorem: Bézout’s identity

Given𝑎, 𝑏 ∈ ℤnot both zero, there exist𝑢, 𝑣 ∈ ℤsuch that𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

Example

gcd(15, 25) = 5 = 15 × 2 + 25 × (−1)

Remarks

• The couple(𝑢, 𝑣)is not unique:

5 = 15 × 27 + 25 × (−16)

= 15 × 2 + 25 × (−1)

• The converse is false:2 = 3 × 4 + 5 × (−2)butgcd(3, 5) = 1 ≠ 2.

Nonetheless, we will see later that there is a partial converse whengcd(𝑎, 𝑏) = 1.

(14)

Bézout’s identity – 1

Theorem: Bézout’s identity

Given𝑎, 𝑏 ∈ ℤnot both zero, there exist𝑢, 𝑣 ∈ ℤsuch that𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

Example

gcd(15, 25) = 5 = 15 × 2 + 25 × (−1)

Remarks

• The couple(𝑢, 𝑣)is not unique:

5 = 15 × 27 + 25 × (−16)

= 15 × 2 + 25 × (−1)

• The converse is false:2 = 3 × 4 + 5 × (−2)butgcd(3, 5) = 1 ≠ 2.

Nonetheless, we will see later that there is a partial converse whengcd(𝑎, 𝑏) = 1.

(15)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero. Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑. Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division: ∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑. Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆. Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣). Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(16)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero. Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑. Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division:∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑. Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆. Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣). Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(17)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero.

Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑.

Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division:∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑. Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆. Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣). Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(18)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero.

Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑.

Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division:∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑. Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆. Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣). Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(19)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero.

Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑.

Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division:∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑.

Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆.

Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣). Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(20)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero.

Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑.

Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division:∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑.

Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆.

Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣). Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(21)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero.

Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑.

Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division:∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑.

Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆.

Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣).

Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(22)

Bézout’s identity – 2

Proof of Bézout’s identity.Let𝑎, 𝑏 ∈ ℤnot both zero. We want to show∃𝑢, 𝑣 ∈ ℤ, 𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

• Set𝑆 = {𝑛 ∈ ℕ ⧵ {0} ∶ ∃𝑢, 𝑣 ∈ ℤ, 𝑛 = 𝑎𝑢 + 𝑏𝑣}.

• Note that|𝑎| + |𝑏| > 0since at least one is non-zero.

Then|𝑎| + |𝑏| = 𝑎 × (±1) + 𝑏 × (±1) ∈ 𝑆. So𝑆 ≠ ∅.

Thus, by the well-ordering principle,𝑆admits a least element𝑑.

Since𝑑 ∈ 𝑆,𝑑 = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

• Let’s prove that𝑑 =gcd(𝑎, 𝑏).

• Euclidean division:∃𝑞, 𝑟 ∈ ℤsuch that𝑎 = 𝑑𝑞 + 𝑟and0 ≤ 𝑟 < |𝑑| = 𝑑.

Assume by contradiction that𝑟 ≠ 0.

Then𝑟 = 𝑎 − 𝑞𝑑 = 𝑎 − 𝑞(𝑎𝑢 + 𝑏𝑣) = 𝑎 × (1 − 𝑞𝑢) + 𝑏 × (−𝑞𝑣)is in𝑆.

Contradiction with𝑑being the least element of𝑆.

Hence𝑟 = 0and𝑎 = 𝑑𝑞, i.e.𝑑|𝑎.

• Similarly𝑑|𝑏.

• Let𝛿 ∈ ℕbe another common divisor of𝑎and𝑏.

Then there∃𝑘, 𝑙 ∈ ℤ, 𝑎 = 𝛿𝑘, 𝑏 = 𝛿𝑙. Hence𝑑 = 𝑎𝑢 + 𝑏𝑣 = 𝛿(𝑘𝑢 + 𝑙𝑣).

Therefore𝛿|𝑑.

• According to Slide 6, we proved that𝑑is the greatest common divisor of𝑎and𝑏. ■

(23)

Properties of the gcd – 1

Proposition

∀𝑎 ∈ ℤ ⧵ {0}, gcd(𝑎, 0) = |𝑎|

Proof.

By definition,gcd(𝑎, 0)is the greatest divisor of𝑎.

Since𝑎 = |𝑎| × (±1), we know that|𝑎|is a divisor of𝑎. We have to check that it is the greatest one. Let𝑑be a non-negative divisor of𝑎, then𝑎 = 𝑑𝑘for some𝑘 ∈ ℤ.

Since𝑎 ≠ 0, we know that𝑘 ≠ 0.

Hence1 ≤ |𝑘|from which we get that𝑑 ≤ 𝑑|𝑘| = |𝑑| × |𝑘| = |𝑑𝑘| = |𝑎|. ■

(24)

Properties of the gcd – 1

Proposition

∀𝑎 ∈ ℤ ⧵ {0}, gcd(𝑎, 0) = |𝑎|

Proof.

By definition,gcd(𝑎, 0)is the greatest divisor of𝑎.

Since𝑎 = |𝑎| × (±1), we know that|𝑎|is a divisor of𝑎. We have to check that it is the greatest one.

Let𝑑be a non-negative divisor of𝑎, then𝑎 = 𝑑𝑘for some𝑘 ∈ ℤ.

Since𝑎 ≠ 0, we know that𝑘 ≠ 0.

Hence1 ≤ |𝑘|from which we get that𝑑 ≤ 𝑑|𝑘| = |𝑑| × |𝑘| = |𝑑𝑘| = |𝑎|. ■

(25)

Properties of the gcd – 2

Proposition

Let𝑎, 𝑏 ∈ ℤnot both zero, then

1 gcd(𝑎, 𝑏) =gcd(𝑏, 𝑎)

2 gcd(𝑎, 𝑏) =gcd(𝑎, −𝑏) =gcd(−𝑎, 𝑏) =gcd(−𝑎, −𝑏)

3 ∀𝛿 ∈ ℤ, (𝛿|𝑎and𝛿|𝑏) ⟹ 𝛿|gcd(𝑎, 𝑏)

4 ∀𝜆 ∈ ℤ ⧵ {0},gcd(𝜆𝑎, 𝜆𝑏) = |𝜆|gcd(𝑎, 𝑏)

5 ∀𝑘 ∈ ℤ,gcd(𝑎 + 𝑘𝑏, 𝑏) =gcd(𝑎, 𝑏)

Proof.

3 Let𝑎, 𝑏 ∈ ℤ. Let𝛿 ∈ ℤ. Assume that𝛿|𝑎and𝛿|𝑏. By Bézout’s theorem,gcd(𝑎, 𝑏) = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ. Since𝛿|𝑎and𝛿|𝑏, we have that𝛿|𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

4 Let𝑎, 𝑏 ∈ ℤlet𝜆 ∈ ℤ ⧵ {0}. Since|𝜆|divides𝜆𝑎and𝜆𝑏, then it dividesgcd(𝜆𝑎, 𝜆𝑏)by the third item. Hencegcd(𝜆𝑎, 𝜆𝑏) = |𝜆| × 𝑑for some𝑑 ∈ ℤ. Let’s prove that𝑑 =gcd(𝑎, 𝑏).

Let𝑛 ∈ ℤ, then𝑛|𝑎, 𝑏 ⇔ |𝜆|𝑛|𝜆𝑎, 𝜆𝑏 ⇔ |𝜆|𝑛|gcd(𝜆𝑎, 𝜆𝑏) ⇔ 𝑛|𝑑.

5 Let𝑎, 𝑏, 𝑘 ∈ ℤ.gcd(𝑎, 𝑏)|𝑎, 𝑏hencegcd(𝑎, 𝑏)|𝑎 + 𝑘𝑏. Thusgcd(𝑎, 𝑏)|gcd(𝑎 + 𝑘𝑏, 𝑏).

Similarly,gcd(𝑎 + 𝑘𝑏, 𝑏)|𝑎 + 𝑘𝑏, 𝑏hencegcd(𝑎 + 𝑘𝑏, 𝑏)|𝑎 + 𝑘𝑏 − 𝑘𝑏 = 𝑎. Thusgcd(𝑎 + 𝑘𝑏, 𝑏)|gcd(𝑎, 𝑏).

Hence|gcd(𝑎 + 𝑘𝑏, 𝑏)| = |gcd(𝑎, 𝑏)|. Since they are both non-negative, we getgcd(𝑎 + 𝑘𝑏, 𝑏) =gcd(𝑎, 𝑏).

(26)

Properties of the gcd – 2

Proposition

Let𝑎, 𝑏 ∈ ℤnot both zero, then

1 gcd(𝑎, 𝑏) =gcd(𝑏, 𝑎)

2 gcd(𝑎, 𝑏) =gcd(𝑎, −𝑏) =gcd(−𝑎, 𝑏) =gcd(−𝑎, −𝑏)

3 ∀𝛿 ∈ ℤ, (𝛿|𝑎and𝛿|𝑏) ⟹ 𝛿|gcd(𝑎, 𝑏)

4 ∀𝜆 ∈ ℤ ⧵ {0},gcd(𝜆𝑎, 𝜆𝑏) = |𝜆|gcd(𝑎, 𝑏)

5 ∀𝑘 ∈ ℤ,gcd(𝑎 + 𝑘𝑏, 𝑏) =gcd(𝑎, 𝑏)

Proof.

3 Let𝑎, 𝑏 ∈ ℤ. Let𝛿 ∈ ℤ. Assume that𝛿|𝑎and𝛿|𝑏.

By Bézout’s theorem,gcd(𝑎, 𝑏) = 𝑎𝑢 + 𝑏𝑣for some𝑢, 𝑣 ∈ ℤ.

Since𝛿|𝑎and𝛿|𝑏, we have that𝛿|𝑎𝑢 + 𝑏𝑣 =gcd(𝑎, 𝑏).

4 Let𝑎, 𝑏 ∈ ℤlet𝜆 ∈ ℤ ⧵ {0}. Since|𝜆|divides𝜆𝑎and𝜆𝑏, then it dividesgcd(𝜆𝑎, 𝜆𝑏)by the third item.

Hencegcd(𝜆𝑎, 𝜆𝑏) = |𝜆| × 𝑑for some𝑑 ∈ ℤ. Let’s prove that𝑑 =gcd(𝑎, 𝑏).

Let𝑛 ∈ ℤ, then𝑛|𝑎, 𝑏 ⇔ |𝜆|𝑛|𝜆𝑎, 𝜆𝑏 ⇔ |𝜆|𝑛|gcd(𝜆𝑎, 𝜆𝑏) ⇔ 𝑛|𝑑.

5 Let𝑎, 𝑏, 𝑘 ∈ ℤ.gcd(𝑎, 𝑏)|𝑎, 𝑏hencegcd(𝑎, 𝑏)|𝑎 + 𝑘𝑏. Thusgcd(𝑎, 𝑏)|gcd(𝑎 + 𝑘𝑏, 𝑏).

Similarly,gcd(𝑎 + 𝑘𝑏, 𝑏)|𝑎 + 𝑘𝑏, 𝑏hencegcd(𝑎 + 𝑘𝑏, 𝑏)|𝑎 + 𝑘𝑏 − 𝑘𝑏 = 𝑎. Thusgcd(𝑎 + 𝑘𝑏, 𝑏)|gcd(𝑎, 𝑏).

Hence|gcd(𝑎 + 𝑘𝑏, 𝑏)| = |gcd(𝑎, 𝑏)|. Since they are both non-negative, we getgcd(𝑎 + 𝑘𝑏, 𝑏) =gcd(𝑎, 𝑏).

(27)

How to compute the gcd? Euclid’s algorithm! – 1

Result: gcd(𝑎, 𝑏)where𝑎, 𝑏 ∈ ℤnot both zero.

𝑎 ← |𝑎|

𝑏 ← |𝑏|

while𝑏 ≠ 0do

𝑟 ← 𝑎%𝑏(the remainder of the Euclidean division𝑎 = 𝑏𝑞 + 𝑟with0 ≤ 𝑟 < 𝑏) 𝑎 ← 𝑏

𝑏 ← 𝑟 end return𝑎

Why does it work?

1 Initialization: gcd(|𝑎|, |𝑏|) =gcd(𝑎, 𝑏)so we reduce to the case𝑎, 𝑏 ≥ 0.

2 Inductive step: gcd(𝑎, 𝑏) =gcd(𝑏𝑞 + 𝑟, 𝑏) =gcd(𝑟, 𝑏) =gcd(𝑏, 𝑟). At the end of the loop,𝑎 > 0and𝑏 ≥ 0is decreasing since0 ≤ 𝑏 < 𝑟. So𝑏 = 0after finitely many steps.

3 Termination: thengcd(𝑎, 𝑏) =gcd(𝑎, 0) = 𝑎since𝑎 > 0. See the lecture notes for a version without pseudo-code.

(28)

How to compute the gcd? Euclid’s algorithm! – 1

Result: gcd(𝑎, 𝑏)where𝑎, 𝑏 ∈ ℤnot both zero.

𝑎 ← |𝑎|

𝑏 ← |𝑏|

while𝑏 ≠ 0do

𝑟 ← 𝑎%𝑏(the remainder of the Euclidean division𝑎 = 𝑏𝑞 + 𝑟with0 ≤ 𝑟 < 𝑏) 𝑎 ← 𝑏

𝑏 ← 𝑟 end return𝑎

Why does it work?

1 Initialization: gcd(|𝑎|, |𝑏|) =gcd(𝑎, 𝑏)so we reduce to the case𝑎, 𝑏 ≥ 0.

2 Inductive step: gcd(𝑎, 𝑏) =gcd(𝑏𝑞 + 𝑟, 𝑏) =gcd(𝑟, 𝑏) =gcd(𝑏, 𝑟).

At the end of the loop,𝑎 > 0and𝑏 ≥ 0is decreasing since0 ≤ 𝑏 < 𝑟.

So𝑏 = 0after finitely many steps.

3 Termination: thengcd(𝑎, 𝑏) =gcd(𝑎, 0) = 𝑎since𝑎 > 0.

See the lecture notes for a version without pseudo-code.

(29)

How to compute the gcd? Euclid’s algorithm! – 1

Result: gcd(𝑎, 𝑏)where𝑎, 𝑏 ∈ ℤnot both zero.

𝑎 ← |𝑎|

𝑏 ← |𝑏|

while𝑏 ≠ 0do

𝑟 ← 𝑎%𝑏(the remainder of the Euclidean division𝑎 = 𝑏𝑞 + 𝑟with0 ≤ 𝑟 < 𝑏) 𝑎 ← 𝑏

𝑏 ← 𝑟 end return𝑎

Why does it work?

1 Initialization: gcd(|𝑎|, |𝑏|) =gcd(𝑎, 𝑏)so we reduce to the case𝑎, 𝑏 ≥ 0.

2 Inductive step: gcd(𝑎, 𝑏) =gcd(𝑏𝑞 + 𝑟, 𝑏) =gcd(𝑟, 𝑏) =gcd(𝑏, 𝑟).

At the end of the loop,𝑎 > 0and𝑏 ≥ 0is decreasing since0 ≤ 𝑏 < 𝑟.

So𝑏 = 0after finitely many steps.

3 Termination: thengcd(𝑎, 𝑏) =gcd(𝑎, 0) = 𝑎since𝑎 > 0.

See the lecture notes for a version without pseudo-code.

(30)

How to compute the gcd? Euclid’s algorithm! – 2

We want to computegcd(600, −136):

𝑎0= 600, 𝑏0= 136 600 = 136 × 4 + 56 𝑎1= 136, 𝑏1= 56 136 = 56 × 2 + 24 𝑎2= 56, 𝑏2= 24 56 = 24 × 2 + 8 𝑎3= 24, 𝑏3= 8

24 = 8 × 3 + 0 𝑎4= 8, 𝑏4= 0

Hencegcd(600, −136) = 8.

Remark

Then it is possible to obtain a suitable Bézout’s identity going backward.

8 = 56 + 24 × (−2) since8 = 56 − 24 × 2

= 56 + (136 + 56 × (−2)) × (−2) since24 = 136 − 56 × 2

= 136 × (−2) + 56 × 5

= 136 × (−2) + (600 + 136 × (−4)) × 5 since56 = 600 − 136 × 4 8 = 600 × 5 + (−136) × 22

(31)

How to compute the gcd? Euclid’s algorithm! – 2

We want to computegcd(600, −136):

𝑎0= 600, 𝑏0= 136 600 = 136 × 4 + 56 𝑎1= 136, 𝑏1= 56 136 = 56 × 2 + 24 𝑎2= 56, 𝑏2= 24 56 = 24 × 2 + 8 𝑎3= 24, 𝑏3= 8

24 = 8 × 3 + 0 𝑎4= 8, 𝑏4= 0

Hencegcd(600, −136) = 8.

Remark

Then it is possible to obtain a suitable Bézout’s identity going backward.

8 = 56 + 24 × (−2) since8 = 56 − 24 × 2

= 56 + (136 + 56 × (−2)) × (−2) since24 = 136 − 56 × 2

= 136 × (−2) + 56 × 5

= 136 × (−2) + (600 + 136 × (−4)) × 5 since56 = 600 − 136 × 4 8 = 600 × 5 + (−136) × 22

Références

Documents relatifs

Prime numbers play a crucial role in number theory: they are the integers greater than 1 which can’t be factorized further while any other positive integer admits a unique expression

[r]

[r]

Note that both versions of Fermat’s little theorem

WILSON’S THEOREM &amp; THE CHINESE

[r]

How can someone send a secret message in a way that only the recipient could read the content even if the message happens to have been intercepted by a third party..

We usually generate prime numbers as follows (it is a little bit tricky):. 1 Generate a random odd