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

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

Propositional Logic Not Enough

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

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

The Logic of Compound Statements cont.

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

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

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Announcements CompSci 102 Discrete Math for Computer Science

III. Elementary Logic

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

At least one of us is a knave. What are A and B?

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

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

Rules Build Arguments Rules Building Arguments

Chapter 2: The Logic of Quantified Statements

Proposi'onal Logic Not Enough

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

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

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

Predicate Logic. Andreas Klappenecker

Predicate Logic & Quantification

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

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

Introduction to Sets and Logic (MATH 1190)

Discrete Mathematics and Its Applications

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

Chapter 3. The Logic of Quantified Statements

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

Intro to Logic and Proofs

STRATEGIES OF PROBLEM SOLVING

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Discrete Mathematics for CS Spring 2006 Forbes HW 1 Solutions

1 The Foundation: Logic and Proofs

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

MAT 243 Test 1 SOLUTIONS, FORM A

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

1 The Foundation: Logic and Proofs

Logic and Proof. Aiichiro Nakano

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

Full file at Chapter 1

CS0441 Discrete Structures Recitation 3. Xiang Xiao

CSC 125 :: Final Exam May 3 & 5, 2010

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.

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

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

DISCRETE MATHEMATICS BA202

Chapter 1 Elementary Logic

Artificial Intelligence: Knowledge Representation and Reasoning Week 2 Assessment 1 - Answers

Math 3336: Discrete Mathematics Practice Problems for Exam I

Section 1.1 Propositions

ICS141: Discrete Mathematics for Computer Science I

CS 2336 Discrete Mathematics

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

It rains now. (true) The followings are not propositions.

TEST BANK Questions for Chapter 1

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

Section Summary. Section 1.5 9/9/2014

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

1) Let h = John is healthy, w = John is wealthy and s = John is wise Write the following statement is symbolic form

Review: Potential stumbling blocks

Mat 243 Exam 1 Review

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

Exercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.

Chapter 4, Logic using Propositional Calculus Handout

Discrete Structures for Computer Science

Logic and Propositional Calculus

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).

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

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

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

PROPOSITIONAL CALCULUS

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

(Refer Slide Time: 02:20)

First order Logic ( Predicate Logic) and Methods of Proof

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Homework assignment 1: Solutions

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.

Rules of Inference. Arguments and Validity

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

HANDOUT AND SET THEORY. Ariyadi Wijaya

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

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

2-4: The Use of Quantifiers

software design & management Gachon University Chulyun Kim

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Announcement. Homework 1

Chapter 2: The Logic of Compound Statements

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

Logic, Sets, and Proofs

Formal (Natural) Deduction for Predicate Calculus

ECOM Discrete Mathematics

Transcription:

Test 1 Solutions(COT3100) Sitharam (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology: ( q (p q) (r p)) r Solution. This is Modus Tollens applied twice, with transitivity of implication. Alternatively, write the two implications as contrapositives and apply transitivity of implication. (2) If all streets are wet, then it is raining. It is sunny. For each item below, prove or argue why no such proof exists: (i) No street is wet. (ii) At least one street is dry. Solution. Let p be all streets are wet, q be it is rainy ( q be it is sunny ). Then we have p q and q. Applying Modus Tollens we can derive p. In english, not all streets are wet. (i) We cannot say that no street is wet ( x x is not wet). The premises do not preclude some streets being wet even if it is not raining. (ii) Not all streets are wet means there is at least one street that is dry ( ( x, w(x)) x, w(x)). So this one is proven. (3) Prove or disprove that (p q) (q r) and (p r) (r q) are logically equivalent. Solution. They are not logcially equivalent. A counter example is p = T, q = T, r = F. (The first is F, the second T) (4) Suppose that all variables represent people (are drawn from the universe of people) and the following predicates and are defined as: L(x) x is a lawyer G(x) x is generous P (x) x holds public office C(x) x is corrupt B(x, y) x has borrowed money from y If in English translate to predicate logic, with quantifiers if necessary; if in logic, translate to English without using variables. a) There is someone who is corrupt and has borrowed money from someone who is generous. Solution. x y (x y c(x) B(x, y) G(y)) b) Everyone who holds public office has borrowed money from a lawyer. Solution. x y (P (x) = B(x, y) L(y)) c) x y [B(y, x) P (y)] C(y) 1

