Prime An integer greater than one is called a prime number if its only positive divisors (factors) are one and itself. Examples: The first six primes are.

Slides:



Advertisements
Similar presentations
Rules of Matrix Arithmetic
Advertisements

Chapter Matrices Matrix Arithmetic
The Integers and Division. Outline Division: Factors, multiples Exercise 2.3 Primes: The Fundamental Theorem of Arithmetic. The Division Algorithm Greatest.
5.1 Number Theory. The study of numbers and their properties. The numbers we use to count are called the Natural Numbers or Counting Numbers.
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
Chapter Primes and Greatest Common Divisors ‒Primes ‒Greatest common divisors and least common multiples 1.
February 19, 2015Applied Discrete Mathematics Week 4: Number Theory 1 The Growth of Functions Question: If f(x) is O(x 2 ), is it also O(x 3 )? Yes. x.
Copyright © 2013, 2010, and 2007, Pearson Education, Inc.
Section 1.7 Diagonal, Triangular, and Symmetric Matrices.
1.5 Elementary Matrices and a Method for Finding
1.7 Diagonal, Triangular, and Symmetric Matrices.
Mathematics. Matrices and Determinants-1 Session.
Matrix Operations. Matrix Notation Example Equality of Matrices.
Matrices and Systems of Equations
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Matrices MSU CSE 260.
INDR 262 INTRODUCTION TO OPTIMIZATION METHODS LINEAR ALGEBRA INDR 262 Metin Türkay 1.
Chapter 3 The Inverse. 3.1 Introduction Definition 1: The inverse of an n  n matrix A is an n  n matrix B having the property that AB = BA = I B is.
Finding the Inverse of a Matrix
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Chapter 1: Matrices Definition 1: A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. EXAMPLE:
Division in the Integers Theorem 1. If n and m are integers and n>0, then m=qn+r for unique integers q and r with 0
1.7 Diagonal, Triangular, and Symmetric Matrices 1.
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
BY MISS FARAH ADIBAH ADNAN IMK
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
CSCI 1900 Discrete Structures
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
CSE 504 Discrete Mathematics & Foundations of Computer Science
(CSC 102) Discrete Structures Lecture 10.
Mathematics of Cryptography Part I: Modular Arithmetic
3.4/3.5 The Integers and Division/ Primes and Greatest Common Divisors Let each of a and b be integers. We say that a divides b, in symbols a | b, provided.
Systems of Linear Equation and Matrices
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
Lecture 7 Matrices CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
The Integers. The Division Algorithms A high-school question: Compute 58/17. We can write 58 as 58 = 3 (17) + 7 This forms illustrates the answer: “3.
Matrices Matrices For grade 1, undergraduate students For grade 1, undergraduate students Made by Department of Math.,Anqing Teachers college.
CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Application: Algorithms Lecture 20 Section 3.8 Wed, Feb 21, 2007.
Greatest Common Divisors & Least Common Multiples  Definition 4 Let a and b be integers, not both zero. The largest integer d such that d|a and d|b is.
Direct Proof and Counterexample III
CSCI 115 Chapter 1 Fundamentals. CSCI 115 §1.1 Sets and Subsets.
Matrices and Determinants
2.5 – Determinants and Multiplicative Inverses of Matrices.
Ch04-Number Theory and Cryptography 1. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 3. Mathematics of Cryptography.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
CS 285- Discrete Mathematics Lecture 11. Section 3.8 Matrices Introduction Matrix Arithmetic Transposes and Power of Matrices Zero – One Matrices Boolean.
Introduction Types of Matrices Operations
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
CHAPTER 7 Determinant s. Outline - Permutation - Definition of the Determinant - Properties of Determinants - Evaluation of Determinants by Elementary.
Direct Proof and Counterexample III Part 2 Lecture 16 Section 3.3 Tue, Feb 13, 2007.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Agenda Review:  Relation Properties Lecture Content:  Divisor and Prime Number  Binary, Octal, Hexadecimal Review & Exercise.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
CMSC Discrete Structures
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 4: Number Theory
Matrices Introduction.
Determinant of a Matrix
MATRICES Operations with Matrices Properties of Matrix Operations
Applied Discrete Mathematics Week 10: Introduction to Counting
Number Theory.
Presentation transcript:

Prime An integer greater than one is called a prime number if its only positive divisors (factors) are one and itself. Examples: The first six primes are 2, 3, 5, 7, 11 and 13. The prime divisors of 10 are 2 and 5. The Fundamental Theorem of Arithmetic shows that the primes are the building blocks of the positive integers: every positive integer is a product of prime numbers in one and only one way, except for the order of the factors. (This is the key to their importance: the prime factors of an integer determines its properties.)

Prime Algorithm to test whether an integer N>1 is prime: Step1: N = 2 ? If so, N is prime, If not, continue. Step2: 2 | N ? If so, N is not a prime, otherwise cont. Step3: Compute the largest integer K ≤ √N. Then Step4: D | N? where D is any odd number such that 1 < D ≤ K. If D | N, then N is not prime, otherwise, N is prime.

