Assignment 3 Logic and Reasoning KEY

Similar documents
Prob. 1 Prob. 2 Prob. 3 Total

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

Midterm 1. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You:

Prob. 1 Prob. 2 Prob. 3 Total

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions

Discrete Mathematics and Probability Theory Summer 2015 Chung-Wei Lin Midterm 1

Game Theory: Lecture #5

and problem sheet 1

Omega notation. Transitivity etc.

Writing Mathematical Proofs

Mathematical Induction. EECS 203: Discrete Mathematics Lecture 11 Spring

Discrete Mathematics and Probability Theory Summer 2014 James Cook Midterm 1 (Version B)

PROBLEMS OF MARRIAGE Eugene Mukhin

Introducing Proof 1. hsn.uk.net. Contents

Matching Theory and the Allocation of Kidney Transplantations

We set up the basic model of two-sided, one-to-one matching

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Midterm 1

Solution to Proof Questions from September 1st

MAT 300 RECITATIONS WEEK 7 SOLUTIONS. Exercise #1. Use induction to prove that for every natural number n 4, n! > 2 n. 4! = 24 > 16 = 2 4 = 2 n

CS173 Strong Induction and Functions. Tandy Warnow

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

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

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

MA103 STATEMENTS, PROOF, LOGIC

Matching. Terence Johnson. April 17, University of Notre Dame. Terence Johnson (ND) Matching April 17, / 41

Propositional Logic: Semantics

Math 10850, fall 2017, University of Notre Dame

The key is that there are two disjoint populations, and everyone in the market is on either one side or the other

Introduction to Basic Proof Techniques Mathew A. Johnson

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Midterm 1

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

Consider a complete bipartite graph with sets A and B, each with n vertices.

Introduction to Proofs

PGSS Discrete Math Solutions to Problem Set #4. Note: signifies the end of a problem, and signifies the end of a proof.

3 The language of proof

Math 38: Graph Theory Spring 2004 Dartmouth College. On Writing Proofs. 1 Introduction. 2 Finding A Solution

Cambridge University Press How to Prove it: A Structured Approach: Second edition Daniel J. Velleman Excerpt More information

What do you do when you can t use money to solve your problems?

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

Algorithms: COMP3121/3821/9101/9801

Midterm 1. Total. CS70 Discrete Mathematics and Probability Theory, Spring :00-9:00pm, 1 March. Instructions:

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3

1 Implication and induction

Matching Problems. Roberto Lucchetti. Politecnico di Milano

CS 6901 (Applied Algorithms) Lecture 2

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

REVIEW PROBLEMS FOR SECOND 3200 MIDTERM

MAT246H1S - Concepts In Abstract Mathematics. Solutions to Term Test 1 - February 1, 2018

Chapter 1 Review of Equations and Inequalities

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

Logic, Sets, and Proofs

HOW TO WRITE PROOFS. Dr. Min Ru, University of Houston

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1

Definition 2. Conjunction of p and q

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)?

1. Prove that the number cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3).

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

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

Math 31 Lesson Plan. Day 16: Review; Start Section 8. Elizabeth Gillaspy. October 18, Supplies needed: homework. Colored chalk. Quizzes!

CS 598RM: Algorithmic Game Theory, Spring Practice Exam Solutions

CS 246 Review of Proof Techniques and Probability 01/14/19

Solutions to Quiz 1. Problem 1 (20 points). Suppose S(n) is a predicate on natural numbers, n, and suppose. k N S(k) S(k + 2). (1)

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

Mathematical induction

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.

Matching Problems. Roberto Lucchetti. Politecnico di Milano

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final exam Logic & Set Theory (2IT61) (correction model)

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 20. To Infinity And Beyond: Countability and Computability

Notice how these numbers thin out pretty quickly. Yet we can find plenty of triples of numbers (a, b, c) such that a+b = c.

Introduction to Induction (LAMC, 10/14/07)

Two-Sided Matching. Terence Johnson. December 1, University of Notre Dame. Terence Johnson (ND) Two-Sided Matching December 1, / 47

Logical equivalences 12/8/2015. S T: Two statements S and T involving predicates and quantifiers are logically equivalent

ASSIGNMENT 1 SOLUTIONS

MAS114: Solutions to Exercises

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Homework 3. This homework is due September 22, 2014, at 12:00 noon.

Analysis of Algorithms Fall Some Representative Problems Stable Matching

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

1. Propositions: Contrapositives and Converses

MI 4 Mathematical Induction Name. Mathematical Induction

Lecture 27: Theory of Computation. Marvin Zhang 08/08/2016

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

Greedy Homework Problems

Section 3.1: Direct Proof and Counterexample 1

What can you prove by induction?

Example. How to Guess What to Prove

INTRODUCTION TO LOGIC

A Brief Introduction to Proofs

Undecidability and Rice s Theorem. Lecture 26, December 3 CS 374, Fall 2015

Mathematical Induction

Try the assignment f(1) = 2; f(2) = 1; f(3) = 4; f(4) = 3;.

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Note 2

CS 173: Induction. Madhusudan Parthasarathy University of Illinois at Urbana-Champaign. February 7, 2016

Math 13, Spring 2013, Lecture B: Midterm

Proof Techniques (Review of Math 271)

Discrete Mathematics and Probability Theory Summer 2014 James Cook Midterm 1

To every formula scheme there corresponds a property of R. This relationship helps one to understand the logic being studied.

At the start of the term, we saw the following formula for computing the sum of the first n integers:

Transcription:

Assignment 3 Logic and Reasoning KEY Print this sheet and fill in your answers. Please staple the sheets together. Turn in at the beginning of class on Friday, September 8. Recall this about logic: Suppose there is no life on Mars. Then the statement: All Martians are green is a true statement. Any statement in logic is true if no counterexample can exist. If there is no example of it either, it is what is called vacuously true. Hint: Several of these questions relate to the logic truth table for implication. When you work them, be sure to identify the propositions in the implication statements. Then you can reason about the entire statement based on what you know about the propositions. 1. Suppose you know that A B is true and that A is true. What do these facts tell you about the value of B, if anything? B is true 2. Suppose you know that A B is true and that A is false. What do these facts tell you about the value of B, if anything? nothing 3. Suppose you know that A B is true and B is false. What do these facts tell you about the value of A, if anything? A is false 4. Tell whether the following implication statement is true under each of the following scenarios, or state that it can t be determined: (All politicians are dishonest) (The country is in trouble) a. All politicians are dishonest is a true statement. A is true, so implication can be either true or false, depending on whether B is true or false b. There exists an honest politician is a true statement A is false, so implication is true c. The country is in trouble is a true statement. B is true, so implication is true 5. Suppose: (All politicians are dishonest) (The country is in trouble) is a true statement, but the country is in trouble is a false statement. Precisely what do these facts imply about politicians? Implication is true and B is false, so A has to be false 6. For which integer values of n is the following statement true? (n = 6) (n + 1 = 7)

A is (n=6) and B is (n + 1 = 7). The implication is true except for when A is true and B is false. But B can never be false if A is true, because n is 6 in that case and 6 + 1 is 7. 7. Use a truth table to solve for the values of A, B, given the following statements are true:! A B,! B! C, C If C is true and!b=>!c, this means that we re looking for values of B where the implication is true and C is true. C is true so!c is false and for this implication to be true it means that!b has to be false. This means B is true. If B is true and!a=>b, then A could be either 0 or 1 8. Here is a proof that 1 for all 1. For 1, let If is false, the implication is automatically true. If is true, then: 1, and 1 11 1 1 1 1 means is true. is true in this case, as well. For each of the following statements, tell whether we have proved the statement true: a. Yes b. Yes c. is true No d. is false No

9. Joe Bloggs wants to show that is true for arbitrary 1. He gives a correct proof that for all 1, but he forgot the base case. Another student gives a correct proof that is false. For each of the following tell whether we can conclude that it is true or false, or else indicate that there is not enough information. a. True b. True c. A 8 is false since we know that A 9 is false and the implication A k =>A k+1 is true an additional correct interpretation is that we can t tell because if the implication is true, we don t know about A and B. They could be either T or F. d. A 1 is false from the same reasoning; the falseness propagates backwards true an additional correct interpretation is that we can t tell because if the implication is true, we don t know about A and B. They could be either T or F. e. Unknown because the A proposition is false, and the implication is true so the B proposition could be either true or false f. is false for an infinite set of values k Same argument as e 10. Here is a proof by induction that all babies have the same eye color. The babies in the world are a set of babies, so it suffices to show that every set of babies has a uniform eye color. Let is true for all 1, then this will prove that is true, where is the number of babies in the world. That will mean that all babies have the same eye color. Base Case: is true because in every set of babies that has just one baby, there are no two babies in the set that have different eye colors. Induction step: Let 1. If is false, then is true. So suppose is true. Let,,...,, be an arbitrary set of k+1 babies. Then,,..., and,,..., are two sets of k babies. Since is true all babies in each of these sets have the same eye color. Therefore, and have the same eye color as the babies in,,...,, so they have the same eye color as each other, and all babies in have the same eye color. Since is an arbitrary set of 1 babies. the same argument applies to every set of 1 babies, and is true: is true in this case also. We conclude that whether or not is true, is true. Which of the following have been successfully proved to be true by the arguments? Problem with proof is going from 1 to 2. From sets of 2 on, there is overlap across the sets, but when looking at sets of size 1 there isn t any overlap, so going from sets of size 1 to size 2 isn t proven. a. True b. Yes

c. No 11. Suppose that in every set of two babies, both babies have the same eye color. What would this imply about the eye colors of all babies? All the same. Here k starts strictly greater than 1 12. Here are some statements related to the book s proof of correctness of Gale Shapley. A: The set returned by every execuon G S is a stable matching. B: The set returned by an execuon of G S is never a stable matching. C: A set S returned by some execuon of G S is not a stable matching. D: In S, there exist pairs (m,w) and (m,w ) such that m prefers w to w and w prefers m to m. E: In S, there exist pairs (m,w) and (m, w ) such that m prefers w to w and w prefers m to m. F: w rejects m, and traded up to higher and higher men in her list, culminang in m. A is the end point where we want to be. We prove by contradiction, so we need to choose C as this statement. B is not the contradiction because we just need to show that there is some execution that doesn t return a stable matching. For the contraction, there has to be a pair that would rather be with each other than their current partners, and this is what D states. So now we re looking for starting with C, including D, and getting to A. Could be either a or c. However, c includes E but E is incorrect. F tells what must have happened to get to D, so we think it must be a. So we check the implication logic and it works out. Which of the following best reflects the logical structure of the proof? (Circle one choice.) a. Using logic, it shows that, and! are true statements, without yet resolving the values of,,.!! is true. Therefore is true. Since,!, so! is true.!, is true. b. Using logic, it shows that, and! are true statements, without yet resolving the values of,, and.!! is true.!, so is true. c. Using logic, it shows that,, and!are true statements, without yet resolving the values of,, and.!! is true. Therefore! is true. Since,!!, so! is true.!, so is true.

13. In the stable matching problem, let two lovebirds be a man and a woman who each first on the other s list. Let a last resort denote a man and a woman that are each last on the other s list. For each of the following, either prove that the statement is true or prove that it is false. To prove a statement is false, come up with a counterexample. (For such a proof, it is desirable to find the smallest counterexample you can think of.) IF you want to prove the statement true, use proof by contradiction: assume that it is false and derive a contradiction. a. Claim: No stable matching contains a last resort. By counter example: Last resort: m 1 : w 1, w 2 w 1 : m 1, m 2 m 2 : w 1, w 2 w 2 : m 1, m 2 matching: {(m 1, w 1 ), (m 2, w 2 )} stable, with a last resort b. Claim: Every stable matching contains a pair of lovebirds. A pair of lovebirds is two people, not two couples. By counter example m 1 : w 1, w 2 w 1 : m 2, m 1 m 2 : w 2, w 1 w 2 : m 1, m 2 matching: {(m 1, w 1 ), (m 2, w 2 )} stable, with no lovebirds c. Claim: Whenever there is a pair of lovebirds. They are married in every stable matching. By contradiction: assume m 1, w 1 are lovebirds. This means: m 1 : w 1,.. w 1 : m 1,. m n : w n : There is a stable matching where they are not paired: { (m 1, w n ) (m n, w 1 ) }. For this to occur, w 1 must have never been asked by m 1, or rejected m 1 in favor of m n. But she would have been asked by m 1 since she s first on his preference list and if she wasn t free at that point she would have traded up to m 1 since he s first on her preference list. 14. We have shown that the number of proposals until the algorithm halts is at most, since none of the n men can make more than n proposals. We haven t proved that this many proposals could ever happen. Show that it can be the case that there are at least proposals before it halts. m 1 w 1 m n w n

Assume that all the men have the same preferences, and all the women do to, each group starting with 1 and going to n. So m 1 will make 1 proposal to get a match, and m 2 will make 2 and so on. So the total number of proposals is = = n 2 /2 + n/2, which is a little more than n 2 /2 and so we get Θ(n 2 ) 15. Prove or disprove: 17 is prime for all 0. Try 17: 17 2 + 17 + 17 = 17 * (17 + 1 + 1) = 17 * 19, but this is divisible by 17 as well as 1, so it isn t prime.