CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

Size: px
Start display at page:

Download "CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements"

Transcription

1 CPSC 121: Models of Computation Module 6: Rewriting predicate logic statements

2 Module 6: Rewriting predicate logic statements Pre-class quiz #7 is due March 1st at 19:00. Assigned reading for the quiz: Epp, 4th edition: 4.1, 4.6, Theorem Epp, 3rd edition: 3.1, 3.6, Theorem Rosen, 6th edition: 1.6, (theorem 2 only). Rosen 7th edition: 1.7, 1.8, 4.1 (theorem 2 only). Assignment #3 is now due Tuesday March 6th at 16:00. 2

3 Module 6: Rewriting predicate logic statements Pre-class quiz #8 is tentatively due Thursday March 15th at 19:00 Epp, 4th edition: 12.2, pages 791 to 795. Epp, 3rd edition: 12.2, pages 745 to 747, 752 to 754 Rosen, 6th edition: 12.2 pages 796 to 798, 12.3 Rosen, 7th edition: 13.2 pages 858 to 861,

4 Module 6: Rewriting predicate logic statements By the start of class, you should be able to: Determine the negation of any quantified statement. Given a quantified statement and an equivalence rule, apply the rule to create an equivalent statement (particularly the De Morgan s and contrapositive rules). Prove and disprove quantified statements using the challenge method (Epp, 4th edition, page 119). Apply universal instantiation, universal modus ponens, and universal modus tollens to predicate logic statements that correspond to the rules premises to infer statements implied by the premises. 4

5 Module 6: Rewriting predicate logic statements Quiz 6 feedback: Once again well done overall. Two questions seemed more difficult (next slides). Not much to say about the open-ended question: most people gave correct strategies. Great! 5

6 Module 6: Rewriting predicate logic statements How many of the following statements are log. equivalent to x B y C, P(x) Q(y)? x B y C, ~Q(y) ~P(x) ~ ( x B y C, P(x) ^ ~Q(y)) ~ ( x B y C, ~P(x) v Q(y)) y B x C, P(y) Q(x) a) None of them b) One of them c) Two of them d) Three of them e) All four of them 6

7 Module 6: Rewriting predicate logic statements Which of the following could be the result of applying one of the negation equivalence laws to the statement: x D, Q(x) [( y D, P(x, y)) ~( y D, P(x, y))] a) x D, Q(x) F b) F c) None: we can not apply the law to just the right side of the statement. d) None: the law doesn't match the right side of the statement. 8

8 Module 6: Rewriting predicate logic statements?? How can we? convince ourselves that an algorithm? does what it's supposed to do????????????? CPSC 121: the BIG questions: We continue discussing how to prove various types of predicate logic statements that arise when we discuss algorithm correctness. 10

9 Module 6: Rewriting predicate logic statements By the end of this module, you should be able to: Explore alternate forms of predicate logic statements using the logical equivalences you have already learned plus negation of quantifiers (a generalized form of the De Morgan s Law). 11

10 Module 6: Rewriting predicate logic statements Summary Thinking of quantifiers differently. Transformations: allowed or forbidden? The challenge method. 12

11 Module 6.1: Thinking of quantifiers differently Suppose D contains values x1, x2,..., xn What does x D, P(x) really mean? It's the same as P(x1) ^ P(x2) ^... ^ P(xn). Similarly, x D, P(x) P(x1) v P(x2) v... v P(xn) Thinking of quantifiers this way explains Negation Universal instantiation Universal Modus Ponens, Tollens 13

12 Module 6.1: Thinking of quantifiers differently Negation: ~ x D, P(x) ~(P(x1) ^ P(x2) ^... ^ P(xn)) ~P(x1) v ~P(x2) v... v ~P(xn) x D, ~P(x) ~ x D, P(x) ~(P(x1) v P(x2) v... v P(xn)) ~P(x1) ^ ~P(x2) ^... ^ ~P(xn) x D, ~P(x) 14

13 Module 6.1: Thinking of quantifiers differently What can we do with the negation in: ~ c R+ n0 N n N, n n0 f(n) cg(n)? a) It cannot be moved inward. b) It can only move across one quantifier because the generalized De Morgan s law can only handle one quantifier. c) It can only be moved across all three quantifiers because a negation can't appear between quantifiers. d) It could be moved across one, two or all three quantifiers. e) None of the above. 15

