Presentation on theme: "BY MISS FARAH ADIBAH ADNAN IMK"— Presentation transcript:
1 BY MISS FARAH ADIBAH ADNAN IMK CHAPTER 2 NUMBER THEORY, NUMBER SYSTEM & COMPUTER ARITHMETIC, CRYPTOGRAPHYBY MISS FARAH ADIBAH ADNANIMK
2 CHAPTER OUTLINE - I 2.1 INTRODUCTION TO NUMBER THEORY 2.1.1 DIVISIBILITYPRIME NUMBERSFACTORIZATION2.1.2 GREATEST COMMON DIVISOR (GCD)EUCLIDEAN ALGORITHM2.1.3 MODULAR ARITHMETIC2.2 NUMBER SYSTEM & COMPUTER ARITHMETIC2.3 CRYPTOGRAPHY
3 2.1 INTRODUCTION TO NUMBER THEORY The theory of number is part of discrete mathematics and involving the integers and their properties.The concept of division of integers is fundamental to computer arithmetic.This chapter involves algorithms – used to solves many problems; searching a list, sorting finding the shortest path, find greatest common divisor, etc.
4 DIVISIBILITYNumber theory is concerned with the properties of integers.One of the most important is divisibility.Definition 2.1Let and be integers with We say thatdivides if there is an integer such thatThis is denoted by Another way toexpress this is thatis a multiple of .
5 EXAMPLE 2.1Determine whether they are divisible or not..
6 Basic Properties of Divisibility Let represent integers. Then.
7 PRIME NUMBERSDefinition 2.2 A number that is divisible only by 1 and itself is called prime number. An integer that is not prime is called composite, which means that must expressible as a product of integers with
8 EXAMPLE 2.2Determine each number is prime number or not.79
9 The first 1000 primes are listed below. 2357111317192329313741434753596167717379838997101103107109113127131137139149151157163167173179181191193197199211223227229233239241251257263269271277281283293307311313317331337347349353359367373379383389397401409419421431433439443449457461463467479487491499503509521523541547557563569571577587593599601607613617619631641643647653659661673677683691701709719727733739743751757761769773787797809811821823827829839853857859863877881883887907911919929937941947953967971977983991997
10 FACTORIZATIONTheorem 2.1: The Fundamental Theorem of ArithmeticAny integer is a product of primes uniquely, up to the order of primes. It can be factored in a unique way as:where are prime numbers and
11 EXAMPLE 2.3Find prime factorizations of:9111011
12 2.1.2 GREATEST COMMON DIVISOR (GCD) Definition 2.3The greatest common divisor of and is the largest positive integer dividing both and and is denoted by either When, we say and are relatively primes.
13 Steps to Find the GcdIf you can factor and into primes, do so. For each prime number, look at the powers that it appears in the factorizations of and . Take the smaller of the two. Put these prime powers together to get the gcd. This is easiest understand by examples:gcd (576,135) =
14 Steps to Find the Gcd ii) gcd Note that if prime does not appear in factorization, then it cannot appear in the gcd.Suppose and are large numbers, so it might not be easy to factor them. The gcd can be calculated by a procedure known as the Euclidean algorithm. It goes back to what everyone learned in grade school: division with remainder.
15 18.104.22.168 THE EUCLIDEAN ALGORITHM Suppose that is greater than . If not, switchand . The first step is divide the larger of the two integers by the smaller; let is larger than , hence represent in the formWhere is called the dividend, is called the divisor, is called the quotient, and is called the remainder.
16 22.214.171.124 THE EUCLIDEAN ALGORITHM If then continue by representing inthe formContinue this way until the remainder that iszero.
17 Let andThe following sequence of steps:Hence, the greatest common divisor is the last nonzero remainder in the sequence of divisions
18 There are two important aspects to this algorithm: It does not require factorization of thenumbers.It is fast.
20 MODULAR ARITHMETICSometimes we care about the remainder of an integer when it is divided by some specified positive integer.Definition 2.4Let be a fixed positive integer. For any integer, is the remainder upon dividing by.Eg:
21 MODULAR ARITHMETICOne of the most basic and useful in number theory is modular arithmetic, or known as congruence.Definition 2.5If and are integers and is a positive integer, then and are said to be congruent modulo if This is written.
22 EXAMPLE 2.5a) Determine whether 32 is congruent to 7 modulo 5.
23 126.96.36.199 PROPERTIES OF MODULO OPERATOR. To demonstrate the first point, if then for some So we can write