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<=r<n n|m, n divides m, if r=0, that.

Slides:



Advertisements
Similar presentations
CSNB143 – Discrete Structure
Advertisements

Chapter Matrices Matrix Arithmetic
February 26, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers Example: Add a = (1110) 2 and b = (1011) 2. a 0 + b.
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.
Matrix Definition: An array of numbers in m rows and n colums is called an mxn matrix A square matrix of order n, is an (nxn) matrix.
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.
Mathematics. Matrices and Determinants-1 Session.
Chapter II. THE INTEGERS
Matrices and Systems of Equations
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
Matrices MSU CSE 260.
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.
3.8 Matrices.
MAT 2401 Linear Algebra 2.2 Properties of Matrix Operations
1 Operations with Matrice 2 Properties of Matrix Operations
Properties of the Integers: Mathematical Induction
WHOLE NUMBERS; INTEGERS Whole numbers: Z 0,+ = the natural numbers  {0}. Integers:
Integers Number Theory = Properties of Integers
CSCI 1900 Discrete Structures
Chapter 2 The Fundamentals: Algorithms, the Integers, and Matrices
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.
CSE 504 Discrete Mathematics & Foundations of Computer Science
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.
Chap. 2 Matrices 2.1 Operations with Matrices
Copyright © 2011 Pearson, Inc. 7.2 Matrix Algebra.
Lecture 7 Matrices CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 4 – Matrix CSNB 143 Discrete Mathematical Structures.
Magnitude of a Vector The magnitude of a vector, denoted as |a|, is defined as the square root of the sum of the squares of its components: |a| = (x 2.
Matrices Matrices A matrix (say MAY-trix) is a rectan- gular array of objects (usually numbers). An m  n (“m by n”) matrix has exactly m horizontal.
2009/9 1 Matrices(§3.8)  A matrix is a rectangular array of objects (usually numbers).  An m  n (“m by n”) matrix has exactly m horizontal rows, and.
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.
For real numbers a and b,we always have ab = ba, which is called the commutative law for multiplication. For matrices, however, AB and BA need not be equal.
Matrices Section 2.6. Section Summary Definition of a Matrix Matrix Arithmetic Transposes and Powers of Arithmetic Zero-One matrices.
Chapter 2 … part1 Matrices Linear Algebra S 1. Ch2_2 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Definition A matrix is a rectangular.
CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
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.
Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
CSCI 115 Chapter 1 Fundamentals. CSCI 115 §1.1 Sets and Subsets.
Matrices and Determinants
MATRICES Operations with Matrices Properties of Matrix Operations
Linear Algebra Chapter 2 Matrices.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Section 2.4. Section Summary  Sequences. o Examples: Geometric Progression, Arithmetic Progression  Recurrence Relations o Example: Fibonacci Sequence.
Module #9 – Number Theory 6/11/20161 Chapter 3 Algorithms, Integers and Matrices.
CS 285- Discrete Mathematics Lecture 11. Section 3.8 Matrices Introduction Matrix Arithmetic Transposes and Power of Matrices Zero – One Matrices Boolean.
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.
2.1 Matrix Operations 2. Matrix Algebra. j -th column i -th row Diagonal entries Diagonal matrix : a square matrix whose nondiagonal entries are zero.
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.
Linear Algebra Lecture 2.
1.4 Inverses; Rules of Matrix Arithmetic
Integers and Division Section 3.4.
MATHEMATICS Matrix Multiplication
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 4: Number Theory
Foundations of Discrete Mathematics
2. Matrix Algebra 2.1 Matrix Operations.
CS100: Discrete structures
Matrices and Matrix Operations
MATRICES Operations with Matrices Properties of Matrix Operations
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Multiplication of Matrices
Linear Algebra Lecture 11.
Applied Discrete Mathematics Week 4: Functions
Module #9: Basic Number Theory
Presentation transcript:

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<=r<n n|m, n divides m, if r=0, that is m=qn Theorem 2. Let a,b,c be integers, (a) if a|b and a|c, then a|(b+c) (b) if a|b and a|c, where b>c, then a|(b-c) (c) if a|b or a|c, then a|bc (d) if a|b and b|c, then a|c if a|b and a|c, then a|(mb+nc) A number p>1 in Z + is prime if the only positive integers that divide p are p and 1

Division in the Integers (cont’) Algorithm to test whether an integer N>1 is prime: Step 1 Check whether N is 2, If so, N is prime. If not, proceed to Step 2 Check whether 2 | N. If so, N is not prime; otherwise, proceed to Step 3 Compute the largest integer K  N. Then Step 4 Check whether D|N, where D is any odd number such that 1<D  K. If D|N, then N is not prime; otherwise (also for the case when there is no such D), N is prime. Theorem 3. Every positive integer n>1 can be written uniquely as p 1 k1 p 2 k2 …p s ks, where p 1 <p 2 <…<p s are distinct primes that divides n and the k’s are positive integers

Greatest Common Divisor If a,b, and k are in Z +, and k|a and k|b, k is a common divisor; if d is the largest such k, d is the greatest common divisor, or GCD of a and b, d=GCD(a,b). Theorem 4. If d is GCD(a,b), then (a) d=sa+tb for some integers s and t (not necessarily positive) (b) if c is any other common divisor of a and b, then c|d.

Greatest Common Divisor (cont’) Let a,b, and d be in Z +, the integer d is the GCD of a and b if and only if (a)d|a and d|b (b)whenever c|a and c|b, then c|d. Euclidean algorithm, a procedure for finding GCD(a,b) Suppose that a  b  0, then a=k 1 b+r 1 where k 1 is in Z +, and 0  r 1  b divide b by r 1 : b=k 2 r 1 +r 2 0  r 2  r 1 divide r 1 by r 2 : r 1 =k 3 r 2 +r 3 0  r 3  r 2 divide r 2 by r 3 : r 2 =k 4 r 3 +r 4 0  r 4  r 3 …

Greatest Common Divisor (cont’) divide r n-2 by r n-1 : r n-2 =k n r n-1 +r n 0  r n  r n-1 divide r n-1 by r n : r n-1 =k n+1 r n +r n+1 0  r n+1  r n and r n+1 =0 now r n =GCD(a,b) If GCD(a,b)=1, we say a and b are relatively prime. Theorem 5. If a and b are in Z +, then GCD(a,b)=GCD(b, b±a).

Least Common Multiple If a,b, and k are in Z +, and a|k and b|k, k is a common multiple; if d is the smallest such k, d is the least common multiple, or LCM of a and b, d=LCM(a,b). Theorem 6. If a and b are two positive integers, then GCD(a,b). LCM(a,b)=ab For each n in Z +, define a function f n, the mod-n function as follows: if z is a nonnegative integer, f n =r, the remainder when z is divided by n.

Matrices matrix, rows, columns A is m (rows) by n (columns) as m  n square matrix, main diagonal, diagonal matrix, zero matrix a ij is the i, j th element (entry) of the matrix If A=[a ij ] and B=[b ij ] are m  n matrices, then the sum of A and B is C=[c ij ] defined by c ij = a ij +b ij, 1  i  m, 1  j  n. A+B=B+A, (A+B)+C=A+(B+C), A+0=0+A=A

Matrices (cont’) If A=[a ij ] is an m  p matrix and B=[b ij ] is a p  n matrix, then their product AB is the m  n matrix C=[c ij ] defined by c ij= a i1 b 1j +a i2 b 2j +… +a ip b pj 1  i  m, 1  j  n. A(BC)=(AB)C, A(B+C)=AB+AC, (A+B)C=AC+BC identity matrix I n, n  n diagonal matrix with all of whose diagonal elements 1 if A is an m  n matrix, then I m A=AI n =A if A is an n  n matrix, p is a positive integer, define A p =A. A... A (p factors) and A 0 =I n, then A p A q = A p+q and (A p ) q = A pq if AB=BA, then (AB) p = A p B p

If A=[a ij ] is an m  n matrix, then the n  m matrix A T = [a ij T ], where a ij T = a ji, 1  i  m, 1  j  n, is called the transpose of A. Theorem. If A, B are matrices, then (a) (A T ) T =A (b) (A+B) T =A T + B T (c) (AB) T = B T A T A= [a ij ] is called symmetric if A T =A; A must be a square matrix with a ij =a ji Matrices (cont’)

Boolean Matrix Operations A boolean matrix is an m  n matrix whose entries are either zero or one Let A=[a ij ] and B=[b ij ] be m  n matrices. Define A  B=C=[c ij ], the join of A and B, by c ij is 0 if both a ij and b ij are 0, otherwise c ij is 1 Define A  B=D=[d ij ], the meet of A and B, by d ij is 1 if both a ij and b ij are 1, otherwise d ij is 0 The boolean product of two boolean matrices A (m  p) and B (p  n), denoted A  B, is the m  n matrix C=[c ij ] defined by c ij =1 if a ik =1 and b kj =1 for some k, 1  k  p; otherwise c ij =0

Boolean Matrix Operations Theorem. If A, B and C are Boolean matrices of compatible sizes, then 1. (a) A  B= B  A (b) A  B= B  A 2. (a) (A  B)  C = A  (B  C) (b) (A  B)  C = A  (B  C) 3. (a) A  (B  C) = (A  B)  (A  C) (a) A  (B  C) = (A  B)  (A  C) 4. (A  B)  C = A  (B  C)