February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers How do we (humans) add two integers? Example: 7583.

Slides:



Advertisements
Similar presentations
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Mathematical Reasoning Methods of Proof.
Advertisements

Rules of Inferences Section 1.5. Definitions Argument: is a sequence of propositions (premises) that end with a proposition called conclusion. Valid Argument:
1 Section 1.5 Rules of Inference. 2 Definitions Theorem: a statement that can be shown to be true Proof: demonstration of truth of theorem –consists of.
CSNB143 – Discrete Structure
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.
Chapter 3. Mathematical Reasoning 3.1 Methods of proof A theorem is a statement that can be shown to be true. A proof is to demonstrate that a theorem.
Representing Relations Using Matrices
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
Matrices MSU CSE 260.
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
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.
5  Systems of Linear Equations: ✦ An Introduction ✦ Unique Solutions ✦ Underdetermined and Overdetermined Systems  Matrices  Multiplication of Matrices.
Applied Discrete Mathematics Week 10: Equivalence Relations
CSE 504 Discrete Mathematics & Foundations of Computer Science
Chapter 3: The Fundamentals: Algorithms, the Integers, and Matrices
Introduction to Proofs
MATH 224 – Discrete Mathematics
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
Lecture 7 Matrices CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 4 – Matrix CSNB 143 Discrete Mathematical Structures.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Discrete Structures (DS)
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/21 Module.
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.
Module #9: Matrices Rosen 5 th ed., §2.7 Now we are moving on to matrices, section 7.
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.
2 2.1 © 2012 Pearson Education, Inc. Matrix Algebra MATRIX OPERATIONS.
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.
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
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.
Module #1 - Logic Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank. Modified By Mingwu Chen 1 Module.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference.
Matrices and Determinants
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Section 2.4. Section Summary  Sequences. o Examples: Geometric Progression, Arithmetic Progression  Recurrence Relations o Example: Fibonacci Sequence.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
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. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
Chapter 1 Logic and proofs
CSE15 Discrete Mathematics 03/01/17
The Euclidean Algorithm
CSE 504 Discrete Mathematics & Foundations of Computer Science
Discrete Structures – CNS2300
Applied Discrete Mathematics Week 5: Mathematical Reasoning
CSE15 Discrete Mathematics 01/30/17
Discrete Mathematics Logic.
MATHEMATICS Matrix Multiplication
Proof Techniques.
Applied Discrete Mathematics Week 4: Number Theory
Sequences and Summations
Module #10: Proof Strategies
Mathematical Reasoning
Section 2.4 Matrices.
Applied Discrete Mathematics Week 1: Logic
CS100: Discrete structures
Discrete Mathematics Logic.
Module #10: Proof Strategies
Foundations of Discrete Mathematics
Mathematical Reasoning
Applied Discrete Mathematics Week 4: Functions
Rules of inference Section 1.5 Monday, December 02, 2019
Presentation transcript:

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers How do we (humans) add two integers? Example: carry Binary expansions: (1011) 2 + (1010) 2 10 carry ( )2)2)2)2

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 2 Addition of Integers Let a = (a n-1 a n-2 …a 1 a 0 ) 2, b = (b n-1 b n-2 …b 1 b 0 ) 2. How can we algorithmically add these two binary numbers? First, add their rightmost bits: a 0 + b 0 = c 0  2 + s 0, where s 0 is the rightmost bit in the binary expansion of a + b, and c 0 is the carry. Then, add the next pair of bits and the carry: a 1 + b 1 + c 0 = c 1  2 + s 1, where s 1 is the next bit in the binary expansion of a + b, and c 1 is the carry.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 3 Addition of Integers Continue this process until you obtain c n-1. The leading bit of the sum is s n = c n-1. The result is: a + b = (s n s n-1 …s 1 s 0 ) 2

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 4 Addition of Integers Example: Add a = (1110) 2 and b = (1011) 2. a 0 + b 0 = = 0  2 + 1, so that c 0 = 0 and s 0 = 1. a 1 + b 1 + c 0 = = 1  2 + 0, so c 1 = 1 and s 1 = 0. a 2 + b 2 + c 1 = = 1  2 + 0, so c 2 = 1 and s 2 = 0. a 3 + b 3 + c 2 = = 1  2 + 1, so c 3 = 1 and s 3 = 1. s 4 = c 3 = 1. Therefore, s = a + b = (11001) 2.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 5 Addition of Integers procedure add(a, b: positive integers) c := 0 for j := 0 to n-1 begin d :=  (a j + b j + c)/2  s j := a j + b j + c – 2d c := d end s n := c {the binary expansion of the sum is (s n s n-1 …s 1 s 0 ) 2 }

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 6Matrices A matrix is a rectangular array of numbers. A matrix with m rows and n columns is called an m  n matrix. Example: is a 3  2 matrix. A matrix with the same number of rows and columns is called square. Two matrices are equal if they have the same number of rows and columns and the corresponding entries in every position are equal.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 7Matrices A general description of an m  n matrix A = [a ij ]: i-th row of A j-th column of A

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 8 Matrix Addition Let A = [a ij ] and B = [b ij ] be m  n matrices. The sum of A and B, denoted by A+B, is the m  n matrix that has a ij + b ij as its (i, j)th element. In other words, A+B = [a ij + b ij ]. Example:

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 9 Matrix Multiplication Let A be an m  k matrix and B be a k  n matrix. The product of A and B, denoted by AB, is the m  n matrix with (i, j)th entry equal to the sum of the products of the corresponding elements from the i-th row of A and the j-th column of B. In other words, if AB = [c ij ], then

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 10 Matrix Multiplication A more intuitive description of calculating C = AB: - Take the first column of B - Turn it counterclockwise by 90  and superimpose it on the first row of A - Multiply corresponding entries in A and B and add the products: 3    3 = 9 - Enter the result in the upper-left corner of C

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 11 Matrix Multiplication - Now superimpose the first column of B on the second, third, …, m-th row of A to obtain the entries in the first column of C (same order). - Then repeat this procedure with the second, third, …, n-th column of B, to obtain to obtain the remaining columns in C (same order). - After completing this algorithm, the new matrix C contains the product AB.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 12 Matrix Multiplication Let us calculate the complete matrix C:

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 13 Identity Matrices The identity matrix of order n is the n  n matrix I n = [  ij ], where  ij = 1 if i = j and  ij = 0 if i  j: Multiplying an m  n matrix A by an identity matrix of appropriate size does not change this matrix: AI n = I m A = A

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 14 Powers and Transposes of Matrices The power function can be defined for square matrices. If A is an n  n matrix, we have: A 0 = I n, A r = AAA…A (r times the letter A) The transpose of an m  n matrix A = [a ij ], denoted by A t, is the n  m matrix obtained by interchanging the rows and columns of A. In other words, if A t = [b ij ], the b ij = a ji for i = 1, 2, …, n and j = 1, 2, …, m.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 15 Powers and Transposes of Matrices Example: A square matrix A is called symmetric if A = A t. Thus A = [a ij ] is symmetric if a ij = a ji for all i = 1, 2, …, n and j = 1, 2, …, m. A is symmetric, B is not.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 16 Zero-One Matrices A matrix with entries that are either 0 or 1 is called a zero-one matrix. Zero-one matrices are often used like a “table” to represent discrete structures. We can define Boolean operations on the entries in zero-one matrices: ab abababab ab abababab

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 17 Zero-One Matrices Let A = [a ij ] and B = [b ij ] be m  n zero-one matrices. Then the join of A and B is the zero-one matrix with (i, j)th entry a ij  b ij. The join of A and B is denoted by A  B. The meet of A and B is the zero-one matrix with (i, j)th entry a ij  b ij. The meet of A and B is denoted by A  B.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 18 Zero-One Matrices Example: Join: Meet:

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 19 Zero-One Matrices Let A = [a ij ] be an m  k zero-one matrix and B = [b ij ] be a k  n zero-one matrix. Then the Boolean product of A and B, denoted by A  B, is the m  n matrix with (i, j)th entry [c ij ], where cij = (a i1  b 1j )  (a i2  b 2i )  …  (a ik  b kj ). Note that the actual Boolean product symbol has a dot in its center. Basically, Boolean multiplication works like the multiplication of matrices, but with computing  instead of the product and  instead of the sum.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 20 Zero-One Matrices Example:

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 21 Zero-One Matrices Let A be a square zero-one matrix and r be a positive integer. The r-th Boolean power of A is the Boolean product of r factors of A. The r-th Boolean power of A is denoted by A [r]. A [0] = I n, A [r] = A  A  …  A (r times the letter A)

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 22 Let’s proceed to… Mathematical Reasoning

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 23 Mathematical Reasoning We need mathematical reasoning to determine whether a mathematical argument is correct or incorrect and determine whether a mathematical argument is correct or incorrect and construct mathematical arguments. construct mathematical arguments. Mathematical reasoning is not only important for conducting proofs and program verification, but also for artificial intelligence systems (drawing inferences).

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 24Terminology An axiom is a basic assumption about mathematical structured that needs no proof. We can use a proof to demonstrate that a particular statement is true. A proof consists of a sequence of statements that form an argument. The steps that connect the statements in such a sequence are the rules of inference. Cases of incorrect reasoning are called fallacies. A theorem is a statement that can be shown to be true.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 25Terminology A lemma is a simple theorem used as an intermediate result in the proof of another theorem. A corollary is a proposition that follows directly from a theorem that has been proved. A conjecture is a statement whose truth value is unknown. Once it is proven, it becomes a theorem.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 26 Rules of Inference Rules of inference provide the justification of the steps used in a proof. One important rule is called modus ponens or the law of detachment. It is based on the tautology (p  (p  q))  q. We write it in the following way: p p  q ____  q q q q The two hypotheses p and p  q are written in a column, and the conclusion below a bar, where  means “therefore”.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 27 Rules of Inference The general form of a rule of inference is: p 1 p 1 p 2 p 2... p n p n____  q q q q The rule states that if p 1 and p 2 and … and p n are all true, then q is true as well. These rules of inference can be used in any mathematical argument and do not require any proof.

February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 28 Rules of Inference p_____  pq pq pq pq Addition pq pq pq pq_____  p p p p Simplification p q_____  pq pq pq pq Conjunction q q q q pq pq pq pq_____  p p p p Modus tollens pq pq pq pq qr qr qr qr_____  pr pr pr pr Hypothetical syllogism pq pq pq pq p p p p_____  q q q q Disjunctive syllogism