Exercises for CS3511 Week 31 (first week of practical) Propositional Logic.

Slides:



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

Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
Truth Tables How to Make and Use. Making a Truth Table To determine the number of rows other than the heading row. To determine the number of rows other.
Propositional Equivalences
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
Disjunctive Normal Form CS 680: Formal Methods Jeremy Johnson.
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Logic 1 Statements and Logical Operators. Logic Propositional Calculus – Using statements to build arguments – Arguments are based on statements or propositions.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Chapter 9: Boolean Algebra
Discrete Mathematics Math 6A Instructor: M. Welling.
EE1J2 – Discrete Maths Lecture 5
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.
Discussion #10 1/16 Discussion #10 Logical Equivalences.
Propositional Equivalence Goal: Show how propositional equivalences are established & introduce the most important such equivalences.
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.
CSCI2110 – Discrete Mathematics Tutorial 8 Propositional Logic Wong Chung Hoi (Hollis)
Propositions and Truth Tables
The Foundations: Logic and Proofs
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Propositional Equivalences
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
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)
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
CS6133 Software Specification and Verification
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
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
 To combine propositions using connectives  To construct the truth table of a given compound proposition  To define de Morgan Law for logic  To define.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
CS-7081 Application - 1. CS-7082 Example - 2 CS-7083 Simplifying a Statement – 3.
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
The Foundations: Logic and Proofs
DISCRETE MATHEMATICS CHAPTER I.
Thinking Mathematically
Truth Tables and Equivalent Statements
Chapter 1 – Logic and Proof
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Discussion #10 Logical Equivalences
Discrete Mathematics Lecture # 2.
Disjunctive Normal Form
CMSC Discrete Structures
Propositional Logic.
Chapter 8 Logic Topics
Propositional Calculus: Boolean Algebra and Simplification
Elementary Metamathematics
Propositional Equivalences
Information Technology Department
Propositional Equivalence (§1.2)
Propositional Equivalences
CSE 311 Foundations of Computing I
TRUTH TABLES.
CS 220: Discrete Structures and their Applications
TRUTH TABLES continued.
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Lecture 2: Propositional Equivalences
Logical Truth To show a statement A is a logic truth (tautology) ...
The Foundations: Logic and Proofs
Presentation transcript:

Exercises for CS3511 Week 31 (first week of practical) Propositional Logic

Exercise 1 1. Express each formula using only (at most) the connectives listed. In each case use a truth table to prove the equivalence. (Note:  is exclusive `or`) a.Formula: p  q. Connectives: { ,  }. b.Formula: p  q. Connectives: { , ,  }. c.Formula: p  q. Connectives: { ,  }. d.Formula: (p  q)  ((  p)  q). Conn: { ,  }. e.Formula:  p. Conn: { | } (the Sheffer stroke).

Answer to Exercise 1. (Other answers possible) a. Formula p  q. Connectives: { ,  }. Answer:  p  q b.Formula: p  q. Connectives: { , ,  }. Answer: (p   q)  (q   p) c. Formula: p  q. Connectives: { ,  }. Answer: (p  q)  (q  p) d. Formula: (p  q)  ((  p)  q). Conn: { ,  }. Answer: q (This was a trick question, since you don’t need any connectives.) e. Formula:  p. Conn: { | } (the Sheffer stroke). Answer: p|p

Ex. 2. Which of these are tautologies? 1.p  (q  p) 2.p  (  p  p) 3.(q  p)  (p  q) 4.(q  p)  (p  q) 5.(p  (q  r))  (q  (p  r)) Please prove your claims, using truth tables. (Hint: Ask what assignment of truth values to p,q, and r would falsify each formula. In this way you can disregard parts of the truth table).

Answer to Ex.2 1.p  (q  p) Tautologous 2.p  (  p  p) Tautologous 3.(q  p)  (p  q) Contingent 4.(q  p)  (p  q) Tautologous 5.(p  (q  r))  (q  (p  r)) Tautologous 1,2,4,5 are known as “ ’paradoxes’ of implication”, because they contrast with implication in ordinary language.

Ex. 3a. Reading formulas off truth tables Background: In class, a proof was sketched for the claim that every propositional logic formula can be expressed using the connectives { ,  }. The proof proceeded essentially by “reading off” the correct formula off the truth table of any given formula. Task: Use this meticulous method to construct a formula equivalent to p  q.

Answer to Ex. 3a. Steps: 1.Construct the truth table of p  q. 2. Mark those two rows in the table that make p  q TRUE. 3.Corresponding with these two rows, construct a disjunction of two formulas, one of which is (p  q), and the other (q  p). 4.Use the De Morgan Laws to convert this disjunction (p  q)  (q  p) into the quivalent formula  (  (p  q)  (q  p)) [5. Use truth tables again to check that these two formulas are indeed equivalent.]

Ex. 3b. Reading formulas off truth tables As Ex. 3, but with a difference: Task: Use this meticulous method to construct a formula equivalent to p|q. Question : Does this meticulous method always produce the shortest answer (i.e. the shortest formula that is logically equivalent to the original while still only using negation and conjunction)?

Answer to 3b For p|q, we start with the disjunction (p  q)  (q  p)  (  p  q) After getting rid of the disjunctions, this is much lengthier than the logically equivalent formula  (p  q). (Lesson: the procedure in the proof does not always get you the shortest answer.)