0% found this document useful (0 votes)
402 views60 pages

Number Theory: Discrete Mathematics

The document discusses divisibility and number theory. It defines divisibility as an integer a dividing another integer b if b can be written as a product of a and another integer. It provides examples and properties of divisibility, including that divisibility is transitive. It also describes algorithms and automata that can be used to check divisibility by various numbers like 3, 4, 5, etc. based on patterns in the digits of the number being checked. The document focuses on explaining the concept of divisibility and methods for determining it programmatically or algorithmically.

Uploaded by

albert moldon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
402 views60 pages

Number Theory: Discrete Mathematics

The document discusses divisibility and number theory. It defines divisibility as an integer a dividing another integer b if b can be written as a product of a and another integer. It provides examples and properties of divisibility, including that divisibility is transitive. It also describes algorithms and automata that can be used to check divisibility by various numbers like 3, 4, 5, etc. based on patterns in the digits of the number being checked. The document focuses on explaining the concept of divisibility and methods for determining it programmatically or algorithmically.

Uploaded by

albert moldon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

NUMBER

THEORY
DISCRETE MATHEMATICS
Number theory is a branch of pure
mathematics devoted primarily to the study
of the integers and integer-valued functions.
German mathematician Carl Friedrich Gauss
said, "Mathematics is the queen of the
sciences—and number theory is the queen of
mathematics."
DIVISIBILIT
Y
NUMBERT THEORY
The concept of addition, subtraction and
multiplication are basic but lead to more
complicated concepts, like Divisibility.
Divisibility is an statement about two integers
a and b
Informally, an integer a divides b if a goes
“exactly” into b
Geometric idea of Divisibility
(only for positive integers)
Represent numbers by rectangle, like so

1
2
Example 3 divides 12
or 12 divisible by 3
3 3 3 3

12
Example 5 divides 15
or 15 divisible by 5
5 5 5
5 goes into
15 three 15
times
Definition (Divisibility)
Let a ≠ 0 and b be integers.
We say that a divides b, denoted by a | b, if
and only if
There is an integer k such that
b = ka
Notation
Example:
a b b k a
1. It is true that 4 | 20, because 20 = 54
a b b k a
2. It is true that -3 | 21, because 21 = (-7) 
(-3).
3. It is FALSE that 5 | 12 , because there is
NO integer k such that 12 = k 5.
Notation: If it is false that a | b, we write a | b
Example:
It is true that 2 | 3 because there is no integer
k such that 3 = k  2.

You can set k = 3/2, but 3/2 is not an integer.


Never confuse a | b with b/a.
a | b is a statement ( could be True or False

b/a is a number (rational)


Basic
Properties of
DIVISIBILIT
Y
NUMBERT THEORY
Theorem: let a, b, c, x and y be integers.
The following statements are true.

1) If a | b and b | c, then a | c.
2) If a | b and b | c, then a (xb + yc).

3) If k Z is not zero, then a | b if and only if


ka | kb
1) If a | b and b | c, then a | Transitivity
c.Example.
a b b c
We know that 4 | 12 and 12 | 36
a c
Conclusion: 4 | 36
2) If a | band a | c, then a | (xb + yc).
Linear Combination
Example.
We know that 3 | 6 and 3 | 9 by the Theorem,
we get that

3 | (6x + 9y), for all x, y is an integer.


we can choose any x, y as an integer in the
statement
3 | (6x + 9y)
to make it true
For instance, we can take x = -12 and y = 13

To obtain that 3 | 45
Lets prove the statement
2) If a | band a | c, then a | (xb + yc).
Proof: We assume that a | b and a | c. Then
means
b = ka for some k is integer (1)
c = ta for some t is integer (2)
Goal: a | (xb + yc) or
(xb + yc) = (some integer) a

Multiply (1) by x and (2)


xb = by
xkay (3)
yc = yta (4)
We add (3) and (4) to obtain

xb + yc = xka + yta
= (xk + yt) a
We can say that

a | b if b/a = k, for some integer k.

That is, a | b if b/a is an integer.


Is this a problem easily solved by a calculator?
Let’s do an experiment
Determine whether 3 | b, where b is
20000000000000000000000000000000000
00000000000000000000000000000000000
00000001000000000000000000000000000
0000000000000000000
It is FASTER to answer this question using
properties of divisibility.
200000000000000000000000000000000000000000000000
000000000000000000000000000001000000000000000000
0000000000000000000000000000

Theorem: Criterion of Divisibillity by 3)


Let b be an integer.
3 | b and only if the sum of the digits of b is
divisible by 3
2 + 1 = 3 Divisible by
Example: 3Consider the number
b = 9567891354901259
We add the digits of b.
9+5+6+7+8+9+1+3+5+4+9+0+1+2+5+9 = 83
We can apply the theorem again to check the
divisibility of 3.
8+3=11, 11 is not divisible
We can improve the theorem in the following
way:
Let b be an integer.
3 | b if and only if the sum of the digits of b
different fro m 0, 3, 6, 9 is divisible by 3.
Theorem: (Criterion of Divisibility by 2)

Let b be an integer.

2 | b if and onlyf if the last digit of b is 0, 2, 4,


6, or 8
Determine whether 2 | b, where b is

6743132157654121246513252064632146436
6446546431564654356546464788899878

Divisible by
2
DIVISIBILIT
Y for 4, 5, 6, 7
and 8
NUMBERT THEORY
Theorem: (criterion of Divisibility by 4)

Let b be an integer
4 | b if an only if the number formed by last
two digits of b is divisible by 4.

Naturals of two digits divisible by 4:


12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56
Theorem: (criterion of Divisibility by 4)

Let b be an integer
4 | b if an only if the number formed by last
two digits of b is divisible by 4.

Naturals of two digits divisible by 4:


12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56
Example: Check whether 4 | b, where

65719346652124321316576125756

We look at the last two digits: 56


56 is divisible by 4 because 56/4 =
14
Theorem: (Criterion of Divisibility by 5)

Let b be an integer.
5 | b if and only if the last digits of b is 0 or 5.
Example: Check whether 5 | b, where
b = 2971356431246313165410

The last digit of b is 0


Theorem: (Criterion of Divisibility by 6)

Let b be an integer.
6 | b if and only if 2 | b and 3 | b.

b is divisible by both 2 and


3.
Example: Check whether 6 | b, where

b = 28844548423436046
We first check 2 | b. We only need to check the
last digit. The last digit is 6.
We now check that 3 | b. We add the digits of b =
28844548423436046 distinct from 0, 3, 6, and 9
2+8+8+4+4+5+4+8+4+2+4+4=57

Add again the digits of 57=12

Then 3 | b.

28844548423436046
Theorem: (Criterion of Divisibility by 7)

Let b be an integer.
7 | b if and only if the number x-2y is
divisible by 7 where

y is the last digit of b and


x is obtained from b by deleting its last digit
Example: Check whether 7 | b, where b =
2780190
Number y x x-2y

2780190 0 278019 278019

278019 9 27801 27783

27783 3 2778 2772

2772 2 277 273

273 3 27 21
Theorem: (Criterion of Divisibility by 8)
Let b be an integer.
8 | b if and only if the number by last three
digits of b is divisible by 8.
Example: Check whether 8 | b, where 8 | b,
where b = 3978469376
We look at the three digits of b : 376
376/2=188 188/2=94 94/2=47
Automaton of
Divisibility by
3
NUMBERT THEORY
We can check for divisibility graphically using
an automaton.
There are several components of this
“automaton”

States: the set {0, 1, 2}


Alphabet: the set {+1, x10}
Starting State: 0
Accepting States: 0
Transition Function: Directed Arrows
To use this automation, we represent any
natural as an ordered sequence +1 and x10

Example: Write the number 321 as a sequence of +1 and x10

We start at the first digit of the number 321.


+1 +1 +1
0 1 2 3
x10 +1 +1
3 30 31 32
x10 +1
32 320 321 +1+1+1x10+1+1x10+1
To use this automation, we represent any
natural as an ordered sequence +1 and x10

Example: Write the number 321 as a sequence of +1 and x10

We start at the first digit of the number 321.


+1 +1 +1
0 1 2 3
x10 +1 +1
3 30 31 32
x10 +1
32 320 321 +1+1+1x10+1+1x10+1
+1+1+1x10+1+1x10
+1
The node where the
paths ends is the
remainder of the
number.
Example: Determine the remainder of 124 when divided by 3
We express 124 as a sequence of +1 and x10
The sequence is: +1, x10 +1, +1, x10, +1, +1, +1, +1

The remainder of 124 divided


by 3 is 1.
Automation of
Divisibility by
Natural
Number
NUMBERT THEORY
Suppose you want to construct an automaton
of divisibility by 4, 5, 6, etc.

There is algorithm that you can follow.


Step 1: Draw n distinct nodes and label them
0, 1, 2, …, (n-1).

Step 2: draw a directed edge (arrow) I → (i+1)


for i { 0, 1, 2, …, (n-2)} and (n-1) → 0.

Step 3: Label the edges in step 2 with “+1”.


Step 4: Draw a directed edge (arrow) i → (10
i) mod n for i {0, 1, 2, …, (n-1)}


Step 5: Label the edges in step 4 with “x10”.
Example: Construct an automaton of divisibility by 4
Step1: Draw n=4 distinct notes and label them 0, 1, 2, 3.

3 1

2
Example: Construct an automaton of divisibility by 4
Step 2: the directed edges are 0 → 1, 1 → 2, 2 → 3, 3 → 0

3 1

2
Example: Construct an automaton of divisibility by 4
Step 3: Label the edges in step 2 with “+1”.

0
+1 +1

3 1

+1 2 +1
Example: Construct an automaton of divisibility by 4
Step 4: Draw a directed edge (arrow) i → (10 i) mod n for i
{0, 1, 2, …, (n-1)}


In this case n = 4, so i → (10 i) mod 4 For i {0, 1, 2, 3}

We get these edges


0 → 0 mod 4, for i=0
1 → 10 mod 4, for i=1
2 → 20 mod 4, for i=2
3 → 30 mod 4, for i=3
Example: Construct an automaton of divisibility by 4
We get these edges
0 → 0 mod 4, 0
1 → 10 mod 4, 2
2 → 20 mod 4, 0
3 → 30 mod 4, 2
We get these edges
0→0
1→2
2→0
3→2
Example: Construct an automaton of divisibility by 4
We get these edges
0 → 0, 1 → 2 , 2 → 0, 3 → 2

0
+1 +1

3 1

+1 2
+1
Example: Construct an automaton of divisibility by 4
Step 5: Label the edges in the step 4 with “x10”.

x10

0
+1 +1
x10

3 1
x10 x10

+1 2
+1
Example: Determine whether 4 | 12 using the Automation of
Divisibility of 4.

We express 12 as a sequence or +1 and x10

The sequence is +1, x10, +1, +1


The sequence is +1, x10, +1, +1

x10

0
+1 +1
x10

3 1
x10 x10

+1 2
+1
Fundamental
Theorem of
Arithmetic
NUMBERT THEORY
Given any integer n > 1, there exist a positive integer k.,
distinct prime numbers p1, p2, p3, …,pk, and positive integers
e1, e2, e3, … , ek such that

n = p1e1●p2e2 ●p3e3…..pkek
and any other expresion for n as a product of prime numbers is
identical to this except, perhaps, for the order in whcich the
factors are written.

You might also like