Solution. There is a person such that every one who holds public office - and has borrowed money from this person - is corrupt. d) x [G(x) z C(z) B(z, x)] Solution. There is someone who is generous and every one who is corrupt has borrowed money from this generous person. (5) University of Flators has fifty faculty senators. Each senator is either honest or corrupt. Suppose you know that at least one of the senators is honest and that, given any two senators, at least one is corrupt. Based on these facts, can you determine how many of UF s senators are honest and how many are corrupt? If so, what is the answer? Please provide a logical argument. Solution. There are 49 corrupt senators and 1 honest senator. If there were 2 (or more) honest senators, then there would be a pair of senators that were both honest, contradicting one of the premises. There must be at least 1 honest senator, so there is exactly 1 honest senator. (6) Prove or disprove: e d x (0 < x a < d f(x) L < e) e x d(0 < x a < d f(x) L < e) Solution. Let P (e, d, x) = (0 < x a < d f(x) L < e). e ( d x P (e, d, x)) e ( d x P (e, d, x)) d x P (e, d, x) x d P (e, d, x) e d x P (e, d, x) e x d P (e, d, x) (7) Running is unpleasant or not many people like running. If walking is pleasant, then running is pleasant. Which of the following are valid conclusions and why(not)?: Running is pleasant - P(R) walking is pleasant - P(W) Many people like running - MPL(R) P remise1: P (R) MP L(R) P remise2: P (W ) = P (R) (i) Walking is unpleasant if many people like running Solution: MP L(R): P remise3 2

P (R): Disjunctive syllogism with P remise 1 P (R) = P (W ): contrapositive of premise 2 hence the argument is valid (ii) Not many people like running, if walking is unpleasant Solution: This is the contrapositive of the above part(a). Hence it is valid. (iii) Walking is not pleasant or running is unpleasant Solution: This is not valid. Negation of this statment is consistent with the Premise 1 and Premise 2. (iv) Running is not unpleasant or walking is not pleasant. Solution: P(W) = P (R): P remise2 P (W )orp (R): same statement as premise 2 Hence the argument is valid. (v) If not many people like running, the either walking is not pleasant or running is not unpleasant. Solution: P(W) = P (R): premise 2 P (W )orp (R): same statement as premise 2 MP L(R) = T RUE Hence the argument is valid. (8) Use rules of inference to show that if x(u(x) V (x)) and x(( U(x) V (x) W (x)) are true, then x( W (x) U(x)) is also true, where the domains of all quantifiers are the same. Solution. For all x, W (x) ( U(x) V (x)) Modus tollens U(x) V (x) (U(x) V (x)) (U(x) V (x)) U(x) i.e. x ( W (x) U(x)) De Morgan s law Condition: U(x) V (x) is true (9) Determine whether these are valid arguments and explain your answer. Resolution a) Let H(x) be x is happy. Given the premise x H(x), we conclude that H(Lola). Therefore Lola is happy. 3

Solution: This is not a valid argument. Given the premise x H(x), we conclude that H(Lola) is not a valid use of existential instantiation. b) All men are mortal. Socrates is a man. So, Socrates is mortal. Solution: Let Man(x) be x is a man. Let Mortal(x) be x is a mortal. The first statement says x M an(x) M ortal(x). The next statement says M ortal(socrates) (universal instantiation). The last statement concludes Mortal(Socrates). This is valid modus ponens. x Man(x) Mortal(x) M an(socrates) M ortal(socrates) M an(socrates) M ortal(socrates) c) If x is a positive integer, then x 2 is a positive integer. Therefore, if a 2 is positive, where a is an integer, then a is a positive integer. Solution. The argument is not valid. This is fallacy of affirming the conclusion, and there is a counter example to the conclusion: let a = 1, then a 2 is positive, but a is a negative integer. (d) If x 2 = 0, where x is a real number, then x = 0. Let a be a real number with a 2 = 0; then a = 0. Solution. The argument is valid by universal instantiation: let p(x) be x 2 = 0, q(x) be x = 0. For the domain of real numbers, x (p(x) q(x)) implies p(a) q(a). 10) Five friends have access to a chat room. Is it possible to determine who is chatting if the following information is known? Either Kevin or Heather or both are chatting. Either Randy or Vijay but not both are chatting. If Abby is chatting, then so is Randy. Vijay and Kevin are either both chatting or neither is. If Heather is chatting, then so are Abby and Kevin. Explain your reasoning. Solution: This information is enough to determine the entire system. Let each letter stand for the statement that the person whose name begins with that letter is chatting. Then the given information can be expressed symbolically as follows: K H, R V, R V, A R, V K, K V, H A, H K. Note that we were able to convert all of these statements into conditional statements. In what follows we will sometimes make use of the contrapositives of these conditional statements as well. First suppose that H is true. Then it follows that A and K are true, whence it follows that R and V are true. But R implies that V is false, so we get a contradiction. Therefore H must be false. From this it follows that K is true; whence V is true, and therefore R is false, as is A. We can now check that this assignment leads to a true value for each conditional statement. So we conclude that Kevin and Vijay are chatting but Heather, Randy, and Abby are not. (11) On the island of knights and knaves you encounter two kinds of people. Knights who always tell the truth and knaves who always lie. You meet a person on this island and are 4

