0% found this document useful (0 votes)
49 views8 pages

Scribed Notes - 23

The document discusses several topics in number theory including: 1) Elementary number theory operations such as addition, subtraction, multiplication, and division. 2) Different types of numbers including integers, rational numbers, irrational numbers, imaginary numbers, and complex numbers. 3) Modulo or clock arithmetic and examples using it to determine what day of the week a given date falls on. 4) Other topics like the division algorithm, prime and composite numbers, the sieve of Eratosthenes, greatest common divisor, least common multiple, and the Chinese remainder theorem.

Uploaded by

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

Scribed Notes - 23

The document discusses several topics in number theory including: 1) Elementary number theory operations such as addition, subtraction, multiplication, and division. 2) Different types of numbers including integers, rational numbers, irrational numbers, imaginary numbers, and complex numbers. 3) Modulo or clock arithmetic and examples using it to determine what day of the week a given date falls on. 4) Other topics like the division algorithm, prime and composite numbers, the sieve of Eratosthenes, greatest common divisor, least common multiple, and the Chinese remainder theorem.

Uploaded by

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

Scribed Notes: 23

Number Theory
• Elementary Operations:
o Addition
o Subtraction
o Multiplication
o Division
• Well known Number Theory
o Positive Integers
o Non-negative Integers
o Integers
o Rational Numbers
o Irrational Numbers
▪ Transcendental Numbers
o Imaginary Numbers
o Complex Numbers
o Modulo/clock Arithmetic
• Example Of Modulo/clock Arithmetic
1. Let us consider January 1st as Thursday. Then according to this
which day will be the current day.(17 Nov 2021)
January 1st= Thursday → 1
February 1st → 4 [1+31%7] (31 days in January)
March 1st → 4 [4+28%7]
April 1st → 0 [4+31%7] (Considering days as 0 to 6)
May 1st → 2 [0+30%7]
June 1st → 5 [2+31%7]
July 1st → 0
August 1st → 3
September 1st → 6
October 1st → 1
November 1st → 4
November 17th → 6
Here, January 1st is Thursday and considered as the first day, then
the current day that is November 17th will be Tuesday (two days
before the first day).
2. January 1st 2021= Friday
January 1st 1953=?

1st Jan 1953=x


Therefore, 1st Jan 2021= x+68+17
68 days were added because 365%7=1 and the difference
between years 2021 and 1953 is 68.
17 days were added because there are 17 leap years between
1953 and 2021.Hence, there will be an extra day in each year.

1st Jan 2021=x+85


Therefore, x+85%7=x+1
Therefore, if 1st January 2021 was Friday, then 1st January 1953
will be Thursday.
• The Division Algorithm
Example: 41/7
41 = 5 * 7 + 6

Dividend Divisor

Quotient
Remainder
• Prime Number v/s Composite Number

• Every composite number has a unique factorization of prime


numbers.

• Prove that there are infinitely many prime numbers.


Proof by contradiction:
▪ Let us assume that there are finitely many primes and label them
p1. . . pn.
▪ We will now construct the number P to be one more than the
product of all finitely many primes:
P = p1p2⋯pn + 1.
▪ The number P has remainder 1 when divided by any prime pi,
i = 1, . . . , n, making it a prime number as long as P ≠ 1.
▪ Since 2 is a prime number, the list of pi ’s is non-empty. It follows
that P is greater than one and so has two distinct divisors. It is
therefore a prime number.
▪ It can also be seen from the definition of P that it is strictly greater
than any of the pi’s. This contradicts our assumption that there
are finitely many prime numbers. Therefore, there are infinitely
many prime numbers.
• Sieve of Eratosthenes
N=(√N)2

• GCD (Greatest Common Divisor)


• LCM (Least Common Multiple)

• Relative Prime Number


