Download presentation
Presentation is loading. Please wait.
Published byShawn Peters Modified over 9 years ago
1
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
2
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
3
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.
4
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 …
5
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).
6
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.
7
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
8
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
9
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’)
10
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
11
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)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.