Discrete Mathematics Logic.

Slides:



Advertisements
Similar presentations
Rules of Inference Rosen 1.5.
Advertisements

Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Mathematical Reasoning Methods of Proof.
The Foundations: Logic and Proofs
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.
CSE115/ENGR160 Discrete Mathematics 01/26/12 Ming-Hsuan Yang UC Merced 1.
Valid Arguments An argument is a sequence of propositions. All but the final proposition are called premises. The last statement is the conclusion. The.
CS128 – Discrete Mathematics for Computer Science
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Propositional Proofs 2.
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Discrete Structures (DS)
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
CompSci 102 Discrete Math for Computer Science January 24, 2012 Prof. Rodger Slides modified from Rosen.
Rules of Inference Section 1.6. Arguments in Propositional Logic A argument in propositional logic is a sequence of propositions. All but the final proposition.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference.
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
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.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
CSci 2011 Discrete Mathematics Lecture 5 CSci 2011.
Chapter 1, Part III: Proofs With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without.
Chapter 1 Logic and proofs
Chapter 1 Propositional Logic
2. The Logic of Compound Statements Summary
Advanced Algorithms Analysis and Design
Applied Discrete Mathematics Week 5: Mathematical Reasoning
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
CSE15 Discrete Mathematics 01/30/17
Discrete Mathematics Logic.
Discrete Mathematics.
Chapter 1 Logic and Proofs Homework 1 Two merchants publish new marketing campaign to attract more customers. The first merchant launches a motto “Good.
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
Proof Techniques.
Rules of Inference Section 1.6.
Chapter 8 Logic Topics
2 Chapter Introduction to Logic and Sets
CS100: Discrete structures
Information Technology Department
CS201: Data Structures and Discrete Mathematics I
Mathematical Reasoning
Methods of Proof. Methods of Proof Definitions A theorem is a valid logical assertion which can be proved using Axioms: statements which are given.
Deductive Reasoning: Propositional Logic
이산 수학 Discrete Mathematics
CMSC Discrete Structures
CS 220: Discrete Structures and their Applications
Applied Discrete Mathematics Week 1: Logic
CS 103 Discrete Structures
Back to “Serious” Topics…
Inference Rules: Tautologies
1 Chapter An Introduction to Problem Solving
Computer Security: Art and Science, 2nd Edition
1 Chapter An Introduction to Problem Solving
Information Technology Department SKN-SITS,Lonavala.
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
Valid and Invalid Arguments
Mathematical Reasoning
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Presentation transcript:

Discrete Mathematics Logic

Propositions A proposition is a statement or sentence that can be determined to be either true or false (but no both). Examples: The only positive integers that divide 7 are 1 and 7 itself. Buy two tickets for Friday concert. Earth is the only planet in the universe that contains life.

Example Use variable to represent propositions P: 1+1=3 P: It is raining outside P: Today is Tuesday

Connectives If p and q are propositions, new compound propositions can be formed by using connectives Most common connectives: Conjunction (and) ^ Disjunction (or)  Negation (not) ~ Exclusive-OR v Condition (if … then)  Bi-Condition 

Example P: It is raining Q: It is cold Form a new compound statement by combining these two statements P  Q : It is raining and it is cold P  Q : It is raining or it is cold

Truth table of conjunction The truth values of compound propositions can be described by truth tables. Truth table of conjunction P Q is true only when both P and Q are true. P Q P  Q T F

Example Let P = “A decade is 10 years” Let Q = “A millennium is 100 years” P  Q = “A decade is 10 years” and “A millennium is 100 years” If P is true and Q is false then conjunction is false

Truth table of disjunction The truth table of disjunction is p  q is false only when both p and q are false Example: p = "John is a programmer", q = "Mary is a lawyer" p v q = "John is a programmer or Mary is a lawyer" P Q P  Q T F

Negation Negation of P: in symbols ~P or ⌐P ~P is false when P is true, ~P is true when P is false Example, P : "John is a programmer" ~P = "John is not a programmer" P ~P T F

E.g P: Paris is the capital of England ~P: Paris is not capital of England

Exclusive disjunction “Either P or Q” (but not both), in symbols P  Q P  Q is true only when P is true and Q is false, or P is false and Q is true. Example: p = "John is programmer, q = "Mary is a lawyer" p v q = "Either John is a programmer or Mary is a lawyer" P Q P v Q T F

