Solutions to Problem Set 1

Similar documents
Quiz 1-a (Math 13): Negations and Quantifiers. 1. (2 pts.) Compute the negation of: a Z n, p(a) (q 1 (a) q 2 (a)).

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Recall that the expression x > 3 is not a proposition. Why?

Solutions to In Class Problems Week 4, Mon.

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Section 3.1: Direct Proof and Counterexample 1

Section Summary. Section 1.5 9/9/2014

3 The language of proof

Section 2.1: Introduction to the Logic of Quantified Statements

Background for Discrete Mathematics

Foundation of proofs. Jim Hefferon.

Math 10850, fall 2017, University of Notre Dame

For all For every For each For any There exists at least one There exists There is Some

First order Logic ( Predicate Logic) and Methods of Proof

Predicate Calculus lecture 1

Sec$on Summary. Definition of sets Describing Sets

MATH CSE20 Homework 5 Due Monday November 4

1.1 Language and Logic

THE LOGIC OF QUANTIFIED STATEMENTS

Introduction to Sets and Logic (MATH 1190)

We have seen that the symbols,,, and can guide the logical

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

STRATEGIES OF PROBLEM SOLVING

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

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

1.1 Language and Logic

18.S097 Introduction to Proofs IAP 2015 Lecture Notes 1 (1/5/2015)

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Solutions to Sample Problems for Midterm

Mathematics for Computer Science Exercises from Chapter 3

MATH 341, Section 001 FALL 2014 Introduction to the Language and Practice of Mathematics

Propositional Logic Not Enough

Predicate Logic. Predicates. Math 173 February 9, 2010

LECTURE 1. Logic and Proofs

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

1 Implication and induction

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Recitation 7: Existence Proofs and Mathematical Induction

Predicate in English. Predicates and Quantifiers. Predicate in Logic. Propositional Functions: Prelude. Propositional Function

Predicate logic. Predicates and Boolean Expressions. V =100 I expresses a relationship between quantities identified

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

EECS 1028 M: Discrete Mathematics for Engineers

Chapter 2: The Logic of Quantified Statements. January 22, 2010

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Introduction to Decision Sciences Lecture 2

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

Mathematical Reasoning & Proofs

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

1 Predicates and Quantifiers

Propositional Logic: Syntax

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Mathematical Reasoning (Part I) 1

Discrete Mathematics. Instructor: Sourav Chakraborty. Lecture 4: Propositional Logic and Predicate Lo

In Exercises 1 12, list the all of the elements of the given set. 2. The set of all positive integers whose square roots are less than or equal to 3

Problem Set 1 Solutions

- 1.2 Implication P. Danziger. Implication

CM10196 Topic 2: Sets, Predicates, Boolean algebras

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

Math Real Analysis

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

Proving logical equivalencies (1.3)

Practice Test III, Math 314, Spring 2016

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

Selected problems from past exams

Show Your Work! Point values are in square brackets. There are 35 points possible. Tables of tautologies and contradictions are on the last page.

MA103 STATEMENTS, PROOF, LOGIC

Proofs. Chapter 2 P P Q Q

Mat 243 Exam 1 Review

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

With Question/Answer Animations. Chapter 2

CSE 20 DISCRETE MATH. Winter

1.1 Statements and Compound Statements

Proof worksheet solutions

1. Propositions: Contrapositives and Converses

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

COMP Logic for Computer Scientists. Lecture 16

Discrete Mathematics

CS280, Spring 2004: Final

2-4: The Use of Quantifiers

Direct Proof and Counterexample I:Introduction

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases

Lecture 3 : Predicates and Sets DRAFT

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers

Proofs. Chapter 2 P P Q Q

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Direct Proof and Counterexample I:Introduction. Copyright Cengage Learning. All rights reserved.

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Chapter 2: The Logic of Quantified Statements

Solutions to Exercises (Sections )

What is a proof? Proofing as a social process, a communication art.

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Propositional Logic, Predicates, and Equivalence

Supplementary Logic Notes CSE 321 Winter 2009

Math 13, Spring 2013, Lecture B: Midterm

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

CSE 20 DISCRETE MATH. Fall

Some Basic Logic. Henry Liu, 25 October 2010

Transcription:

Massachusetts Institute of Technology 6.042J/18.062J, Fall 05: Mathematics for Computer Science September 21 Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld revised September 21, 2005, 1076 minutes Problem 1. A real number r is called sensible if there exist positive integers a and b such that a/b = r. For example, setting a = 2 and b = 1 shows that 2 is sensible. Prove that 2 is not sensible. (Consider only positive real roots in this problem) The proof is by contradiction. Assume for the purpose of contradiction that 2 is sensible. Then there exist positive integers a and b such that a/b = 2. Squaring both sides of this equation gives a/b = 4, which implies that 4 is rational. Since 4 is rational, we can write it as a fraction x/y in lowest terms, where x is an integer and y is a positive integer. Therefore, we have: 4 = x/y 4 = x /y 4y = x In the last equation, the left side is even, and so the right side must be even. Since x is even, x itself must be even. This implies that the right side is actually divisible by 8, and so the left side must also be divisible by 8. Therefore, y is even, and so y itself must be even. The fact that both x and y are even contradicts the fact that x/y is a fraction in lowest terms. Therefore, 2 is not sensible. Problem 2. Translate the following sentence into a predicate formula: There is a student who has e mailed exactly two other people in the class, besides possibly herself. Copyright 2005, Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld.