allowed to ask him exactly one question and based on the response, you have to determine whether the person is a knight or a knave. 1. Explain why the question Are you a knight? does not work. Solution: If you encounter a knight, he will honestly yes to the question. If you encounter a knave, then the honest answer to your question is no, so he will lie and answer yes. Since everybody answers yes, there is no way to determine if the person is a knight or a knave. 2. Find a question that you can use to determine whether the person is a knight or a knave. Explain your reasoning. Solution: There are several possible correct answers. One of the questions you can ask is Do knights lie?. A knight will say no but a knave will say yes. (12) The symmetric difference of two sets A and B, denoted by A B is the set containing those elements either in A or in B but not in both A and B. (10 points) 1. Give a formula for the symmetric difference in terms of A and B using only the union ( ) once, intersection ( ) twice and complement operator once. Solution: (A B) (A B) 2. Show that A B = (A B) (B A) Solution: There are precisely two ways that an item can be in either A or B but not both. It can be in A but not B (which is equivalent to saying that it is in A - B ), or it can be in B but not A (which is equivalent to saying that it is in B - A ). Thus an element is in A B if and only if it is in (A B) (B A). (13) Let A, B and C be sets. Prove or disprove that A (B C) A B. (10 points) Solution: This is not true. Here is a counter example: A = {1, 2, 3}, B = {2, 3}, C = {1, 2}. (10) (BONUS) Write a proposition that asserts that an 8 8 board where each of the 64 squares is colored black or white in fact has a valid chess/checkerboard pattern. Solution. Many ways to do this by asserting various properties that a chessboard satisfies. For example, the sum of the row number and column number of any black square is odd and of any white square is even (rotate the board 90 degrees if the reverse seems to be true in your current position of the board). I ll use a different property here. It is necessary and sufficient that for any given square (in any position - row and column), the squares above it and to the left of it (if they exist) have the opposite color as the given square. Let soc(i, j, k, l) represent the proposition: at least one of k, l is 0 OR the square (i, j) (row, column) and square (k, l) of the given board are colored either black or white AND they have opposite colors. 5

Now the following proposition is true if and only if the board is a chess board pattern. [soc(i, j, (i 1), j) soc(i, j, i, (j 1))] = (different notation) 8 8 [soc(i, j, (i 1), j) 1 i,j 8 soc(i, j, i, (j 1))] i=1 j=1 (11)(BONUS): Let V and S be finite sets. Let V \ S denote the set of elements in V but not in S. Assume that x, y[(r(x, y) x y) (R(x, y) R(y, x))]. The universe of discourse for all quantifiers is V The following two statements are equivalent: Prove or Disprove. (i) x y(r(x, y) (x S y S)) (ii) u, v(u V \ S) (v V \ S) R(v, u)) Solution. I am asking you to prove or disprove whether (i) and (ii) are equivalent to each other!! Many people considered the two statements separately! (i) and (ii) are indeed equivalent assuming the given axioms/premises. The proof is simply by (1) using the equivalence of contrapositives and implications, i.e., that p q is equivalent to q p (2) the fact that change in variable names such as replacing x by u and y by v consistently doesn t change the sentence (as long as there were no variable names u and v in the original sentence) (3) two universal quantifiers u v next to each other is equivalent to a single universal quantifier on a pair (u, v). (i) x y(r(x, y) (x S y S)) (contrapositive of implication) x y( (x S y S) R(x, y)) (demorgans to the left hand side of implication) x y( (x S) (y S)) R(x, y) (from the given axiom/premise that x, y[(r(x, y) x y) (R(x, y) R(y, x))]) x y( (x S) (y S)) R(y, x) (flipped ordering of x and y) (consistently changing variable names) u v( (u S) (v S)) R(v, u) (changing 2 adjacent universal quantifiers to one over a pair) u, v( (u S) (v S)) R(v, u) (from the given axiom/premise that (u S) u V \ S) (ii) u, v(u V \ S) (v V \ S) R(v, u)) 6