More compound statements Let p, q, r be simple statements We can form other compound statements, such as (pq)^r p(q^r) (~p)(~q) (pq)^(~r) and many others…

Example: truth table of (P Q)R

Conditional propositions A conditional proposition is of the form “If P then Q” In symbols: P  Q Example: P = " A bottle contains acid" Q = “A bottle has a label” P  Q = “If a bottle contains acid then it has a label "

P  Q is true when both p and q are true Truth table of P  Q P Q P  Q T F P  Q is true when both p and q are true or when P is false

Example If the mathematics department gets an additional $40,000 then it will hire one new faculty member. Let P: The Mathematics Department gets an additional $40,000 and Q: The mathematics Department will hire one new faculty member.

Hypothesis and conclusion In a conditional proposition P  Q, P is called the hypothesis Q is called the conclusion

Example For all real number x if x > 0 then x2 > 0 For example x=3 , 3 > 0 then 32 > 0 both are true. x=-2 , -2 > 0 is false but -22 > 0

Logical equivalence Two propositions are said to be logically equivalent if their truth tables are identical. Example: ~P  Q is logically equivalent to P  Q P Q ~P  Q P  Q T F

Converse The converse of p  q is q  p These two propositions are not logically equivalent p q p  q q  p T F

They are logically equivalent. Contrapositive The contrapositive of the proposition p  q is ~q  ~p. They are logically equivalent. p q p  q ~q  ~p T F

p  q is logically equivalent to (p  q)^(q  p) Bi-Conditional The double implication “p if and only if q” is defined in symbols as p  q p  q is logically equivalent to (p  q)^(q  p) p q p  q (p  q) ^ (q  p) T F

Tautology A proposition is a tautology if its truth table contains only true values for every case Example: p  p v q p q p  p v q T F

Contradiction A proposition is a tautology if its truth table contains only false values for every case Example: p ^ ~p p p ^ (~p) T F

De Morgan’s laws for logic The following pairs of propositions are logically equivalent: ~ (p  q) and (~p)^(~q) ~ (p ^ q) and (~p)  (~q)

Quantifiers A propositional function P(x) is a statement involving a variable x For example: P(x): 2x is an even integer x is an element of a set D For example, x is an element of the set of integers D is called the domain of P(x)

For every and for some Most statements in mathematics and computer science use terms such as for every and for some. For example: For every triangle T, the sum of the angles of T is 180 degrees. For every integer n, n is less than p, for some prime number p.

Universal quantifier One can write P(x) for every x in a domain D In symbols: x P(x)  is called the universal quantifier

Inference Or Deduction An argument is a sequence of propositions written as below : p1, p2 , p3 , p4 , p5 ,,…, , pn, therefore q. (if p1v p2v,.., pn then q) or (if p1 ^p2 ^,.., pn then q) the propositions p1, .., pn, are called hypotheses (premises) and proposition q is called conclusion (consequent). The above argument is valid if the consequent can be proven from the premises. Validity can be shown using truth table or by using theorems / rules.

Rules of Inference Addition p , therefore p v q Simplification (read as if we know p is true, therefore we know p or q is true) Simplification p ^ q , therefore p Conjunction p , q , therefore p ^ q

Rules of Inference (contd..) Modus Ponens p  q , p, therefore q Modus Tollens ~ q, p  q , therefore ~p Hypothetical Syllogism p  q, q  r, therefore p  r Disjunctive Syllogism p v q , ~ p, therefore q Resolution p v q, ~ p v r , therefore q v r

Example State which rule of inference is the basis of the following argument : “ It is below freezing now. Therefore it is either below freezing or raining now.” - addition rule “It is below freezing and raining now. Therefore, it is below freezing now. “ - simplification rule “Rules : If it snows today, then we will go skiing” Fact : it snows today. Conclude: We will go skiing” - modus ponens

Problem Show that the hypotheses : “ It is not sunny this afternoon and it is colder than yesterday.” Will conclude : “We will be home by sunset “ Given the following fact : “We will go swimming only if it is sunny. If we do not go swimming, then we will take a canoe trip. If we take a canoe trip we will be home by sunset”