CSE Discrete Structures

Similar documents
CSE Discrete Structures

Math 3336: Discrete Mathematics Practice Problems for Exam I

Predicate Logic. Andreas Klappenecker

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

2. Use quantifiers to express the associative law for multiplication of real numbers.

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

ECOM Discrete Mathematics

Rules Build Arguments Rules Building Arguments

software design & management Gachon University Chulyun Kim

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. March 1, :00 pm Duration: 1:15 hs

Logic Overview, I. and T T T T F F F T F F F F

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

PROPOSITIONAL CALCULUS

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Denote John by j and Smith by s, is a bachelor by predicate letter B. The statements (1) and (2) may be written as B(j) and B(s).

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Intro to Logic and Proofs

Section 1.1 Propositions

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class)

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Discrete Mathematics Recitation Course 張玟翔

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

CS 214 Introduction to Discrete Structures. Chapter 1 Formal Logic. Mikel D. Petty, Ph.D.

Predicate Logic. Predicates. Math 173 February 9, 2010

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Foundations of Mathematics Worksheet 2

Supplementary Logic Notes CSE 321 Winter 2009

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Logic for Computer Scientists

Logic for Computer Scientists

Predicate Logic & Quantification

1 The Foundation: Logic and Proofs

A. Propositional Logic

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Math 55 Homework 2 solutions

CSE 20: Discrete Mathematics

Class Notes in Computer Science (First Edition)

1 The Foundation: Logic and Proofs

CS0441 Discrete Structures Recitation 3. Xiang Xiao

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Introduction to Sets and Logic (MATH 1190)

Discrete Mathematics for CS Spring 2006 Forbes HW 1 Solutions

ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Chapter 1 Elementary Logic

Do not start until you are given the green signal

Logic Part I: Classical Logic and Its Semantics

STRATEGIES OF PROBLEM SOLVING

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

MAT 243 Test 1 SOLUTIONS, FORM A

DISCRETE MATHEMATICS BA202

CSE 311: Foundations of Computing. Lecture 6: More Predicate Logic

Logic for Computer Scientists

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

Homework assignment 1: Solutions

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Review for Midterm 1. Andreas Klappenecker

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Rules of Inference. Arguments and Validity

ICS141: Discrete Mathematics for Computer Science I

Propositional Logic Not Enough

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Readings: Conjecture. Theorem. Rosen Section 1.5

The Logic of Compound Statements cont.

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

CPSC 121: Models of Computation

Section 1.2: Propositional Logic

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

Propositional Logic. Spring Propositional Logic Spring / 32

Chapter 1: The Logic of Compound Statements. January 7, 2008

03 Propositional Logic II

First order Logic ( Predicate Logic) and Methods of Proof

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

COMP 2600: Formal Methods for Software Engineeing

Review: Potential stumbling blocks

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Predicate Calculus - Syntax

Propositional Logic: Syntax

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Propositional Logic: Review

Mat 243 Exam 1 Review

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

Packet #1: Logic & Proofs. Applied Discrete Mathematics

1.1 Language and Logic

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Review 1. Andreas Klappenecker

CITS2211 Discrete Structures Proofs

MAT2345 Discrete Math

Transcription:

CSE 2315 - Discrete Structures Homework 1- Fall 2010 Due Date: Sept. 16 2010, 3:30 pm Statements, Truth Values, and Tautologies 1. Which of the following are statements? a) 3 + 7 = 10 b) All cars are blue. c) It will rain on Wednesday. d) There are more insects than mammals. e) Is the sun shining right now? f) x 3 < 7 g) 7 4 = 9 h) Is John at home? 2. Construct the truth tables for the following expressions and determine if they are tautologies or contradictions. a) A B A b) ((A B) C) C c) A (C B) C C A d) (A (A B) (B B) e) A B C f) A B (B A) 3. Let M, R, S, F, and C be the following statements: M R S F C Mary likes dogs Cats run away from dogs Cats are smaller than dogs Dogs are fast Dogs chase cats 2010 Manfred Huber Page 1

Translate the following compound statements into symbolic notation. a) Cats are smaller than dogs and run away from them. b) If cats run away from dogs then dogs chase them. c) Only if dogs chase cats do cats run away from dogs. d) Dogs are fast and cats run away from dogs if and only if dogs chase cats. e) Mary likes dogs only if dogs do not chase cats. f) If cats are smaller than dogs and dogs are fast then cats run away from dogs and dogs chase them. Translate the following symbolic statements into English. g) M R C h) R F C i) F M R C j) F (R C) M k) F C l) S R C M Proofs using Propositional Logic For all your propositional logic proofs you can use only the rules given in the following tables. In addition you are allowed to apply the deduction method. All other rules have to be proven first. Equivalence Rules Rule Name Expression Equivalent Expression Commutativity (comm) P Q Q P P Q Q P Associativity (ass) (P Q) R P (Q R) (P Q) R P (Q R) Distributivity (dis) (P Q) R (P R) (Q R) (P Q) R (P R) (Q R) De Morgan s Laws (De Morgan) (P Q) P Q (P Q) P Q Implication (imp) P Q P Q Double negation (dn) (P ) P 2010 Manfred Huber Page 2