Greatest Common Divisor (GCD) Given two numbers not prime to one another, find their greatest common divisor. GCD(a, b) = p 1 min(a 1, b 1 ) p 2 min(a 2,b 2 ) …p k min(a k, b k ) where p 1, p 2, p 3,…., p k are prime factors of either a or b. and some of a i and b i may be zeros. Example: 630 = = GCD(630, 450) = 2 min(1, 1). 3 min(2, 2) 5 min(1, 2). 7 min(1, 0). = = 90

Least Common Multiple (LCM) LCM(a, b) = p 1 max(a 1, b 1 ) p 2 max(a 2,b 2 ) …p k max(a k, b k ) where p 1, p 2, p 3,…., p k are prime factors of either a or b. and some of a i and b i may be zeros. Example: 630 = = LCM(630, 450) = 2 max(1, 1). 3 max(2, 2). 5 max(1, 2). 7 max(1, 0). = = 3150

Euclidean Algorithm The algorithm is based on the following two observations: If b|a then gcd(a, b) = b. This is indeed so because no number (b, in particular) may have a divisor greater than the number itself (I am talking here of non-negative integers.)gcd If a = bt + r, for integers t and r, then gcd(a, b) = gcd(b, r).

Euclidean Algorithm Indeed, every common divisor of a and b also divides r. Thus gcd(a, b) divides r. But, of course, gcd(a, b)|b. Therefore, gcd(a, b) is a common divisor of b and r and hence gcd(a, b) = gcd(b, r). The reverse is also true because every divisor of b and r also divides a.

Euclidean Algorithm Example Let a = 2322, b = = 654* gcd(2322, 654) = gcd(654, 360) 654 = 360* gcd(654, 360) = gcd(360, 294) 360 = 294* gcd(360, 294) = gcd(294, 66) 294 = 66* gcd(294, 66) = gcd(66, 30) 66 = 30*2 + 6 gcd(66, 30) = gcd(30, 6) 30 = 6*5 gcd(30, 6) = 6 Therefore, gcd(2322,654) = 6.

Euclidean Algorithm The greatest common divisor of 190 and 34 is computed as follows using the Euclidean Algorithm: 190 = 5 * = 1 * = 1 * = 2 * = 3 * Since it is the next-to-last number appearing on the right-hand side of these equations, the GCD of the two is 2.

Euclidean Algorithm The greatest common divisor of 878 and 82 is computed as follows via the Euclidean Algorithm: 878 = 10 * = 1 * = 2 * = 2 * = 2 * = 2 * Since it is the next-to-last number appearing on the right-hand side of these equations, the GCD of the two is 2.

Matrices Consider two families A and B. Every month, the two families have expenses such as: utilities, health, entertainment, food, etc. Let us restrict ourselves to: food, utilities, and health. How would one represent the data collected? Many ways are available but one of them has an advantage of combining the data so that it is easy to manipulate them.

Matrices We will write the data as follows: If we have no problem confusing the names and what the expenses are, then we may write This is what we call a Matrix.

Matrix: Addition Addition of two matrices: Add entries one by one. For example, we have Multiplication of a Matrix by a Number: In order to multiply a matrix by a number, you multiply every entry by the given number.

Matrix: Multiplication

Matrices The size of the matrix is given by the number of rows and the number of columns. If the two numbers are the same, we called such matrix a square matrix. Consider the matrix: its diagonal is given by a and d.

Matrices For the matrix Its diagonal consists of a, e, and k. In general, if A is a square matrix of order n and if a ij is the number in the i th -row and j th -column, then the diagonal is given by the numbers a ii, for i=1,..,n.

Upper-triangular and lower-triangular matrices The diagonal of a square matrix helps define two type of matrices: upper-triangular and lower-triangular. The diagonal subdivides the matrix into two blocks: one above the diagonal and the other one below it. If the lower-block consists of zeros, we call such a matrix upper-triangular. If the upper-block consists of zeros, we call such a matrix lower-triangular.

Matrices For example, the matrices are upper-triangular, while the matrices are lower-triangular.

Transpose of a Matrix Now consider the two matrices The matrices A and B are triangular. But there is something special about these two matrices. If you reflect the matrix A about the diagonal, you get the matrix B. This operation is called the transpose operation. Let A be a n x m matrix defined by the numbers a ij, then the transpose of A, denoted A T is the m x n matrix defined by the numbers b ij where b ij = a ji.

Transpose of a Matrix For example, for the matrix we have

Matrices Properties of the Transpose operation. If X and Y are m x n matrices and Z is an n x k matrix, then 1. –(X+Y) T = X T + Y T 2. –(XZ) T = Z T X T 3. –(X T ) T = X

Symmetric matrix Symmetric matrix is a matrix equal to its transpose. So a symmetric matrix must be a square matrix. For example, the matrices are symmetric matrices.

Matrices A diagonal matrix is a symmetric matrix with all of its entries equal to zero except may be the ones on the diagonal. So a diagonal matrix has at most n different numbers. For example, the matrices are diagonal matrices. Identity matrices are examples of diagonal matrices. Diagonal matrices play a crucial role in matrix theory.

Invertible Matrices Invertible matrices are very important in many areas of science. For example, decrypting a coded message uses invertible matrices. Definition. An n x n matrix A is called nonsingular or invertible if and only ifthere exists an n x n matrix B such that where I n is the identity matrix. The matrix B is called the inverse matrix of A. Example: