Computer Science 280 Spring 2002 Homework 2 Solutions by Omar Nayeem

Similar documents
Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

CSC Discrete Math I, Spring Propositional Logic

Section 1.3. Let I be a set. When I is used in the following context,

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

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

Mat 243 Exam 1 Review

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

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

DISCRETE MATHEMATICS BA202

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

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

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

Logic and Proof. Aiichiro Nakano

CS Module 1. Ben Harsha Apr 12, 2017

a. See the textbook for examples of proving logical equivalence using truth tables. b. There is a real number x for which f (x) < 0. (x 1) 2 > 0.

Section 2.1: Introduction to the Logic of Quantified Statements

1.5 MATHEMATICAL LANGUAGE

EECS 1028 M: Discrete Mathematics for Engineers

MAT2345 Discrete Math

1.1 Language and Logic

Chapter 2: The Logic of Quantified Statements

Quantifiers. P. Danziger

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

1. Propositions: Contrapositives and Converses

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Logic, Sets, and Proofs

AMTH140 Lecture 8. Symbolic Logic

A statement is a sentence that is definitely either true or false but not both.

Compound Propositions

Section 2.3: Statements Containing Multiple Quantifiers

Mathematical Reasoning (Part I) 1

Basic Logic and Proof Techniques

Introduction to Sets and Logic (MATH 1190)

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

1.1 Language and Logic

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

Section 1.1: Logical Form and Logical Equivalence

Predicates, Quantifiers and Nested Quantifiers

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

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Math.3336: Discrete Mathematics. Nested Quantifiers

2-4: The Use of Quantifiers

1.1 Statements and Compound Statements

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.

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

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

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

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

Geometry: Notes

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

MAT 243 Test 1 SOLUTIONS, FORM A

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

Homework 4 Solutions

STRATEGIES OF PROBLEM SOLVING

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

Midterm Exam Solution

Chapter 4, Logic using Propositional Calculus Handout

Predicate logic. G. Carl Evans. Summer University of Illinois. Propositional Logic Review Predicate logic Predicate Logic Examples

Predicate Logic & Quantification

Chapter 1, Section 1.1 Propositional Logic

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

Logic. Def. A Proposition is a statement that is either true or false.

CS0441 Discrete Structures Recitation 3. Xiang Xiao

Math 10850, fall 2017, University of Notre Dame

Some Review Problems for Exam 1: Solutions

CS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach you about:

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

The Logic of Compound Statements cont.

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

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

A. Propositional Logic

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Today s Lecture. ICS 6B Boolean Algebra & Logic. Predicates. Chapter 1: Section 1.3. Propositions. For Example. Socrates is Mortal

Solutions to Exercises (Sections )

First order Logic ( Predicate Logic) and Methods of Proof

CSE 240 Logic and Discrete Mathematics

2.2: Logical Equivalence: The Laws of Logic

Foundations of Discrete Mathematics

1 The Foundation: Logic and Proofs

ECOM Discrete Mathematics

Section L.1- Introduction to Logic

CSE Discrete Structures

Chapter 3: Logic. Diana Pell. A statement is a declarative sentence that is either true or false, but not both.

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

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.

Section 3.1 Statements, Negations, and Quantified Statements

Proving logical equivalencies (1.3)

Mathematical Reasoning. The Foundation of Algorithmics

2.2 Analyze Conditional

DISCRETE MATH: FINAL REVIEW

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

Introducing Proof 1. hsn.uk.net. Contents

THE LOGIC OF QUANTIFIED STATEMENTS

1 The Foundation: Logic and Proofs

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

software design & management Gachon University Chulyun Kim

Transcription:

Computer Science 280 Spring 2002 Homework 2 Solutions by Omar Nayeem Part A 1. (a) Some dog does not have his day. (b) Some action has no equal and opposite reaction. (c) Some golfer will never be eated by a better golfer. (d) This one is a bit trickier. Let P (x) mean that x > 1, and let Q (x) mean that x 2 > x. So the statement that we want to negate is x (P (x) Q (x)). By the inition of implication, this is equivalent to x ( P (x) Q (x)). When we negate this, we get x ( ( P (x) Q (x))). Applying De Morgan s laws, we can simplify this to x (P (x) Q (x)). For all x, x > 1 and x 2 x is therefore the correct negation. 2. We have the following two assumptions: (i) Logic is difficult or not many students like logic. (ii) If mathematics is easy, then logic is not difficult. Let s make a few initions: We will use l to represent logic and m to represent mathematics. Given n {l, m}, D (n) will mean that the discipline n is difficult. Given n {l, m}, E (n) will mean that the discipline n is easy. Although it makes no difference in this problem, we should note that we do not assume that (E (n) D (n)). Given n {l, m}, S (n) will mean that many students enjoy discipline n. As one may expect, S (n) will mean that few students enjoy n. Now, we can symbolically express the two assumptions: (i) (D (l) S (l)) 1

(ii) (E (m) D (l)) Observe that (by the inition of implication and by contraposition, respectively) these two are equivalent to the following: (i) (S (l) D (l)) (ii) (D (l) E (m)) We are now ready to check the following claims: (a) Mathematics is not easy if many students like logic. This claim can be written as (S (l) E (m)). Since we know from above that (S (l) D (l)), and that (D (l) E (m)), we conclude that this claim is true. (b) Not many students like logic if mathematics is not easy. This claim can be written as ( E (m) S (l)). By contraposition, we obtain (S (l) E (m)). Again, we know from our hypotheses that (S (l) D (l)), and that (D (l) E (m)), so we conclude that this claim is false. (c) Mathematics is not easy or logic is difficult. We can write this claim as ( E (m) D (l)), which is equivalent (by the inition of implication) to (E (m) D (l)). However, this claim contradicts (E (m) D (l)), which is one of our hypotheses. Therefore the claim is false. (d) Logic is not difficult or mathematics is not easy. Symbolically, we express this claim as ( D (l) E (m)). If we convert this to an implication, we get (D (l) E (m)), which is one of our hypotheses. The claim is therefore true. (e) If not many students like logic, then either mathematics is not easy or logic is not difficult. Here we have a complex claim: ( S (l) ( E (m) D (l))). If we convert the right side into an implication, we get ( S (l) (D (l) E (m))). However, since (D (l) E (m)) is one of our hypotheses, this claim becomes ( S (l) T), which is equivalent to (S (l) T), which (by the domination law) is always true. Hence, the claim is true. Alternate Solution: This question was ambiguous, so some 2

may have interpreted the either... or phrase to imply exclusive or. In this case, we have ( S (l) ( E (m) D (l))), which becomes (S (l) ((E (m) D (l)) ( E (m) D (l)))), or (S (l) (E (m) D (l)) ( E (m) D (l))). Now suppose that not many students like logic, that mathematics is not easy, and that logic is not difficult. Symbolically, we represent this situation as ( S (l) E (m) D (l)). Notice that although the hypotheses are fulfilled here, the claim does not hold. The claim therefore does not follow from the hypotheses; it is false. Part B 3. Let the universe of discourse for the variable x be the set of students in the class. For the variable y (representing year in school), let the universe of discourse be {f, s, j, s } ( freshman, sophomore, junior, and senior respectively). For the variable z (representing major), let the universe of discourse be {m, c} ( mathematics and computer science respectively). For brevity, we introduce the following notations: Y (x, y) x s year is y M (x, z) x s major is z Now we can write the statements symbolically: (a) There is a student in the class who is a junior. We write this as x (Y (x, j)), and this statement is true. (b) Every student in the class is a computer science major. This can be written as x (M (x, c)), and this statement is false. (c) There is a student in the class who is neither a mathematics major nor a junior. We can write this as x ( M (x, m) Y (x, j)), and this statement is true. (d) Every student in the class is either a sophomore or a computer science major. We write this as x (Y (x, s) M (x, c)), and this statement is false. (e) There is a major such that there is a student in the class in every year of study with that major. This can be written as z y x (Y (x, y) M (x, z)), and this statement is false. 3

4. We will first simplify the Boolean expressions, and then we will demonstrate equivalence through truth tables. (a) p [p (q p)] p [(p q) (p p)] (distributive law) p [(p q) F] (since (p p) F) p [p q] (identity law) p [p q] (inition of implication) [ p p] [ p q] (distributive law) T [ p q] (since ( p p) T) ( p q) (identity law) (p q) (inition of implication) The following truth table demonstrates the equivalence of the initial and final expressions: (p [p (q p)]) (p q) T T T T T T F T T T T T T F T F F F F T T T F F F T F F T T T F T F T T F T F F F T T F T F T F (b) False if p is false True if p is true {}}{{}}{ (p r) (p q) (r q) } {{ } Always true T (r q) (left side is always true) T (r q) (inition of implication) F (r q) ( T F) (r q) (identity law) This truth table verifies the equivalence of the two expressions: 4

Part C ([(p r) (p q)] (r q)) (r q) T T T T T T T T T T T T T T T T T T T T T F F T F F T T F F T F F T T T T T F T T T F T T T F F T T T F T F T F T F T F F F T T F T T T T T T T T T T F F T T F F F F T F F T T F F F F F T F T T T F T T T F T T F F F T F F F T F T F T F T F 5. We will represent each statement symbolically in checking the validity of the claims. (a) We have the following hypotheses: (i) If there is gas in the car then I will go to K-Mart. We will use p to signify that there is gas in the car, and q to signify that I go to K-Mart. Therefore, we have (p q). (ii) If I go to K-Mart then I will buy some Martha Stewart designer shower curtains. We will use r to signify that I buy the shower curtains. Therefore, we have (q r). (iii) I do not buy shower curtains. We have r. We want to check the following conclusion: There is no gas in the car or the car is broken. We will use s to signify that the car is broken. The conclusion can therefore be written symbolically as ( p s). By contraposition, we can rewrite (i) and (ii): (i) ( q p) (ii) ( r q) Since we know by (iii) that r holds, it is clear from (ii) that q must also hold, and from (i) it is clear that p therefore holds as well. This is sufficient (by the addition rule) to guarantee that ( p s) is true, so the conclusion is valid. (b) We are given the following hypotheses: 5

(i) Everyone in the Discrete Structures class loves proofs. Let the universe of discourse for the variable x be the set of people in the Discrete Structures class, and let P (x) signify that person x loves proofs. We therefore have x (P (x)). (ii) Someone in the Discrete Structures class has never taken History. Let H (x) signify that person x has taken History. We therefore have x ( H (x)). We want to check the following conclusion: Someone who loves proofs has never taken History. Symbolically, we write this as x ( H (x) P (x)). By (ii), we know (using existential instantiation) that for some person y in the class, H (y) is true. By (i), we also know (using universal instantiation), that P (y) is true. By conjunction, we now have ( H (y) P (y)), and since y is from the universe of discourse of the variable x, this proves that the claim is true. 6. We want to find a closed formula for the sequence {a n }, ined recursively below: a 1 = 3 a 2 = 5 a n+1 = 3a n 2a n 1 First, observe that for large values of n (we want n 4 to prevent problems with indices), a n+1 a n = 2 (a n a n 1 ) = 2 2 (a n 1 a n 2 ) = 2 3 (a n 2 a n 3 ).. = 2 n 1 (a 2 a 1 ) = 2 n 1 (5 3) = 2 n 1 (2) = 2 n. 6

We would thus expect the formula to be of the form a n = 2 n +m, where m is some integer. Given the values of a 1 and a 2, it only makes sense to choose m = 1. By induction on n, we will now verify that a n = 2 n + 1. Claim: a n = 2 n + 1. Basis: We have two base cases here (n = 1 and n = 2): a 1 = 3 = 2 1 + 1 (confirmed for n = 1) a 2 = 5 = 2 2 + 1 (confirmed for n = 2) Induction Hypothesis: There exists a natural number k for which 1 n k implies that a n = 2 n + 1. Induction Step: Consider a k+1. Remember that the key is to use what you know in proving your claim (and not to merely show that your claim is consistent with what you know): a k+1 = 3a k 2a k 1 = 3 ( 2 k + 1 ) 2 ( 2 k 1 + 1 ) (by induction hypothesis) = 3 ( 2 k) + 3 2 k 2 = (3 1) ( 2 k) + 3 2 = 2 ( 2 k) + 1 = 2 k+1 + 1 (confirmed for n = k + 1) We can therefore conclude that a n = 2 n + 1 for all natural numbers n 1. 7