14 Module 6.1: Thinking of quantifiers differently Exercise: Let A be the set of amoebae, and Parent(x,y) be true if amoeba x is amoeba y's parent. Use logical equivalences to show that these two translations of an amoeba has only one parent are logically equivalent: (1) x A, y A, Parent(y, x) ( z A, Parent(z, x) y = z). (2) x A, y A, Parent(y, x) (~ z A, Parent(z, x) y z). 17

15 Module 6: Rewriting predicate logic statements Summary Thinking of quantifiers differently. Transformations: allowed or forbidden? The challenge method. 18

16 Module 6.2: Transformations (allowed or forbidden?) Universal instantiation: ( x D, P(x)) ^ (a D) P(a) Proving it is a valid inference: Suppose x D, P(x) is true. Hence P(x1) ^ P(x2) ^... ^ P(xn) holds. If a = xi is an element of D, then by specialization we have P(xi). 19

17 Module 6.2: Transformations (allowed or forbidden?) Universal modus ponens: Suppose x D, P(x) Q(x) is true. P(xi) holds where xi is an element of D. Hence (P(x1) Q(x1)) ^... ^ (P(xn) Q(xn)). By specialization P(xi) Q(xi) holds. By modus ponens, we deduce Q(xi). The same reasoning explains why universal modus tollens is valid. 20

18 Module 6.2: Transformations (allowed or forbidden?) Consider existential instantiation: x D, P(x) a D \P(a) a) This argument is valid: P(a) is true. b) This argument is invalid: P(a) is false. c) This argument is invalid: P(a) might be false. d) This argument is invalid for another reason. 21

19 Module 6.2: Transformations (allowed or forbidden?) What about existential modus ponens? x D, P(x) Q(x) P(a) \Q(a) a) This argument is valid, and Q(a) is true. b) The argument is valid, but the 1st premise can not be true; so Q(a) might be false. c) This argument is invalid because Q(a) is false. d) The argument is invalid for another reason. 23

20 Module 6.2: Transformations (allowed or forbidden?) Applying logical equivalences to predicate logic: Suppose we have x D, P(x) Q(x) We know that P(x) Q(x) ~P(x) v Q(x) We might want to write x D, ~P(x) v Q(x) Is this valid? 25

21 Module 6.2: Transformations (allowed or forbidden?) Which propositional logic equivalences apply to predicate logic? a) Double negative, Identity, and De Morgan's (not all equivalences!) b) ~(P(x) Q(x)) P(x) ~Q(x) c) Commutative, Associative, and the definition of conditional d) All propositional logic equivalences apply to predicate logic. e) None of the above. 26

22 Module 6.2: Transformations (allowed or forbidden?) Applying rules of inference to predicate logic: Suppose we have x D, P(x) Q(x) We know that x D, P(x) We might want to write x D, Q(x) Is this valid? 28

23 Module 6.2: Transformations (allowed or forbidden?) Which rules of inference apply to predicate logic? a) Modus ponens, modus tollens and elimination only. b) All rules apply, but only if they follow universal quantifiers, not existential quantifiers. c) All rules apply, but only if they follow existential quantifiers, not universal quantifiers. d) All rules apply, no matter what quantifiers are used. e) None of the above. 29

24 Module 6.2: Transformations (allowed or forbidden?) The only rules we really need: Universal Instantiation: for any a in D x D, P(x) P(a) Universal Generalization: P(x) for an arbitrary element x of D x D, P(x) 31

25 Module 6.2: Transformations (allowed or forbidden?) The only rules we really need (continued) Existential Instantiation: x D, P(x) P(w) for an unspecified (new) witness w in D Existential Generalization: P(a) for a given element a of D x D, P(x) 32

26 Module 6: Rewriting predicate logic statements Summary Thinking of quantifiers differently. Transformations: allowed or forbidden? The challenge method. 33

27 Module 6.3: The challenge method The Challenge method: A predicate logic statement is like a game with two players. you (trying to prove the statement true) your adversary (trying to prove it false). The two of you pick values for the quantified variables working from the left to right (i.e. inwards). You pick the values of existentially quantified variables. Your adversary picks the values of universally quantified variables 34

28 Module 6.3: The challenge method The Challenge method (continued): If there is a strategy that allows you to always win, then the statement is true. If there is a strategy for your adversary that allows him/her to always win, then the statement is false. What does it mean to have a winning strategy at Nim? 35