▪ When two numbers have no common factors other than 1.
▪ In other words there is no value that you could divide them both by
exactly (without any remainder).
▪ 21 and 22 are relatively prime:
• The factors of 21 are 1, 3, 7 and 21
• The factors of 22 are 1, 2, 11 and 22
(the only common factor is 1)
• Euler  Function
▪ Euler’s φ (phi) Function counts the number of positive integers not
exceeding n and relatively prime to n.
▪ If p is a prime number then φ (p) = p-1 for any prime number.
▪ Example: φ (117) =?
117=13*3*3
Number of non-relative prime multiples of 13 below 117 is 8
Number of non-relative prime multiples of 3 below 117 is 38
Number of non-relative prime common multiples of 3 and 13
below 117 is 2.
Therefore,
Total Non-relative prime multiples of 117 are 8+38-2=44
Hence, according to Euler’s φ (phi) Function
Φ (117) = (117-1)-(44) = 72
Therefore there are 72 non-relative prime multiples of 117
1,2,4,5,7,8,10,11,14,16,17,19,20,22,23…and so on.
• Euclid’s Algorithm for GCD
▪ Multiplication is nothing but repeated addition.
▪ The Euclidean Algorithm for finding GCD(A,B) is as follows:

If A = 0 then GCD(A,B)=B, since the GCD(0,B)=B, and we can stop.


If B = 0 then GCD (A, B) =A, since the GCD (A,0)=A, and we can
stop.
Write A in quotient remainder form (A = B⋅Q + R)
Find GCD(B,R) using the Euclidean Algorithm since GCD(A,B)
GCD(B,R)
Example:
Find GCD(195,117).
➔ GCD(195,117) (195/117, remainder=78)
=GCD(78,117) (117/78, remainder=39)
=GCD(78,39) (78/39, remainder=0)
=GCD(0,39)
Therefore, GCD(195,117)=39
• Remainder Theorem
▪ Example: Find 57346 mod 17.
If p is a prime, ap-1=1 (mod p).
51 mod 17=5, 52 mod 17=8, 53 mod 17=6, 54 mod 17=13, 55 mod
17=14
Therefore the remainder series is:
5,8,6,13,14,2,10,16,12,9,11,4,3,15,7,1,5,8,6,13,14,2,10,16,12,9,11,
4,3,15,7,1….
Hence the cycle of numbers repeats after every 16 numbers.
Therefore,
7346%16=2
As remainder is 2, the second number from the remainder series
that is 8 will be the answer of our main problem.
57346 mod 17=8.
• Chinese Theorem

In number theory, the Chinese remainder theorem states that if one


knows the remainders of the Euclidean division of an integer n by
several integers, then one can determine uniquely the remainder of the
division of n by the product of these integers, under the condition that
the divisors are pairwise coprime.

Theorem:

Let p,q be coprime. Then the system of equations

x=a(mod p)
x=b(mod q)
has a unique solution for x modulo pq.

The reverse direction is trivial: given x∈ Zpq, we can


reduce x modulo p and x modulo q to obtain two equations of the
above form.

Proof:

Let p1=p−1(mod q) and q1=q−1(mod p). These must exist


since p,q are coprime. Then we claim that if y is an integer such
that

y=aqq1+bpp1(mod pq)
then y satisfies both equations:

Modulo p, we have y=aqq1=a(mod p) since qq1=1(mod p).

Similarly y=b (modq). Thus y is a solution for x.

It remains to show no other solutions exist modulo pq.

If z=a (mod p) then z−y is a multiple of p. If z=b (mod q) as well,


then z−y is also a multiple of q. Since p and q are coprime, this
implies z−y is a multiple of pq, hence z=y (mod pq).
This theorem implies we can represent an element of Zpq by one
element of Zp and one element of Zq, and vice versa. In other
words, we have a bijection between Zpq and Zp×Zq.

For Several Equations


Theorem:

Let m1,...,mn be pairwise coprime (that is gcd (mi, mj)=1 whenever I ≠ j).
Then the system of n equations

x=a1 (mod m1)


...
x=an (mod mn)
has a unique solution for x modulo M where M= m1...mn.

Proof:

This is an easy induction from the previous form of the theorem, or we


can write down the solution directly.

Define bi=M/mi (the product of all the moduli except for mi)
and bi′=bi−1(mod mi). Then by a similar argument to before,

x=∑𝑛𝑖=1 aibib’I (mod M)


is the unique solution.

You might also like