Midterm Exam Solution

Similar documents
Mathematics 220 Midterm Practice problems from old exams Page 1 of 8

MATH 271 Summer 2016 Practice problem solutions Week 1

CS173 Lecture B, September 10, 2015

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

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

MATH CSE20 Homework 5 Due Monday November 4

Math 10850, fall 2017, University of Notre Dame

Test #1 September 16, 2014

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

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

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Preparing for the CS 173 (A) Fall 2018 Midterm 1

PROBLEM SET 3: PROOF TECHNIQUES

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

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

STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES. n (n +1)(2n +1), 6. j 2 = 1(1+1)(2 1+1) 6. k (k +1)(2k +1) 6

CSC Discrete Math I, Spring Propositional Logic

Homework 3: Solutions

Compound Propositions

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

9/5/17. Fermat s last theorem. CS 220: Discrete Structures and their Applications. Proofs sections in zybooks. Proofs.

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

Readings: Conjecture. Theorem. Rosen Section 1.5

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

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

Practice Midterm Exam Solutions

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.

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations

Logic, Sets, and Proofs

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Section 3.1: Direct Proof and Counterexample 1

8. Given a rational number r, prove that there exist coprime integers p and q, with q 0, so that r = p q. . For all n N, f n = an b n 2

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Section 1.1: Logical Form and Logical Equivalence

Mat 243 Exam 1 Review

CS 340: Discrete Structures for Engineers

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

MAT 243 Test 1 SOLUTIONS, FORM A

DISCRETE MATH: FINAL REVIEW

Basic Proof Examples

Some Review Problems for Exam 1: Solutions

Normal Forms Note: all ppts about normal forms are skipped.

Truth-Functional Logic

The statement calculus and logic

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

Recitation 7: Existence Proofs and Mathematical Induction

CS Module 1. Ben Harsha Apr 12, 2017

RED. Name: Instructor: Pace Nielsen Math 290 Section 1: Winter 2014 Final Exam

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n).

Math 230 Final Exam, Spring 2009

A. Propositional Logic

Proof Terminology. Technique #1: Direct Proof. Learning objectives. Proof Techniques (Rosen, Sections ) Direct Proof:

MAT2345 Discrete Math

CS70: Discrete Math and Probability. Slides adopted from Satish Rao, CS70 Spring 2016 June 20, 2016

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

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Math.3336: Discrete Mathematics. Proof Methods and Strategy

Math Lecture 3 Notes

We last time we began introducing equivalency laws.

3.6. Disproving Quantified Statements Disproving Existential Statements

EECS 1028 M: Discrete Mathematics for Engineers

Proofs. Joe Patten August 10, 2018

Inference and Proofs (1.6 & 1.7)

Logic and Truth Tables

MATH10040: Numbers and Functions Homework 1: Solutions

Topics in Logic and Proofs

Propositional Equivalence

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

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

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

Section 1.2: Propositional Logic

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

Supplementary exercises in propositional logic

(4) Using results you have studied, show that if x, y are real numbers,

MATH 135 Fall 2006 Proofs, Part IV

2k n. k=0. 3x 2 7 (mod 11) 5 4x 1 (mod 9) 2 r r +1 = r (2 r )

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

Mathematical Induction

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

means is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S.

Introducing Proof 1. hsn.uk.net. Contents

Math Final Exam December 14, 2009 Page 1 of 5

Math 230 Final Exam, Spring 2008

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

Section Summary. Proof by Cases Existence Proofs

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

STRATEGIES OF PROBLEM SOLVING

CS156: The Calculus of Computation Zohar Manna Autumn 2008

1.1 Language and Logic

1. Mathematical Proofs

Lynch 2017 Page 1 of 5. Math 150, Fall 2017 Exam 1 Form A Multiple Choice

THE LOGIC OF COMPOUND STATEMENTS

2.2: Logical Equivalence: The Laws of Logic

Computer Science Foundation Exam

1. From Lewis Carroll: extract a pair of premises and finish the conclusion.

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Mathematical Reasoning. The Foundation of Algorithmics

Solutions to Homework Set 1

software design & management Gachon University Chulyun Kim

Transcription:

Midterm Exam Solution Name PID Honor Code Pledge: I certify that I am aware of the Honor Code in effect in this course and observed the Honor Code in the completion of this exam. Signature Notes: 1. This exam is closed-book. Any collaboration or discussion during the exam is considered as a serious violation of the Honor Code. 2. Using any electronic devices is strictly forbidden during the exam, and is also considered as a serious violation of the Honor Code. 3. You are expected to write your solution neatly. Illegible solutions will not be graded.. In the proofs, you can assume the following are facts that you can directly use. (a) Basic Algebra. (b) The sum, difference, and product of any two integers are still an integer. (c) Logical Equivalences listed in Theorem 2.1.1. (You are expected to know them without referring to the textbook.) (d) An integer is either even or odd. (e) The Quotient-Remainder Theorem as follows. (f) All definitions we learned, such as rational, divide. (g) Any other things specified in each particular question.

(16 ) 1. Write a negation for each of the following statement. (a) Today is raining but we have a midterm today. Today is not raining or we do not have a midterm today. (b) UNC wins the championship only if UNC beats Duke. The original statement is equivalent to If UNC does not beat Duke, then UNC does not win the championship. So, the negation is UNC does not beat Duke but (and) UNC wins the championship (c) x Z, 3 < x 7 x Z, x 3 x > 7 (d) m Z, n Z such that if m = n 2, then n = m. m Z such that n Z, m = n 2 and n m. (10 ) 2. Determine whether the following argument form is valid or invalid by constructing a truth table. Please include a few words explaining how the truth table supports your conclusion. p q p ~r r ~q q r p q r ~q ~r p q p ~r r ~q q r T T T F F T F F T T T F F T T T T T T F T T F F F T T T F F T T F T T F F T T F F F T F T F T F F T F T T T F F T T F T T T T F F F T T T T T F The argument form is invalid, because in one of the three critical rows (bold font), the conclusion is false.

(6 ) 3. Write the converse, inverse, and contrapositive of If Jim is my advisor, then I can finish my dissertation and I can enjoy my life at UNC. Converse: If I can finish my dissertation and I can enjoy my life at UNC, then Jim is my advisor. Inverse: If Jim is not my advisor, then I cannot finish my dissertation or I cannot enjoy my life at UNC. Contrapositive: If I cannot finish my dissertation or I cannot enjoy my life at UNC, then Jim is not my advisor. (10 ). Construct a truth table for p (q r) and write its corresponding disjunctive normal form (DNF) and conjunctive normal form (CNF) expressions. p q r q r p (q r) T T T T T T T F F F T F T T T T F F T T F T T T F F T F F T F F T T F F F F T F DNF: (p q r) (p ~q r) (p ~q ~r) (~p q ~r) CNF: (~p ~q r) (p ~q ~r) (p q ~r) (p q r) (9 ) 5. The NOR logic operator is denoted by the symbol (called Peirce arrow). Its truth table is as follows, and its logical equivalence is p q ~(p q). p q p q T T F T F F F T F F F T Use the operator only to rewrite logical equivalent expressions for ~p, p q, and p q. That is, ~p?, p q?, and p q? where is the only allowed operator on the right-hand side of these ; nonetheless, parentheses are allowed. (Hint: p p p, ~(~p) p, ~(~p ~q) p q). ~p p p p q (p p) (q q), because(p p) (q q) (~p) (~q) ~(~p ~q) p q p q (p q) (p q), because (p q) (p q) ~(p q) ~(~(p q)) p q

(20 ) 6. Determine whether each of the following statements is true or false. If it is true, prove it; if it is false, disprove it by a counterexample. (a) For any integer n, if 3 does not divide n, then 3 divides n 2 1. True. Proof: Let n be a particular but arbitrarily chosen integer. Then, by the Quotient-Remainder Theorem, n=3k for some integer k, or n=3k+1 for some integer k, or n=3k+2 for some integer k. Because 3 does not divide n, n=3k for some integer k cannot be the case. We discuss the remaining two cases. Case 1: n=3k+1 for some integer k. In this case, n 2 1 = (3k + 1) 2 1 = 9k 2 + 6k + 1 1 = 3(3k 2 + 2k) Because k is an integer, 3k 2 + 2k is also an integer. Therefore, 3 divides n 2 1 in this case. Case 2: n=3k+2 for some integer k. In this case, n 2 1 = (3k + 2) 2 1 = 9k 2 + 12k + 1 = 3(3k 2 + k + 1) Because k is an integer, 3k 2 + k + 1 is also an integer. Therefore, 3 divides n 2 1 in this case. Combining Cases 1 and 2, we can conclude that, if 3 does not divide n, then 3 divides n 2 1. (b) The sum of two irrational numbers is zero or irrational. False. Counterexample: (2 + 2) + (2 2) =, where (2 + 2) and (2 2) are both irrational numbers, and their sum is, which is not zero and is not irrational. (c) The product of a non-zero rational number and an irrational number is irrational. True. Proof: we prove this statement by contradiction. Suppose the statement is false. That is, suppose there are a non-zero rational number x and an irrational number y such that their product xy is rational. Then, by the definition of rational numbers, x = a b and xy = c d for some integers a, b, c, d where b 0 and d 0. That is, a y = c. Because x is non-zero, a 0. b d Therefore, y = c b = bc. Because a, b, c, d are integers, bc and ad are both integers. Also, d a ad because a 0 and d 0, ad 0. So, by the definition of rational numbers, y is a rational number, which contradicts the supposition that y is an irrational number. Thus, the supposition cannot be true, and the original statement is true.

(10 ) 7. Use mathematical induction to prove the following generalized De Morgan s Law for arbitrary number of statement variables. That is, prove that for any integer n 2, ~(p 1 p 2 p n ) ~p 1 ~p 2 ~p n. You can assume the two-variable De Morgan s Law, ~(p q) ~p ~q, is an already proven fact. You can also assume the commutative law and the associative law are also already proven for multiple or multiple. (In case you don t remember the laws names: commutative law the order of variables doesn t matter; associative law adding parentheses doesn t matter.) Proof: we prove it by mathematical induction. Let P(n) denote that ~(p 1 p 2 p n ) ~p 1 ~p 2 ~p n. Basis Step: we consider P(2), which is ~(p 1 p 2 ) ~p 1 ~p 2. By the two-variable De Morgan s Law, it is true. So, P(2) is true. Inductive Step: we suppose P(k) is true for some particular integer k 2. That is, ~(p 1 p 2 p k ) ~p 1 ~p 2 ~p k. [Above is our Inductive Hypothesis.] [We must show that P(k+1) is also true. That is, ~(p 1 p 2 p k p k+1 ) ~p 1 ~p 2 ~p k ~p k+1.] ~(p 1 p 2 p k p k+1 ) ~( (p 1 p 2 p k ) p k+1 ) ~(p 1 p 2 p k ) ~p k+1 by the two-variable De Morgan's Law (~p 1 ~p 2 ~p k ) ~p k+1 by the Inductive Hypothesis ~p 1 ~p 2 ~p k ~p k+1 That is, P(k+1) is true. Thus, by induction, P(n) is true for all integers n 2. (9 ) 8. Calculate the following sum or product. (I encourage you to include intermediate steps, which may give you partial credits in case you did the math wrong.) (a) (b) (c) 5 (i 2 5) i=3 3 (k! + k) k=0 3 (i j) i=1 j=i 5 (a) i=3 (i 2 5) = (9 5) + (16 5) + (25 5) = + 11 + 20 = 35 (b) 3 k=0 (k! + k) = (1 + 0) (1 + 1) (2 1 + 2) (3 2 1 + 3) = 1 2 9 = 72 3 (c) i=1 j=i(i j) = j=1 (1 j) + j=2 (2 j) + j=3 (3 j) = 1 (1 + 2 + 3 + ) + 2 (2 + 3 + ) + 3 (3 + ) = 10 + 18 + 21 = 9

(10 ) 9. A sequence a 0, a 1, a 2, is defined recursively as follows: a 0 = 2, a 1 = 9 a k = 5a k 1 6a k 2 for all integers k 2. Use strong mathematical induction to prove that for all integers n 0, a n = 5 3 n 3 2 n. Proof: we prove this by strong mathematical induction. Let P(n) denote a n = 5 3 n 3 2 n. Basis Step: we consider both P(0) and P(1). The LHS of P(0) is 2, and the RHS of P(0) is 5 3 0 3 2 0 = 5 3 = 2. So, P(0) is true. The LHS of P(1) is 9, and the RHS of P(0) is 5 3 1 3 2 1 = 15 6 = 9. So, P(1) is true. Inductive Step: we suppose P(0), P(1),, P(k) are all true for integer k 1. That is, a i = 5 3 i 3 2 i for any integer i such that 0 i k. [Above is our Inductive Hypothesis.] [We want to show that P(k+1) is also true. That is, a k+1 = 5 3 k+1 3 2 k+1.] a k+1 = 5a k 6a k 1 by the recursive definition = 5 (5 3 k 3 2 k ) 6 (5 3 k 1 3 2 k 1 ) by the Inductive Hypothesis = 75 3 k 1 30 2 k 1 30 3 k 1 + 18 2 k 1 by basic algebra = 5 3 k 1 12 2 k 1 = 5 9 3 k 1 3 2 k 1 = 5 3 k+1 3 2 k+1 That is, P(k+1) is true. Thus, by induction, P(n) is true for all integers n 0.