29 Module 6.3: The challenge method Example 1: x Z, n Z+, 2x < n How would we say this in English? How would we prove this theorem? Example 2: n N, x N, n < 2x How would we say this in English? How would we prove this theorem? 36

30 Module 6.3: The challenge method Example 3: x N, n N, n < 2x How would we say this in English? How would we prove this theorem? How do we prove a statement is false? 37

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi is another way of showing that an argument is correct. Definitions: Literal: A variable or a negation of a variable is called a literal. Sum and Product: A disjunction of literals is called a sum and a

More information

Section 2.4: Arguments with Quantified Statements

Section 2.4: Arguments with Quantified Statements Section 2.4: Arguments with Quantified Statements In this section, we shall generalize the ideas we developed in Section 1.3 to arguments which involve quantified statements. Most of the concepts we shall

More information

CPSC 121: Models of Computation. Module 5: Predicate Logic

CPSC 121: Models of Computation. Module 5: Predicate Logic CPSC 121: Models of Computation Module 5: Predicate Logic Module 5: Predicate Logic Midterm 1: Friday February 9 th, 17:00 to 18:15 A to C (by last name): room DMP 310 D to K: room MATH 100 L to P: room

More information

CPSC 121 Midterm 2 Friday November 13th, 2015

CPSC 121 Midterm 2 Friday November 13th, 2015 CPSC 121 Midterm 2 Friday November 13th, 2015 [10] 1. For each of the following statements: Rewrite the statement using predicate logic. Write down ALL of the proof strategies (from the list given below),

More information

Section 2.2: Introduction to the Logic of Quantified Statements

Section 2.2: Introduction to the Logic of Quantified Statements Section 2.2: Introduction to the Logic of Quantified Statements In this section, we shall continue to examine some of the fundamentals of predicate calculus. Specifically, we shall look at the negations

More information

CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00

CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00 CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00 [18] 1. Consider the following predicate logic statement: 9x 2 A, 8y 2 B,9z 2 C, P(x, y, z)! Q(x, y, z), where A, B,

More information

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers.

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers. CSE 240, Fall, 2013 Homework 2 Due, Tuesday September 17. Can turn in class, at the beginning of class, or earlier in the mailbox labelled Pless in Bryan Hall, room 509c. Practice Problems: 1. Consider

More information

THE LOGIC OF QUANTIFIED STATEMENTS

THE LOGIC OF QUANTIFIED STATEMENTS CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 3.4 Arguments with Quantified Statements Copyright Cengage Learning. All rights reserved. Arguments

More information

CSI30. Chapter 1. The Foundations: Logic and Proofs Rules of inference with quantifiers Logic and bit operations Specification consistency

CSI30. Chapter 1. The Foundations: Logic and Proofs Rules of inference with quantifiers Logic and bit operations Specification consistency Chapter 1. The Foundations: Logic and Proofs 1.13 Rules of inference with quantifiers Logic and bit operations Specification consistency 1.13 Rules of inference with quantifiers universal instantiation

More information

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.3 1.4 of Rosen cse235@cse.unl.edu Introduction

More information

CPSC 121: Models of Computation

CPSC 121: Models of Computation CPSC 121: Models of Computation Unit 1 Propositional Logic Based on slides by Patrice Belleville and Steve Wolfman Last Updated: 2017-09-09 12:04 AM Pre Lecture Learning Goals By the start of the class,

More information

CSE 311: Foundations of Computing. Lecture 8: Predicate Logic Proofs

CSE 311: Foundations of Computing. Lecture 8: Predicate Logic Proofs CSE 311: Foundations of Computing Lecture 8: Predicate Logic Proofs Last class: Propositional Inference Rules Two inference rules per binary connective, one to eliminate it and one to introduce it Elim

More information

CSE20: Discrete Mathematics

CSE20: Discrete Mathematics Spring 2018 Summary Last time: Today: Introduction to Basic Set Theory (Vardy) More on sets Connections between sets and logic Reading: Chapter 2 Set Notation A, B, C: sets A = {1, 2, 3}: finite set with

More information

Example: NFA to DFA Conversion

Example: NFA to DFA Conversion CPSC 121 Lecture 36 April 8, 2009 Menu April 8, 2009 Topics: Example: NFA to DFA Conversion Final Reading List Summary The End! Reminders: On-line Quiz 12 deadline 5:00pm TODAY Teaching evaluation survey

