MATH 224 – Discrete Mathematics

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

Discrete Math Methods of proof 1.
Introduction to Proofs
PROOF BY CONTRADICTION
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.
CS128 – Discrete Mathematics for Computer Science
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
CSE115/ENGR160 Discrete Mathematics 01/31/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/01/11
So far we have learned about:
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
TR1413: Discrete Mathematics For Computer Science Lecture 1: Mathematical System.
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
Methods of Proof & Proof Strategies
MATH 224 – Discrete Mathematics
Discrete Mathematics and Its Applications
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Introduction to Proofs
Reading and Writing Mathematical Proofs
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
1 10/13/2015 MATH 224 – Discrete Mathematics Why Study Discrete Math  Determination of the efficiency of algorithms, e.g., insertion sort versus selection.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Proofs1 Elementary Discrete Mathematics Jim Skon.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
MATH 224 – Discrete Mathematics
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Ch 1.4: Basic Proof Methods I A theorem is a proposition, often of special interest. A proof is a logically valid deduction of a theorem, using axioms,
Discrete Structures & Algorithms More on Methods of Proof / Mathematical Induction EECE 320 — UBC.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Copyright © Curt Hill Proofs An Introduction.
1 Propositional Logic: Fundamental Elements for Computer Scientists 0. Motivation for Computer Scientists 1. Propositions and Propositional Variables 2.
22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
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.
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
Chapter 1, Part III: Proofs With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without.
Notions & Notations - 1ICOM 4075 (Fall 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Fall 2010 ICOM.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Mathematical Induction What it is? Why is it a legitimate proof method? How to use it?
Chapter 1 Logic and proofs
Chapter 1 Logic and Proof.
Chapter 1 Logic and Proof.
The Foundations: Logic and Proofs
CS 2210:0001 Discrete Structures Logic and Proof
MATH 224 – Discrete Mathematics
Discrete Mathematics Logic.
Proof Techniques.
The Foundations: Logic and Proofs
CSE 311: Foundations of Computing
CS 220: Discrete Structures and their Applications
A Brief Summary for Exam 1
Discrete Mathematics Logic.
Foundations of Discrete Mathematics
Foundations of Discrete Mathematics
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

MATH 224 – Discrete Mathematics Predicate Calculus Some of the statements that are important in mathematics and computer science are not propositions. For example, X % 2 == 0 is not true for all integers, but only even integers. In order to make statements about the truth of this type of statement, it is necessary to introduce the quantifiers for all and there exists . So for example, we can make a statement about an array of integers such as the upper bound below. Given an array of integers A, a statement such as is of course true for every element of A. 4/23/2017

MATH 224 – Discrete Mathematics Predicate Calculus Predicate calculus allows us to make precise statements about the properties of a specific data structure. Consider the example below. * Can you rewrite the predicate above using the conditional connective? *Note that the set of allowable values for i is called the domain. Thus in this example, the domain is the set of integers for i between 0 and N – 2. 4/23/2017

MATH 224 – Discrete Mathematics Predicate Calculus Predicate calculus allows us to make precise statements about the properties of a specific data during the execution of an algorithm. Consider the example below. What is the domain for Y? What about the domain for X? How would you quantify X? 4/23/2017

MATH 224 – Discrete Mathematics Predicate Calculus What are some values for n0 and c that will make the predicate clause above true? In the discussion above, what does the integer N refer to? 4/23/2017

MATH 224 – Discrete Mathematics Substitution of Quantifiers What are the equivalent predicates for the following with replaced by and replaced by ? 4/23/2017

MATH 224 – Discrete Mathematics Order of Quantifiers Look back at Slide 1. How would express the fact that there is one upper bound for all elements in the array A? Now look at Slide 3. How would express the invariant for the bean algorithm using quantifiers for both X and Y? 4/23/2017

MATH 224 – Discrete Mathematics Order of Quantifiers 4/23/2017

MATH 224 – Discrete Mathematics Proofs In the predicate calculus, it is not possible to use truth tables to prove most results since statements depend on one or more variables. This makes the job of proving results quite a bit more difficult. Would it be possible to use truth tables if the domain(s) of the variable(s) are finite? Logical systems consists of a set of definitions, axioms, and rules of inference. The axioms, also called postulates, are taken to be true without proof. The rules of inference tell us how to derive new results from axioms and from theorems that have already been proven. This mimics the way people make decisions about the “real” world. We have already seen examples of the use of inference in deriving a sequence of equivalences in order to show that a compound proposition is a tautology. 4/23/2017

MATH 224 – Discrete Mathematics Proofs Let’s consider a simple example. We observe that whenever water is boiling if we measure it’s temperature it will be 100o C. This then becomes one of our axioms. Later we find a pot of water that is boiling. Without measuring its temperature we conclude that the temperature is 100o C. This is an example of the rule of inference called modus pones. In table 1, on Page 66, 8 rules of inference for the propositional calculus are listed, but only the first one is needed if we start with an appropriate set of axioms. The three axioms listed below are sufficient to prove any result in the propositional calculus. Of course it is almost always easier to use truth table. A → (B → A) (A → (B → C)) → ((A → B) → (A → C)) (¬B → ¬A) → ((¬B → A) → B) Show that each of these is a tautology using truth tables. 4/23/2017

MATH 224 – Discrete Mathematics Proofs With quantifiers additional axioms and rules of inference are needed. We will not consider the technical details of the predicate calculus but will proceed to consider several informal proofs using the rules of inference in Table 1 on page 66 and Table 2 on page 70 from our text book. Modus pones states that given p is true and given that p → q it follows that q is true. This rule corresponds to the definition of the conditional statement. In fact, all the other rules of inference for the propositional calculus can be proved from this one and the axioms. Table 2 shows the additional rules needed for the predicate calculus. 4/23/2017

MATH 224 – Discrete Mathematics Propositional Calculus Proof Example 7 on page 67 - 68 from our textbook: Given p → q, ¬p → r, r → s, prove that ¬q → s p → q Given (or Hypothesis) ¬q → ¬ p Contrapositve (an equivalence from section 1.2) ¬p → r Given ¬q → r Hypothetical syllogism from steps 2 and 3 (transitive) r → s Given ¬q → s Hypothetical syllogism from steps 4 and 5 4/23/2017

MATH 224 – Discrete Mathematics Propositional Calculus Proof Here is another example. Given ¬p → ¬q, ¬p → q, prove p. ¬ p → q Given (or Hypothesis) p v q Equivalence , Table 7, Page 25 ¬p → ¬q Given p v ¬q Equivalence , Table 7, Page 25 (p v p) Resolution steps 2 and 4 p Idempotent law, Table 6, Page 24 4/23/2017

MATH 224 – Discrete Mathematics Propositional Calculus Proof Here is another proof for: Given ¬p → ¬q, ¬p → q, prove p. (¬B → ¬A) → ((¬B → A) → B) ¬p → ¬q Given (¬p → ¬q) → ((¬p → q) → p) Axiom 3, where p correspond to B and q to A (¬p → q) → p Modus Pones steps 1 and 2 ¬p → q Given p Modus Pones steps 3 and 4 4/23/2017

MATH 224 – Discrete Mathematics Proofs Example of a direct proof: Prove that the sum of two even numbers is even. Let X and Y be even numbers. Then by the definition of even A(X = 2A) and B(Y = 2B). Thus X + Y = 2A + 2B = 2(A+B). By the definition of even, 2(A+B) is even and thus X plus Y is even. Using formal notation we have ( X, Y)( X even Y even → X + Y is even) 4/23/2017

MATH 224 – Discrete Mathematics Proof Strategies Direct proofs are the most obvious, but sometimes other techniques are useful. These include: Indirect proofs – instead of p → q prove the contrapositive that ¬q → ¬p Proof by contradiction – instead of proving that q is true assume that q is false. Then show this leads to a contradiction. An example would be to show that the √2 is irrational by assuming that it is rational. This will lead to a contradiction. Proof by cases – here the proof is broken down in to separate cases. This is a common techniques used with algorithms. Existence proofs – prove that something is true by providing an example. For example, prove that there is a prime number larger than 100 by giving an example. Or in some other cases it is easier to prove that something exists, but difficult to find an example. Counter examples – are used to prove that something is not true. For example, if asked to prove that the square root of every rational number is rational, show that the integer 5 contradicts this statement 4/23/2017

MATH 224 – Discrete Mathematics Examples Direct Proof: Proof that opposite angles of two intersection lines are equal. Use the premise that angles forming a straight line are always 180O. α θ β λ Angles α + β = 180O and angles α + θ = 180O. Hypothesis Angle β = 180O ─ α and angle θ = 180O ─ α . Algebra Therefore opposite angles β and θ are equal. 4/23/2017

MATH 224 – Discrete Mathematics Examples Proof by Contradiction: Proof that opposite angles of two intersection lines are equal. Use the premise that angles forming a straight line are always 180O. α θ β λ Angles α + β = 180O and angles α + θ = 180O. Hypothesis Assume that β ≠ θ. Assumption Angle β = 180O ─ α and angle θ = 180O ─ α . Algebra Then 180O ─ α ≠ 180O ─ α. Algebra But the previous statement cannot be true and is a contradiction. Therefore the opposite angles α and β must be equal. 4/23/2017

MATH 224 – Discrete Mathematics Examples Existence Proof (Non constructive): (Often non constructive proofs assume something does not exist and then show a contradiction.) Prove that there are computational problems that cannot be solved by a computer . Computer memory can be viewed as one large integer, and thus the maximum number of programs that may be constructed is equal to 2B, where B is the total number of bits of memory. (Even with infinite memory, this number is countable as long as no program uses an infinite number of bits.) The number of different problems that require different programs to solve is infinite, and in fact uncountable. In fact, there are an uncountable number of problems with a yes or no answer. Therefore, there exist problems that cannot be solved by a computer. Here is an example of a problem that cannot be solved by a computer. Find a program that takes as input a problem description and a student’s programming solution. Determine if the student’s program is correct. 4/23/2017