TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final examination Logic & Set Theory (2IT61/2IT07/2IHT10) (correction model)

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

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

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Negation introduction

Logic and Proof. Aiichiro Nakano

Discrete Mathematics and Its Applications

Propositional Logic Language

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Logic and Proofs. (A brief summary)

Section Summary. Section 1.5 9/9/2014

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

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

Seminaar Abstrakte Wiskunde Seminar in Abstract Mathematics Lecture notes in progress (27 March 2010)

Exercises 1 - Solutions

HANDOUT AND SET THEORY. Ariyadi Wijaya

Part Two: The Basic Components of the SOFL Specification Language

Section 1.1 Propositions

Propositional Logic Revision Tutorial. Mr Tony Chung

Truth-Functional Logic

Logic and Proofs. (A brief summary)

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Math 10850, fall 2017, University of Notre Dame

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

1. Propositions: Contrapositives and Converses

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

Advanced Topics in LP and FP

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

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

Lecture Notes on Inductive Definitions

Introduction to first-order logic:

Logic: The Big Picture

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Lecture 7. Logic. Section1: Statement Logic.

PHIL12A Section answers, 28 Feb 2011

Logic, Sets, and Proofs

CSC Discrete Math I, Spring Propositional Logic

Propositional Logic Not Enough

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Foundations of Artificial Intelligence

First order Logic ( Predicate Logic) and Methods of Proof

Chapter 4: Classical Propositional Semantics

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Propositional Resolution Introduction

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

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

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

3.1 Universal quantification and implication again. Claim 1: If an employee is male, then he makes less than 55,000.

Chapter 1 Elementary Logic

Lecture 3 : Predicates and Sets DRAFT

Lecture Notes on The Curry-Howard Isomorphism

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

CS103 Handout 12 Winter February 4, 2013 Practice Midterm Exam

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Introduction to Metalogic

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

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

Predicates, Quantifiers and Nested Quantifiers

Mat 243 Exam 1 Review

Language of Propositional Logic

Logic Part I: Classical Logic and Its Semantics

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Review: Potential stumbling blocks

Math 13, Spring 2013, Lecture B: Midterm

Chapter 4, Logic using Propositional Calculus Handout

The semantics of propositional logic

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

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

Propositional Logic: Part II - Syntax & Proofs 0-0

Metainduction in Operational Set Theory

Predicate Logic & Quantification

Paucity, abundance, and the theory of number: Online Appendices

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and

Natural Deduction for Propositional Logic

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

MAI0203 Lecture 7: Inference and Predicate Calculus

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Chapter 1. Logic and Proof

Computer Science Foundation Exam

Propositional Language - Semantics

CSE 20: Discrete Mathematics

4 Quantifiers and Quantified Arguments 4.1 Quantifiers

AI Programming CS S-09 Knowledge Representation

First Order Logic (FOL) 1 znj/dm2017

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Rigorous Software Development CSCI-GA

Propositional Logics and their Algebraic Equivalents

MAT2345 Discrete Math

ICS141: Discrete Mathematics for Computer Science I

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

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

CMPSCI 601: Tarski s Truth Definition Lecture 15. where