More information

Math 2300, Section #1; 14:00-15:15 MW P-101; Daily Notes Fall, 2015

Math 2300, Section #1; 14:00-15:15 MW P-101; Daily Notes Fall, 2015 Day One: Mon, Aug 24, 2015 * Take Roll * Tell students that they are required to carefully read the entire course description on line (or request a printed full copy if not able to read on line) * Go over

More information

Homework 1 CS 1050 A Due:

Homework 1 CS 1050 A Due: 9-4-08 Homework 1 CS 1050 A Due: 9-11-08 Every assignment will be due at the beginning of class. Recall that you can collaborate in groups and/or use external references, but you must acknowledge the group/references

More information

CS 4700: Artificial Intelligence

CS 4700: Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 16 Cornell Cinema Thursday, April 13 7:00pm Friday, April 14 7:00pm Sunday, April 16 4:30pm Cornell Cinema

More information

Automatic Reasoning (Section 8.3)

Automatic Reasoning (Section 8.3) Automatic Reasoning (Section 8.3) Automatic Reasoning Can reasoning be automated? Yes, for some logics, including first-order logic. We could try to automate natural deduction, but there are many proof

More information

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson Lecture Notes 15 Number systems and logic CSS 501 - Data Structures and Object-Oriented Programming Professor Clark F. Olson Number systems The use of alternative number systems is important in computer

More information

Lee Pike. June 3, 2005

Lee Pike. June 3, 2005 Proof NASA Langley Formal Methods Group lee.s.pike@nasa.gov June 3, 2005 Proof Proof Quantification Quantified formulas are declared by quantifying free variables in the formula. For example, lem1: LEMMA

More information

CSE Discrete Structures

CSE Discrete Structures CSE 2315 - Discrete Structures Lecture 5: Predicate Logic- Fall 2010 1 Motivation The use of predicates, variables, and quantifiers allows to represent a large number of arguments and expressions in formal

More information

CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4

CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4 CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University Name: ID#: Section #: Score: / 4 Unit 14: Set Theory: Definitions and Properties 1. Let C = {n Z n = 6r 5 for

More information

THE PREDICATE CALCULUS

THE PREDICATE CALCULUS 2 THE PREDICATE CALCULUS Slide 2.1 2.0 Introduction 2.1 The Propositional Calculus 2.2 The Predicate Calculus 2.3 Using Inference Rules to Produce Predicate Calculus Expressions 2.4 Application: A Logic-Based

More information

Resolution (14A) Young W. Lim 6/14/14

Resolution (14A) Young W. Lim 6/14/14 Copyright (c) 2013-2014. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free

More information

Strategies for Proofs

Strategies for Proofs Strategies for Proofs Landscape with House and Ploughman Van Gogh Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 Goals of this lecture A bit more logic Reviewing Implication

More information

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 9 Normal Forms In the last class we have seen some consequences and some equivalences,

More information

Solutions to Selected Exercises

Solutions to Selected Exercises Chapter 1 Solutions to Selected Exercises Section 1.1 2. {2, 4} 3. {7, 10} 5. {2, 3, 5, 6, 8, 9} 6. {1, 3, 5, 7, 9, 10} 8. A 9. 11. B 12. {1, 4} 14. {1} 15. {2, 3, 4, 5, 6, 7, 8, 9, 10} 18. 1 19. 3 22.

More information

Automated Reasoning PROLOG and Automated Reasoning 13.4 Further Issues in Automated Reasoning 13.5 Epilogue and References 13.

Automated Reasoning PROLOG and Automated Reasoning 13.4 Further Issues in Automated Reasoning 13.5 Epilogue and References 13. 13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution Theorem Proving 13.3 PROLOG and Automated Reasoning 13.4

More information

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science

More information

8. Negation 8-1. Deductive Databases and Logic Programming. (Sommer 2017) Chapter 8: Negation

8. Negation 8-1. Deductive Databases and Logic Programming. (Sommer 2017) Chapter 8: Negation 8. Negation 8-1 Deductive Databases and Logic Programming (Sommer 2017) Chapter 8: Negation Motivation, Differences to Logical Negation Syntax, Supported Models, Clark s Completion Stratification, Perfect

More information

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