2 The domain of discourse should be the set of students in the class; in addition, the only predicates that you may use are equality and E(x, y), meaning that x has sent e mail to y. A good way to begin tackling this problem is by trying to translate parts of the sentance. Begin by trying to assert that student x has emailed students y and z: E(x, y) E(x, z). Now we want to say that y and z not the same student, and neither of them is x either: where x = y abbreviates = (x = y). x = y x = z y = z, Now, we must think of a way to say that the only people x might have e mailed are x, y and z: s, E(x, s) s = x s = y s = z. Finally, we can say there is some student who emailed exactly two other two students by existentially quantifying x, y and z. So the complete translation is x y z. E(x, y) E(x, z) (1) x = y x = z y = z (2) s, E(x, s) s = x s = y s = z. () Problem. Express each of the following predicates and propositions in formal logic notation. The domain of discourse is the nonnegative integers, N. In addition to the propositional operators, variables and quantifiers, you may define predicates using addition, multiplication, and equality symbols, but no constants (like 0, 1,... ). For example, the proposition n is an even number could be written m. (m + m = n). (a) n is the sum of three perfect squares. x y z. (x x + y y + z z = n)

Since the constant 0 is not allowed to appear explicitly, the predicate x = 0 can t be written directly, but note that it could be expressed in a simple way as: Then the predicate x > y could be expressed x + x = x. w. (y + w = x) (w = 0). Note that we ve used w = 0 in this formula, even though it s technically not allowed. But since w = 0 is equivalent to the allowed formula (w + w = w), we can use w = 0 with the understanding that it abbreviates the real thing. And now that we ve shown how to express x > y, it s ok to use it too. (b) x > 1. The straightforward approach is to define x = 1 as y. xy = y and then express x > 1 as y. (y = 1) (x > y). (c) n is a prime number. IS PRIME(n) ::= (n >1) ( x y. (x > 1) (y > 1) (x y = n)) (d) n is a product of two distinct primes. x y. (x = y) (n = x y) IS PRIME(x) IS PRIME(y). (e) There is no largest prime number. Of course this is a true statement, so it could be expressed by the logically equivalent formula 1 = 1, but even if we didn t know this, we could transcribe the statement directly as: ( p. IS PRIME(p) ( q. IS PRIME(q) p q))

4 (f) (Goldbach Conjecture) Every even natural number n > 2 can be expressed as the sum of two primes. We can define n > 2 with the formula y. (y = 1) (x > y+ y). Likewise, n = 2k can be expressed as n = k + k. Then we can express the Conjecture with: n. ((n > 2 k. n = 2k) p q. IS PRIME(p) IS PRIME(q) (n = p + q))) (g) (Bertrand s Postulate) If n > 1, then there is always at least one prime p such that n < p < 2n. n. ((n > 1) ( p. IS PRIME(p) (n < p) (p < 2n))) Problem 4. If a set, A, is finite, then A < 2 A = P (A), and so there is no surjection from set A to its powerset. Show that this is still true if A is infinite. Hint: Remember Russell s paradox and consider { x A x / f(x)} where f is such a surjection. We prove there is no surjection by contradiction: suppose there was a surjection f : A P (A) for some set A. Let W ::= { x A x / f(x)}. So by definition, (x W ) (x / f(x)) (4) for all x A. But W A by definition and hence is a member of P (A). This means W = f(a) for some a A, since f is a surjection to P (A). So we have from (4), that (x f(a)) (x / f(x)) (5) for all x A. Substituting a for x in (5) yields a contradiction, proving that there cannot be such an f. Problem 5. (a) Prove that z. [P (z) Q(z)] [ x. P (x) y. Q(y)] (6) is valid. (Use the proof in the subsection on Validity in Week 2 Notes as a guide to writing your own proof here.)

5 Proof. Assume z. [P (z) Q(z)]. (7) That is, P (z) Q(z) holds for some element, z, of the domain. Let c be this element; that is, we have P (c) Q(c). In particular, P (c) holds by itself. So we conclude (by Existential Generalization) x P (x). We conclude y Q(y) similarly. Hence, holds. x. P (x) y. Q(y) (8) This shows that (8) holds in any interpretation in which (7) holds. Therefore, (7) implies (8) in all interpretations, that is, (6) is valid. (b) Prove that the converse of (6) is not valid by describing a counter model as in Week 2 Notes. Proof. We describe a counter model in which, (8) is true and (7) is false. Namely, let the domain, D, be {π, e}, P (x) mean x = π, and Q(y) mean y = e. Then, x. P (x) is true (let x be π) and likewise y. Q(y) is true (let y be e), so (8) holds. On the other hand, Q(π) is not true, so P (π) Q(π) is not true. Likewise P (e) Q(e) is not true. Since these are the only elements of D, it is not true that there is an element, z, of D, such that P (z) Q(z), That is, (7) is not true. Problem 6. (a) Give an example where the following result fails: False Theorem. For sets A, B, C, and D, let L ::= (A C) (B D), R ::= (A B) (C D). Then L = R. If A = D = and B and C are both nonempty, then L = C B =, but R =. (b) Identify the mistake in the following proof of the False Theorem.

6 Bogus proof. Since L and R are both sets of pairs, it s sufficient to prove that (x, y) L (x, y) R for all x, y. The proof will be a chain of iff implications: (x, y) L iff x A C and y B D, iff either x A or x C, and either y B or y D, iff (x A and y B) or else (x C and y D), iff (x, y) A B, or (x, y) C D, iff (x, y) (A B) (C D) = R. The mistake is in the third iff. If [x A or x C, and either y B or y D], it does not necessarily follow that (x, y) (A B) (C D). It might be that (x, y) is in A D instead. This happens, for example, if A = {1}, B = {2}, C = {}, D = {4}, and (x, y) = (1, 4). (c) Fix the proof to show that R L. Replacing the third iff by which will be true when, yields a correct proof that (x, y) L will be true when (x, y) R, which implies that R L.