CSCI2110 – Discrete Mathematics Tutorial 8 Propositional Logic Wong Chung Hoi (Hollis) 26-10-2011.

Slides:



Advertisements
Similar presentations
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
Advertisements

PROOF BY CONTRADICTION
Tutorial 1: Logic Peter Poon. Self Introduction You can call me Peter Office: SHB117 Office hour:
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
CS128 – Discrete Mathematics for Computer Science
Logic 1 Statements and Logical Operators. Logic Propositional Calculus – Using statements to build arguments – Arguments are based on statements or propositions.
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
From Chapter 4 Formal Specification using Z David Lightfoot
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Discrete Mathematics Math 6A Instructor: M. Welling.
Introduction to Logic Logical Form: general rules
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
Adapted from Discrete Math
Propositions and Truth Tables
Discrete Maths 2. Propositional Logic Objective
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.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
CSci 2011 Discrete Mathematics Lecture 6
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 3 September 15, 2009 Mathematical Review Security Policies.
Thinking Mathematically
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
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.
Chapter 1: The Foundations: Logic and Proofs
Chapter 1: The Foundations: Logic and Proofs
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Thinking Mathematically Logic 3.4 Truth Tables for the Conditional and Biconditional.
The Logic of Boolean Connectives Chapter 4 Language, Proof and Logic.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Law of logic Lecture 4.
Simple Logic.
Truth Tables for Negation, Conjunction, and Disjunction
2. The Logic of Compound Statements Summary
Propositional Logic.
The Foundations: Logic and Proofs
DISCRETE MATHEMATICS CHAPTER I.
Lecture 1 – Formal Logic.
Thinking Mathematically
Truth Tables and Equivalent Statements
COMP 1380 Discrete Structures I Thompson Rivers University
MATH 245 Spring 2009 This is mathematics for computer science
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Discrete Mathematics Lecture # 2.
Mathematics for Computing
CMSC Discrete Structures
Propositional Calculus: Boolean Algebra and Simplification
Propositional Equivalences
Information Technology Department
CS 220: Discrete Structures and their Applications
CS201: Data Structures and Discrete Mathematics I
Applied Discrete Mathematics Week 1: Logic
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Discrete Mathematics Lecture 2: Propositional Logic
MAT 3100 Introduction to Proof
Discrete Mathematics Lecture 2: Propositional Logic
Statements of Symbolic Logic
Cs Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
CS201: Data Structures and Discrete Mathematics I
Concepts of Computation
Presentation transcript:

CSCI2110 – Discrete Mathematics Tutorial 8 Propositional Logic Wong Chung Hoi (Hollis)

Agenda Proposition (Statement) Logic Operators Logical formula Problems – Proofing formula – Constructing formula from truth table – Simplifying formula

Proposition (Statement) A sentence that is either TURE or FALSE – = 2. – = 3. – Let’s end the tutorial now. – This tutorial is boring. – Wake up and listen to me! – There are no aliens. – x > 0. – He is handsome. Tautology – proposition that is always true Contradiction – proposition that is always false ?

He has courage! ? This man has courage!

I love bowling!

You are doing it wrong! ? Your way of pretending to be a penguin is wrong!

Agenda Proposition (Statement) Logic Operators Logical formula Problems – Proofing formula – Constructing formula from truth table – Simplifying formula

Logic Operators Let p and q be a proposition. Operators: – Negation – Conjunction – Disjunction – Conditional – Bi-conditional

Negation (NOT) – Flip the truth value. Example: – p: My car is blue. ¬p: My car is not blue. – p: Peter is good.¬p: Peter is not good. – p: 10 > 15.¬p: 10 < 15 or 10 = 15

p: 49% different is a lot ¬p: 49% different is not a lot

p: Elephants are larger than the moon ¬p: Elephants are smaller than or equal size to the moon

Conjunction (AND) – True only when p and q are True Example: – Quiz one is easy and quiz two is difficult. – Peter is so handsome and smart. – Peter is so handsome and Peter is so smart.

Disjunction (OR) – True when either p or q or both are true. Example – I will go with my sister or I will go with my brother.

Exclusive Or (XOR) – True only when either p or q is true but not both Example – Tomorrow is Thursday or tomorrow is Friday.

Conditional (If … then …) – “If p then q” can only be disproved to be false when p really happens but q doesn’t. – p is sufficient condition q. – q is necessary condition p. – “p if q” = “if q then p” – “p only if q” = “if p then q” Example – If tomorrow is hot, I will go swimming. (If tomorrow is cold, you can’t disprove the statement.)

Bi-Conditional (If and only if) – “p if and only if q” can only be disproved when p happens but not q or vice versa. – p (q) is necessary and sufficient condition for q (p) – Example: – A computer program is correct if and only if it produces correct answer for all possible sets of input data

Agenda Proposition (Statement) Logic Operators Logical formula Problems – Proofing formula – Constructing formula from truth table – Simplifying formula

Logical Formula Distribution Laws: De Morgan’s Laws: Absorption Laws:

Agenda Proposition (Statement) Logic Operators Logical formula Problems – Proofing formula – Constructing formula from truth table – Simplifying formula

Proofing logical equivalent 1 By truth table E.g. Show that De Morgan’s law

Proofing logical equivalent 2 By logical rules E.g. Show that De Morgan’s Law

Constructing Formula 1 By using only Find the logical formula for 1.Truth table 2.When will this formula be True? 3.Simplify Exercise: Try to construct an logical formula for,,

Constructing Formula 2 Find the logical formula for 1.Truth table 2.When will this formula be True? 3.Simplify Exercise: Verify the above formula.

Constructing Formula 3 Find the logical formula for 1.Truth table 2.When is this formula True?

Constructing Formula 3 3.Simplify Distribution Laws De Morgan’s law

Simplifying Formula Simplify De Morgan’s law Distribution Laws

Summary What is proposition? Common logical operator. Proving Equivalent of formula. Constructing formula from truth table. Simplifying formula.