STABILITY AND PARADOX IN ALGORITHMIC LOGIC STABILITY AND PARADOX IN ALGORITHMIC LOGIC WAYNE AITKEN, JEFFREY A. BARRETT Abstract. Algorithmic logic is the logic of basic statements concerning algorithms and the algorithmic rules of deduction between

More information

6.034 Notes: Section 10.1

6.034 Notes: Section 10.1 6.034 Notes: Section 10.1 Slide 10.1.1 A sentence written in conjunctive normal form looks like ((A or B or not C) and (B or D) and (not A) and (B or C)). Slide 10.1.2 Its outermost structure is a conjunction.

More information

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday For next Tuesday Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday Any questions? Program 1 Imperfect Knowledge What issues arise when we don t know

More information

Introduction to dependent types in Coq

Introduction to dependent types in Coq October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.

More information

Knowledge & Reasoning

Knowledge & Reasoning Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of representing large bodies of knowledge 1 Logical

More information

Predicate Logic CHAPTER What This Chapter Is About

Predicate Logic CHAPTER What This Chapter Is About CHAPTER 14 Predicate Logic We now turn our attention to a generalization of propositional logic, called predicate, or first-order, logic. Predicates are functions of zero or more variables that return

More information

CSE 215: Foundations of Computer Science Recitation Exercises Set #4 Stony Brook University. Name: ID#: Section #: Score: / 4

CSE 215: Foundations of Computer Science Recitation Exercises Set #4 Stony Brook University. Name: ID#: Section #: Score: / 4 CSE 215: Foundations of Computer Science Recitation Exercises Set #4 Stony Brook University Name: ID#: Section #: Score: / 4 Unit 7: Direct Proof Introduction 1. The statement below is true. Rewrite the

More information

CSC Discrete Math I, Spring Sets

CSC Discrete Math I, Spring Sets CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ). MATH 139 W12 Review 1 Checklist 1 Exam Checklist 1. Introduction to Predicates and Quantified Statements (chapters 3.1-3.4). universal and existential statements truth set negations of universal and existential

More information

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH WINTER CSE 20 DISCRETE MATH WINTER 2016 http://cseweb.ucsd.edu/classes/wi16/cse20-ab/ Today's learning goals Explain the steps in a proof by (strong) mathematical induction Use (strong) mathematical induction

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning

More information

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics 400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {

More information

An Introduction to Programming and Proving in Agda (incomplete draft)

An Introduction to Programming and Proving in Agda (incomplete draft) An Introduction to Programming and Proving in Agda (incomplete draft) Peter Dybjer January 29, 2018 1 A first Agda module Your first Agda-file is called BoolModule.agda. Its contents are module BoolModule

More information

Answer Key #1 Phil 414 JL Shaheen Fall 2010

Answer Key #1 Phil 414 JL Shaheen Fall 2010 Answer Key #1 Phil 414 JL Shaheen Fall 2010 1. 1.42(a) B is equivalent to B, and so also to C, where C is a DNF formula equivalent to B. (By Prop 1.5, there is such a C.) Negated DNF meets de Morgan s

More information

Mathematics for Computer Science Exercises from Week 4

Mathematics for Computer Science Exercises from Week 4 Mathematics for Computer Science Exercises from Week 4 Silvio Capobianco Last update: 26 September 2018 Problems from Section 4.1 Problem 4.3. Set Formulas and Propositional Formulas. (a) Verify that the

More information

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence Knowledge Representation CS 486/686: Introduction to Artificial Intelligence 1 Outline Knowledge-based agents Logics in general Propositional Logic& Reasoning First Order Logic 2 Introduction So far we

More information

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee Sets Mukulika Ghosh Fall 2018 Based on slides by Dr. Hyunyoung Lee Sets Sets A set is an unordered collection of objects, called elements, without duplication. We write a A to denote that a is an element

More information

Lecture 2: Analyzing Algorithms: The 2-d Maxima Problem

Lecture 2: Analyzing Algorithms: The 2-d Maxima Problem Lecture 2: Analyzing Algorithms: The 2-d Maxima Problem (Thursday, Jan 29, 1998) Read: Chapter 1 in CLR. Analyzing Algorithms: In order to design good algorithms, we must first agree the criteria for measuring

More information

(d) If the moon shares nothing and the sun does not share our works, then the earth is alive with creeping men.

(d) If the moon shares nothing and the sun does not share our works, then the earth is alive with creeping men. Math 15 - Spring 17 Chapters 1 and 2 Test Solutions 1. Consider the declaratives statements, P : The moon shares nothing. Q: It is the sun that shares our works. R: The earth is alive with creeping men.

More information

Summary of Course Coverage

Summary of Course Coverage CS-227, Discrete Structures I Spring 2006 Semester Summary of Course Coverage 1) Propositional Calculus a) Negation (logical NOT) b) Conjunction (logical AND) c) Disjunction (logical inclusive-or) d) Inequalities

More information

Honors Geometry KEY Review Exercises for the December Exam

Honors Geometry KEY Review Exercises for the December Exam Honors Geometry KEY Review Exercises for the December Exam Here is a miscellany of exercises to help you prepare for the semester examination. You should also use your class notes, homework, quizzes, and

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding

More information

CS221 / Autumn 2017 / Liang & Ermon. Lecture 17: Logic II

CS221 / Autumn 2017 / Liang & Ermon. Lecture 17: Logic II CS221 / Autumn 2017 / Liang & Ermon Lecture 17: Logic II Review: ingredients of a logic Syntax: defines a set of valid formulas (Formulas) Example: Rain Wet Semantics: for each formula, specify a set of

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam

More information

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010 (More) Propositional Logic and an Intro to Predicate Logic CSCI 3202, Fall 2010 Assignments Next week: Guest lectures (Jim Martin and Nikolaus Correll); Read Chapter 9 (but you can skip sections on logic

More information

LECTURE 2 An Introduction to Boolean Algebra

LECTURE 2 An Introduction to Boolean Algebra IST 210: Boot Camp Ritendra Datta LECTURE 2 An Introduction to Boolean Algebra 2.1. Outline of Lecture Fundamentals Negation, Conjunction, and Disjunction Laws of Boolean Algebra Constructing Truth Tables

More information

CIS 194: Homework 8. Due Wednesday, 8 April. Propositional Logic. Implication

CIS 194: Homework 8. Due Wednesday, 8 April. Propositional Logic. Implication CIS 194: Homework 8 Due Wednesday, 8 April Propositional Logic In this section, you will prove some theorems in Propositional Logic, using the Haskell compiler to verify your proofs. The Curry-Howard isomorphism

More information

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation Chapter 1.3 Quantifiers, Predicates, and Validity Reading: 1.3 Next Class: 1.4 1 Motivation Propositional logic allows to translate and prove certain arguments from natural language If John s wallet was

More information

Algebra of Sets (Mathematics & Logic A)

Algebra of Sets (Mathematics & Logic A) Algebra of Sets (Mathematics & Logic A) RWK/MRQ October 28, 2002 Note. These notes are adapted (with thanks) from notes given last year by my colleague Dr Martyn Quick. Please feel free to ask me (not

More information

COMP combinational logic 1 Jan. 18, 2016

COMP combinational logic 1 Jan. 18, 2016 In lectures 1 and 2, we looked at representations of numbers. For the case of integers, we saw that we could perform addition of two numbers using a binary representation and using the same algorithm that

More information

Honors Geometry KEY Review Exercises for the January Exam

Honors Geometry KEY Review Exercises for the January Exam Honors Geometry KEY Review Exercises for the January Exam Here is a miscellany of exercises to help you prepare for the semester examination. You should also use your class notes, homework, quizzes, and

More information

CPSC 121: Models of Computation. Module 3: Representing Values in a Computer

CPSC 121: Models of Computation. Module 3: Representing Values in a Computer CPSC 121: Models of Computation in a Computer The 4th online quiz is due Thursday, January 22nd at 19:. Assigned reading for the quiz: Epp, 4th edition: 2.3 Epp, 3rd edition: 1.3 Rosen, 6th edition: 1.5

More information

Lecture 4: January 12, 2015

Lecture 4: January 12, 2015 32002: AI (First Order Predicate Logic, Interpretation and Inferences) Spring 2015 Lecturer: K.R. Chowdhary Lecture 4: January 12, 2015 : Professor of CS (VF) Disclaimer: These notes have not been subjected

More information

Lecture 7: January 15, 2014

Lecture 7: January 15, 2014 32002: AI (First order Predicate Logic, Syntax and Semantics) Spring 2014 Lecturer: K.R. Chowdhary Lecture 7: January 15, 2014 : Professor of CS (GF) Disclaimer: These notes have not been subjected to

More information

Range Restriction for General Formulas

Range Restriction for General Formulas Range Restriction for General Formulas 1 Range Restriction for General Formulas Stefan Brass Martin-Luther-Universität Halle-Wittenberg Germany Range Restriction for General Formulas 2 Motivation Deductive

More information

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012 CMPSCI 250: Introduction to Computation Lecture #7: Quantifiers and Languages 6 February 2012 Quantifiers and Languages Quantifier Definitions Translating Quantifiers Types and the Universe of Discourse

More information

DISCRETE MATHEMATICS

DISCRETE MATHEMATICS DISCRETE MATHEMATICS WITH APPLICATIONS THIRD EDITION SUSANNA S. EPP DePaul University THOIVISON * BROOKS/COLE Australia Canada Mexico Singapore Spain United Kingdom United States CONTENTS Chapter 1 The

More information

(Refer Slide Time 3:31)

(Refer Slide Time 3:31) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 5 Logic Simplification In the last lecture we talked about logic functions

More information

Proofwriting Checklist

Proofwriting Checklist CS103 Winter 2019 Proofwriting Checklist Cynthia Lee Keith Schwarz Over the years, we ve found many common proofwriting errors that can easily be spotted once you know how to look for them. In this handout,

More information

Formal Predicate Calculus. Michael Meyling

Formal Predicate Calculus. Michael Meyling Formal Predicate Calculus Michael Meyling May 24, 2013 2 The source for this document can be found here: http://www.qedeq.org/0_04_07/doc/math/qedeq_formal_logic_v1.xml Copyright by the authors. All rights

More information

Solutions to In-Class Problems Week 1, Fri

Solutions to In-Class Problems Week 1, Fri Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr. Radhika Nagpal Solutions to In-Class Problems Week 1, Fri Problem 1. Translate

More information

What is the study of logic?

What is the study of logic? Chapter 2: The Representation of Knowledge Expert Systems: Principles and Programming, Fourth Edition What is the study of logic? Logic is the study of making inferences given a set of facts, we attempt

More information

Predicate Logic and Quan0fies

Predicate Logic and Quan0fies Predicate Logic and Quan0fies Sec0ons 1.4, and 1.5 of Rosen Spring 2017 CSCE 235H Introduc7on to Discrete Structures (Honors) Course web-page: cse.unl.edu/~cse235h All ques7ons: Piazza LaTeX Using the

More information

Spring 2018 CSE191 Midterm Exam I

Spring 2018 CSE191 Midterm Exam I Plagiarism of any sort on this exam will result in you being given an F in the course. In addition, a request will be made to have you expelled from the university. For each question, circle the correct

More information

SYSC 2006 C Winter 2012

SYSC 2006 C Winter 2012 SYSC 2006 C Winter 2012 Pointers and Arrays Copyright D. Bailey, Systems and Computer Engineering, Carleton University updated Sept. 21, 2011, Oct.18, 2011,Oct. 28, 2011, Feb. 25, 2011 Memory Organization

More information

Artificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig.

Artificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig. Artificial Intelligence Chapters Reviews Readings: Chapters 3-8 of Russell & Norvig. Topics covered in the midterm Solving problems by searching (Chap. 3) How to formulate a search problem? How to measure

More information

AXIOMS FOR THE INTEGERS

AXIOMS FOR THE INTEGERS AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,

More information

Assignment # 4 Selected Solutions

Assignment # 4 Selected Solutions Assignment # 4 Selected Solutions Problem 2.3.3 Let G be a connected graph which is not a tree (did you notice this is redundant?) and let C be a cycle in G. Prove that the complement of any spanning tree

More information

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g; Chapter 5 Set Theory 5.1 Sets and Operations on Sets Preview Activity 1 (Set Operations) Before beginning this section, it would be a good idea to review sets and set notation, including the roster method

More information

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012 University of Illinois at Chicago Department of Computer Science Final Examination CS 151 Mathematical Foundations of Computer Science Fall 2012 Thursday, October 18, 2012 Name: Email: Print your name

More information

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques Lecture 17 of 41 Clausal (Conjunctive Normal) Form and Resolution Techniques Wednesday, 29 September 2004 William H. Hsu, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Chapter 9,

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1 CS 70 Discrete Mathematics for CS Fall 2000 Wagner MT1 Sol Solutions to Midterm 1 1. (16 pts.) Theorems and proofs (a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are

More information

Back to the knights and knaves island

Back to the knights and knaves island Back to the knights and knaves island During your Thanksgiving trip, you found another island with knights and knaves (you have a feeling that you may encounter many such islands this semester). Knights

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.6 Indirect Argument: Contradiction and Contraposition Copyright Cengage Learning. All

More information

Basic Foundations of Isabelle/HOL

Basic Foundations of Isabelle/HOL Basic Foundations of Isabelle/HOL Peter Wullinger May 16th 2007 1 / 29 1 Introduction into Isabelle s HOL Why Type Theory Basic Type Syntax 2 More HOL Typed λ Calculus HOL Rules 3 Example proof 2 / 29

More information

The current topic: Prolog. Announcements. Meaning of a Prolog rule. Prolog syntax. Reminder: The deadline for Lab 2 re-mark requests is Friday.

The current topic: Prolog. Announcements. Meaning of a Prolog rule. Prolog syntax. Reminder: The deadline for Lab 2 re-mark requests is Friday. The current topic: Prolog! Introduction! Object-oriented programming: Python! Functional programming: Scheme! Python GUI programming (Tkinter)! Types and values Logic programming: Prolog! Introduction

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.3 Direct Proof and Counterexample III: Divisibility Copyright Cengage Learning. All rights

More information

CS173 Longest Increasing Substrings. Tandy Warnow

CS173 Longest Increasing Substrings. Tandy Warnow CS173 Longest Increasing Substrings Tandy Warnow CS 173 Longest Increasing Substrings Tandy Warnow Today s material The Longest Increasing Subsequence problem DP algorithm for finding a longest increasing

More information

Foundations of Computation

Foundations of Computation Foundations of Computation Second Edition (Version 2.3.2, Summer 2011) Carol Critchlow and David Eck Department of Mathematics and Computer Science Hobart and William Smith Colleges Geneva, New York 14456

More information

Today s Lecture 4/13/ WFFs/ Free and Bound Variables 9.3 Proofs for Pred. Logic (4 new implicational rules)!

Today s Lecture 4/13/ WFFs/ Free and Bound Variables 9.3 Proofs for Pred. Logic (4 new implicational rules)! Today s Lecture 4/13/10 9.1 WFFs/ Free and Bound Variables 9.3 Proofs for Pred. Logic (4 new implicational rules)! Announcements Welcome Back! Answers to latest symbolizations HW are posted on-line Homework:

More information

Notes on Predicate Calculus

Notes on Predicate Calculus Notes on Predicate Calculus by Charles Lin c Charles Lin 2000 All rights reserved 1 Propositional Calculus Enough Propositional calculus is good enough to describe certain kinds of reasoning, but it is

More information

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman.

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman. The three faces of homotopy type theory Type theory and category theory Michael Shulman 1 A programming language. 2 A foundation for mathematics based on homotopy theory. 3 A calculus for (, 1)-category

More information

Mathematical Logic Part Two

Mathematical Logic Part Two Mathematical Logic Part Two Recap from Last Time Recap So Far A propositional variable is a variable that is either true or false. The propositional connectives are as follows: Negation: p Conjunction:

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.3 Direct Proof and Counterexample III: Divisibility Copyright Cengage Learning. All rights

More information

CS 416, Artificial Intelligence Midterm Examination Fall 2004

CS 416, Artificial Intelligence Midterm Examination Fall 2004 CS 416, Artificial Intelligence Midterm Examination Fall 2004 Name: This is a closed book, closed note exam. All questions and subquestions are equally weighted. Introductory Material 1) True or False:

More information

Propositional logic (Ch. 7)

Propositional logic (Ch. 7) Propositional logic (Ch. 7) Announcements Writing 3 due Sunday - ideally use for project - if you haven't decided project by then, you will have to redo this work Logic: definitions We say that two sentences

More information

Mathematical Logic Part Two

Mathematical Logic Part Two Mathematical Logic Part Two A Note on the Career Fair Recap from Last Time Recap So Far A propositional variable is a variable that is either true or false. The propositional connectives are as follows:

More information

Note: For #10 I have written out the solutions in more detail than you would be required to give.

Note: For #10 I have written out the solutions in more detail than you would be required to give. Math 218 Spring 2010 Homework 4 Solutions Section 1.5 Note: For #10 I have written out the solutions in more detail than you would be required to give. 10) For each of these sets of premises, what relevant

More information