Inference Rules Rule Name From Can Derive Conjunction (con) P, Q P Q Simplification (sim) P Q P, Q Modus ponens (mp) P, P Q Q Modus tollens (mt) P Q, Q P Addition (add) P P Q For all proofs the steps have to be annotated such as to indicate the rule and which elements of the proof sequence it was applied to. 4. Use propositional calculus to prove that the following arguments are valid. a) (A C) C A b) (A (B C)) (B C) A c) (C (A B)) (C B) (C A) B d) (A (B C)) (A B) (A C) (A B C) e) (A (B C)) ((A B) (C D)) A D f) A (B C) (D B E) (C F A) D E 5. Translate the following arguments into symbolic notation and use propositional logic to prove their validity. Your translation has to include a description of all the statement symbols used. a) Only if John and Mary met yesterday could Mary have given John her house keys. Since the book was taken from Mary s house today by either John or Mary without breaking the door, someone with a house key must have taken it. To meet, John and Mary would have had to be in the same place but yesterday Mary was in a different place than John. Therefore Mary must have taken the book herself. b) Jane has a cat and a dog and no other pets and finds a mouse in front of her door. Only one of her pets could have left the mouse in front of the door and only a pet that catches mice could have left it. To catch a mouse the pet would have had to leave the apartment but Jane s cat did not leave the apartment all dat. Therefore Jane s dog must have left the mouse in front of her door. Quantifiers, Predicates, and Validity 6. Give the truth values of the following formulas for the interpretation where the domain consists of all integers greater than 0 and G(x, y) is x > y, O(x) is x is odd, and T (x) is x is a multiple of 3. 2010 Manfred Huber Page 3

a) ( x)( y)(o(x) G(x, y)) b) ( x)( y)(o(x) G(x, y)) c) ( x)(( y)(t (y) G(y, x)) G(x, 1)) d) ( x)(( y)(o(y) ( z)g(x, z))) e) ( x)(t (x) O(x)) ( y)o(y) f) ( x)(t (x) ( y)g(x, y)) g) ( x)( y)(g(x, y) ( z)g(y, z)) h) ( x)( y)(g(y, x) O(y)) 7. Identify all instances of free and bound variables in the following formulas. a) P (x) ( x)(q(x, y) ( z)p (z)) b) ( x)(( y)p (x, y) Q(y) R(x, y)) c) ( x)( y)(( z)(p (x, z) Q(z, y)) (R(x, y) S(x, z))) d) ( x)(( y)p (x, y) Q(x) ( y)(r(y, x) Q(y))) e) ( x)q(x, y) P ( z)( y)r(y, z) S(z) f) ( y)(q(y) ( x)(q(x, y) P )) g) (P ( y)q(x, y)) ( x)t (x, y) h) ( y)(( x)p (x, y) S Q(x, z) ( z)r(y, z)) 8. For each of the following formulas find one interpretation which makes them true and one which makes them false. a) ( x)(( y)p (x, y) Q(x)) b) ( x)( y)(p (y) Q(x, y)) c) ( x)(p (x) ( y)(p (y) (y = a) Q(y, x))) d) ( x)(p (a) ( y)(p (y) Q(a, y)) R(x)) e) ( x)( y)(p (x, y) R(y, x)) f) ( x)( y)(((y = a) (y = x) Q(x, y)) ( z)(r(x, z) (z = a))) 9. Let the domain be the universal domain and let the predicates and constants have the following interpretation. T (x, y) x is taller than y R(x) x is a race car driver F (x, y) x drives faster than y W (x) x wins the race b Bill j John 2010 Manfred Huber Page 4

Translate the following compound statements into symbolic representation. a) If Bill drives faster than John then John does not win the race. b) The fastest driver wins the race. c) No more than one driver can win the race. d) Taller race car drivers do not drive faster. e) John is not the tallest race car diver and he wins the race only if he drives faster than all other dirvers. f) Sometimes the winner of the race is not the fastest and not the shortest driver. g) The winner of the race has to be a race car driver and can not be the slowest race car driver. h) Bill wins the race only if he is taller than John and drives faster than any other race car driver besides John. Translate the following formulas into English. i) ( x)(r(x) (F (b, x) (b = x))) j) ( x)( y)(r(x) W (x) (R(y) F (y, x) (y = x))) k) ( y)( x)(r(y) W (y) T (x, y) F (x, y)) l) ( x)(r(x) W (x) ( y)((y x) T (y, x))) m) ( x)( y)(r(x) (R(y) (T (y, x) F (y, x)))) n) ( x)(r(x) F (x, j) ( y)(r(y) T (x, y) (x = y))) 2010 Manfred Huber Page 5