Transcription:

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica Final examination Logic & Set Theory (2IT61/2IT07/2IHT10) (correction model) Thursday October 29, 2015, 9:00 12:00 hrs. (2) 1. Determine whether the abstract propositions (a b) b and a ( b b) are comparable (i.e., the abstract proposition on the left is stronger than the abstract proposition on the right, or vice versa). Motivate your answer with a proof or a counterexample. Solution: We first make a truth table that includes both abstract propositions: a b b a b (a b) b b b a ( b b) 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 Note that the only assignment that makes the abstract proposition a ( b b) evaluate to 1 is when both a and b are assigned the value 1, and under this particular assignment to a and b also the abstract proposition (a b) b evaluates to true 1. It follows that (a ( b b)) == val (a b) b, and hence the two abstract propositions are comparable. Correction suggestions: A correct answer (2 points) argues that the right-hand side formula is stronger than the left-hand side formula. The argument may reason about the shape of the formulas (indirectly referring to the truth-table semantics of the connectives). Or it may consist a full truth table (as above) including columns for both abstract propositions with the explicit conclusion that every 1 in the column for (a ( b b)) is carried over to the column for ((a b) b), and therefore the first abstract proposition is stronger than the second. Or it may consist of a calculation showing that (a ( b b)) == val ((a b) b). A mix between the two types of arguments (first simplifying the abstraction propositions by means of a calculation, and drawing conclusions based truth-table semantics is also fine. Award 0.5 point for the observation that the abstract propositions are comparable. Award another 0.5 point for the observation that the right-hand side is stronger than the left-hand side abstract proposition. The latter may be implicit if the proof is presented in the form of a calculation. If a truth table is given, then it should be clear from the argument that the candidate knows which is the stronger of the two abstract propositions. The remaining 1 point is awarded for the argument that (a ( b b)) val == ((a b) b). If an argument referring to truth-table semantics is given, then it should at least be clear that (a ( b b)) = 1 only if a = 1 and b = 1, and that then also ((a b) b) = 1. If an argument by means of a calculation is given then it should be clear which standard equivalences and standard weakenings are applied (but references to their names are not needed). For a correct truth table without any conclusion whatsoever: award 1 point. For a correct truth table with conclusion that the abstract propositions are comparable (but no clear mentioning that the right-hand side abstract proposition is stronger than the left-hand side abstract proposition) award 1.5 point. 1

2. Let P be the set of all people; we assume that Anna and Bert are people (i.e., particular elements of the set P). Let M and F be unary predicates on P and let C and Y be binary predicates on P, with the following interpretations: M(x) means x is male, F (x) means x is female, C(x, y) means x is a child of y, Y (x, y) means x is younger than y. Give formulas of predicate logic that express the following statements: (1) (a) Everybody has a father. (1) (b) Anna is a younger sister of Bert. Solution: (a) The following formula of predicate logic expresses Everybody has a father : x [x P : y [y P M(y) : C(x, y)]]. (b) The following formula of predicate logic expresses Anna is a younger sister of Bert : Y (Anna, Bert) F (Anna) x,y [x, y P M(x) F (y) : C(Anna, x) C(Anna, y) C(Bert, x) C(Bert, y)]. Correction suggestions: (a) A correct answer, to be awarded with 1 point, gives the formula x [x P : y [y P M(y) : C(x, y)]], or any formula that can be obtained from this one by applying True/False-elimination, Domain Weakening, and Commutativity of conjunction. For a syntactically correct predicate logic formula that uses only the specified predicates and that is reasonably close to (but not exactly) one of the formulas specified as a correct answer above, you may consider awarding 0.5 point. A formula that is not syntactically correct should not get any points. (b) A correct answer, to be awarded with 1 point, specifies that Anna is younger than Bert, that Anna is female, and then Anna and Bert have at least one parent in common. So, also the formula Y (Anna, Bert) F (Anna) x [x P : C(Anna, x) C(Bert, x)] is worth a point. For syntactically correct formulas with minor flaws you may award 0.5 point. (If the candidate only forgets to add the requirement that Anna is female, you may decide to award full points.) A formula that is not syntactically correct should not get any points. 2

(3) 3. Prove with a derivation (i.e., using the methods described in Part II of the book) that the formula x y [P (y) Q(y, x)] z [ P (z) : u [Q(z, u)]] is a tautology. Solution: We have the following derivation: { Assume: } (1) x y [P (y) Q(y, x)] { Assume: } (2) var z; P (z) { -elim on (1): } (3) Pick an x with y [P (y) Q(y, x)] { -elim on (3) and (2): } (4) P (z) Q(z, x) { -elim on (4) and (2): } (5) Q(z, x) { -intro on (5): } (6) u [Q(z, u)] { -intro on (2) and (6): } (7) z [ P (z) : u [Q(z, u)]] { -intro on (1) and (7): } (8) x y [P (y) Q(y, x)] z [ P (z) : u [Q(z, u)] Correction suggestions: A correct answer (3 points) gives a derivation showing that the formula is a tautology. Award points for partly correct solutions: for correct -intro: 0.5 point; for correct -intro: 0.5 point; for correct -elim: 0.5 point; for correct -elim: 0.5 point; for correct -elim: 0.5 point; for correct -intro: 0.5 point. Let s not be too strict about omission of hints: if some or all hints are missing, subtract (at most) 0.5 points. We should be stricter about wrong applications of rules. I think it is worse to apply a rule incorrectly, than to not apply it at all. Subtract 0.5 point from the total number of 3

points obtained according to the scheme above for every incorrect application of a rule. For instance, if the -elim on the universal quantification in line (3) concludes P (y) Q(y, x) for some undeclared variable y, then this incorrect application of -elim does not yield 0.5 according to the scheme above, and, moreover, you also subtract 0.5 point from the total number of points awarded according to the scheme. Similarly, if the candidate concludes Q(z, u) instead of Q(z, x) in line (5) then this should be considered as an incorrect application of -elim (no point for -elim, and subtraction of 0.5 point for the incorrect application of the rule). (2) 4. Prove that (x < 0 x > 2) x 2 2x > 0 for all x R. Solution: Let x R, and assume that x < 0 x > 2. distinguish cases according to whether x < 0 or x > 2. To prove that x 2 2x > 0, we If x < 0, then also x 2 < 0. Since the product of two negative real numbers is positive, it follows that x(x 2) > 0 and hence x 2 2x > 0. If x > 2, then x > 0 and also x 2 > 0, and since the product of two positive real numbers is positive, it follows that x(x 2) > 0 and hence x 2 2x > 0. Correction suggestions: A correct answer (2 points) presents a proof of the universally quantified implication. Award 0.5 point for correctly dealing with the universal quantification (i.e., declaring x R). Award 0.5 point for correctly dealing with the implication (i.e., stating the assumption that x < 0 x > 2, then proceeding with an argument to show that x 2 2x > 0). Award 0.5 point for using the disjunction in a logically correct way. Award 0.5 point for mathematical core of the argument. 4

(3) 5. Let the sequence a 0, a 1, a 2,... be inductively defined by a 0 := 3 a 1 := 5 a i+2 := 4a i+1 3a i (i N). Prove that a n = 3 n + 2 for all n N. Solution: We prove that a n = 3 n + 2 for all n N by strong induction on n. Let n N, and suppose that for all i N such that i < n it holds that a i = 3 i + 2 (the induction hypothesis); we need to establish that a n = 3 n + 2. To this end, we distinguish three cases: If n = 0, then a n = 3 according to the definition of a n, and since also 3 n +2 = 1+3 = 3, it follows that a n = 3 n + 2. If n = 1, then a n = 5 according to the definition of a n, and since 3 n + 2 = 3 + 2 = 5, it follows that a n = 3 n + 2. If n 2, then a n = 4a n 1 3a n 2 according to the definition of a n. Since n 1, n 2 N and n 1, n 2 < n, by the induction hypothesis a n 1 = 3 n 1 +2 and a n 2 = 3 n 2 +2, so a n = 4(3 n 1 + 2) 3(3 n 2 + 2) = 4 3 n 1 + 8 3 3 n 2 6 = 4 3 n 1 3 n 1 + 2 = 3 3 n 1 + 2 = 3 n + 2. Correction suggestions: A correct answer (3 points) provides a proof that, given the inductive definition of the sequence a 0, a 1, a 2,..., it holds that a n = 3 n + 2 for all n N. The proof may be presented in natural language (as above), or in the form of a derivation. Naturally, the proof is by strong induction, and candidates who are able to set up a proof by strong induction (that is, manage to reproduce the formula for strong induction and then are able to deal with the ensued logical reasoning, with a -intro and an -intro), earn 1 points by doing so. The remaining 2 points are then earned as follows: correctly dealing with the definition of the a i, and, in particular, realising that there should be a case distinction, is worth 0.5 point; correct mathematical reasonings in the two basis cases is worth 0.5 point; correctly and explicitly using the induction hypothesis in the step case is worth 0.5 point; correctly doing the rest of the mathematical computation in the step case is worth 0.5 point. For correctly setting up a proof by (normal) induction, also award 1 point, and award part of the remaining 2 points as described above. (There will probably not be a case distinction, and the induction hypothesis will probably be used wrongly, so I guess that an attempt at a proof by normal induction will at most give 2 points. Unless, of course, the induction hypothesis is considerably strengthened.) For proofs that only deal with the first few cases explicitly, and then suggest that the property probably also holds in general, you may award (at most) 0.5 point (for correctly dealing with the base cases). 5

(2) 6. (a) Show with a counterexample that the formula X,Y [X, Y A : F (X) F (Y ) X\Y = ] does not hold for all mappings F : A B. (2) (b) Prove that if F : A B is an injection, then Solution: X,Y [X, Y A : F (X) F (Y ) X\Y = ]. (a) Let A = Z, B = N, and let F : A B be the mapping defined by F (x) = x 2. Furthermore, let X = {1} and Y = { 1}. Then X, Y A, and F (X) = F ({1}) = {1} and F (Y ) = F ({ 1}) = {1}, so F (X) F (Y ), but X\Y = {1}. (b) Let F : A B be an injection, and let X, Y A such that F (X) F (Y ); we need to establish that X\Y =. To this end, by the property of, it suffices to derive a contradiction from the assumption that x X\Y for some x A. Note that from the assumption x X\Y it follows, by the property of \, that x X and x Y. From x X it follows by the property of image that F (x) F (X), so, by the property of, we have that F (x) F (Y ). According to the property of image it follows from F (x) F (Y ) that there exists y Y such that F (x) = F (y). Then, since F is an injection, it follows that x = y, and hence x Y. We now have derived both x Y and x Y, and thus we have arrived at a contradiction. Correction suggestions: (a) A correct answer (2 points) defines an appropriate mapping F : A B, and sets X, Y A and argues that F (X) F (Y ), but not X\Y =. For a concrete definition of mapping F : A B (i.e., declarations of concrete sets A and B and defining, for every x A, what is F (x), award 1 point, provided that it is not injective. If there is a concrete definition of F : A B, but, unfortunately, it is injective, then award 0.5 point for the concrete definition of F : A B. Award 0.5 for concrete declarations of X and Y refuting the formula for the concretely defined F : A B. Award 0.5 for a decent argument that the declared F : A B, X and Y refute the implication F (X) F (Y ) X\Y =. A reasonable informal explanation as to why the formula does not hold, without explicit declarations of A, B, F : A B, X and Y may yield at most 1 point. (b) A correct answer (2 points) gives a proof of the property in terms of the given definitions and properties of sets and mappings. Explicitly naming the definitions and properties is not necessary, but it should, nevertheless, be clear which definition or property is used where. The proof may, of course, be presented in the form of a derivation. Award 0.5 point if the candidate shows that he or she knows what is an injection (by giving the formula for F : A B is an injection or for correctly using that F is an injection in the proof). Award 0.5 point if the candidate shows that he or she knows the properties of image. Award 0.5 point if the candidate shows that he or she knows the property of \. Award 0.5 point if the candidate shows that he or she knows how prove that a set is empty. 6

7. We define a binary relation R on N +, the set of all positive natural numbers, by k R l if, and only if, there exists c N with c 2 such that l = c k. (2) (a) Prove that R is transitive. Let V = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. (1) (b) Make a Hasse diagram of V, R. (1) (c) What are the minimal elements of V in V, R? What are the maximal elements of V in V, R? Solution: (a) To prove that R is transitive, let k, l, m N +, and suppose that k R l and l R m; we need to establish that k R m. From k R l and l R m, it follows, according to the definition of R, there exist c, d N with c, d 2 such that m = c l and l = d k. So m = c l = c (d k) = (c d) k. Moreover, since c, d N and c, d 2 we also have that c d N and c d 2. Hence, we may conclude, according to the definition of R, that k R m. (b) 8 10 4 6 9 5 2 3 7 1 (c) The minimal element of V, R is 1, and the maximal elements of V, are 6, 7, 8, 9, 10. Correction suggestions: (a) A correct answer (2 points) proves that R is transitive. Award 1 point if the candidate shows that he or she knows when a relation is transitive and correctly sets up the proof, with the declaration of three arbitrary positive natural numbers, assuming that the first is related to the second, and the second is related to the third, and stating that the goal is to establish that the first is related to the third. If the candidate only reproduces the formula for R is transitive (and nothing else), then award 0.5 point. Award 0.5 point for correctly dealing with the definition of R (in particular, declaring two (!) natural numbers greater or equal 2). Award 0.5 point for the mathematical part of the argument. (b) A correct answer (1 point) gives the Hasse diagram. The Hasse diagram should, of course, not have fewer or more connections between the elements. The relative positioning of connected elements (as above) should correctly indicate the direction of the relation. Alternatively, the direction may be indicated by an arrow instead of a connection without arrowheads, and then the relative positioning is not important. You may still award 0.5 point if the Hasse diagram is not correct, but reasonably close to the correct one. (c) A correct answer (1 point) mentions the minimal and maximal elements. Evaluate the answer against the Hasse diagram if it is present. Award 0.5 point for a correct specification of the minimal element. Award 0.5 point for a correct specification of the maximal elements. 7