Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 12

Discrete Structures

Number Theory

Lecture Link:
https://www.youtube.com/watch?v=Gnaz0XBYkCQ&list=PLVEVLI2v6thXXsHeo
0i48UuvceypAAL9N&index=24
Number Theory

• The branch of mathematics that deals with the properties and relationships
of numbers, especially the positive integers. The main goal of number
theory is to discover interesting and unexpected relationships between
different sorts of numbers and to prove that these relationships are true.
Number Theory and Computer
Technology

• Until the mid-20th century, number theory was considered the purest
branch of mathematics, with no direct applications to the real world.
• The advent of digital computers and digital communications revealed
that number theory could provide unexpected answers to real-world
problems.
• At the same time, improvements in computer technology enabled
number theorists to make remarkable advances in factoring large
numbers, determining primes, testing inferences and solving
numerical problems once considered out of reach.
Contents

1) Divisibility
2) Greatest common divisor
3) Least Common Multiples
4)Prime and composite number
5) Relative prime
6) MOD: Congruence relation
7) Factorial number
8) Applications of Number Theory
Divisibility
Greatest Common Divisors

• Let a and b be integers, not both zero.


• The largest integer d such that d | a and d | b is called the greatest
common divisor of a and b.
• The greatest common divisor of a and b is denoted by gcd(a , b).
• Example :
• GCD (12, 18) =6
Least Common Multiples

• The least common multiple of the positive integers a and b is the


smallest positive integer that is divisible by both a and b. We denote
the least common multiple of a and b by lcm(a, b).

• Example:
• lcm(12, 18) =36
Primes and composite

• A positive integer p is called prime if it has just two divisor, namely 1


and p..
• A composite number is a multiple of prime number.
• Example: prime: 2 = 2*1
• 2 = 1*2
• Composite: 15 = 3*5
/ \
prime prime
Relative prime

• When gcd(m , n)=1 ,the integers m and n have no prime factors in


common and we say that they’re relative prime.
• Example: are 10, 17, and 21 pairwise relatively prime?
• – gcd(10,17) = 1, gcd (17, 21) = 1, and gcd (21, 10) = 1
• – Thus, they are pairwise relatively prime
• – Since gcd(10,24) ≠ 1, they are not
Modulus operator

• The modulus operator denoted by “%”, sometimes also called the


remainder operator or integer remainder operator works on integers
(and integer expressions) and yields the remainder when the first
operand is divided by the second.
• For example, the expression "5 mod 2" would evaluate to 1, because
5 divided by 2 has a quotient of 2 and a remainder of 1, while
"9 mod 3" would evaluate to 0, because the division of 9 by 3 has a
quotient of 3 and a remainder of 0; there is nothing to subtract from
9 after multiplying 3 times 3.
Factorial

• Written n!, the product of all positive integers less than and equal to n.

• n!= n .(n-1) . (n-2). …. 1

• Example: 4 ! = 4x3x2x1 = 24
Real life Applications

1. Private and public key cryptography


2. Encrypting a message
3. Decrypting a message
4. Cracking a message
5. Quantum computers

You might also like