CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

Similar documents
Herbrand Theorem, Equality, and Compactness

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

Predicate Logic: Sematics Part 1

Math 109 September 1, 2016

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

Chapter 1 : The language of mathematics.

Foundations of Mathematics Worksheet 2

Name: Mathematics 1C03

Selected problems from past exams

MATH 215 Sets (S) Definition 1 A set is a collection of objects. The objects in a set X are called elements of X.

Math 230 Final Exam, Spring 2009

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

First-Order Logic (FOL)

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations

Exam in Discrete Mathematics

MATH FINAL EXAM REVIEW HINTS

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

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

Part IA Numbers and Sets

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

COT3100 SI Final Exam Review

Background for Discrete Mathematics

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

MATH 2200 Final Review

MATH 215 Final. M4. For all a, b in Z, a b = b a.

There are seven questions, of varying point-value. Each question is worth the indicated number of points.

Logic. Facts (with proofs) CHAPTER 1. Definitions

CSE 20. Final Review. CSE 20: Final Review

CHAPTER 3. Congruences. Congruence: definitions and properties

Foundations of Mathematics

MATH 201 Solutions: TEST 3-A (in class)

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Relations. Binary Relation. Let A and B be sets. A (binary) relation from A to B is a subset of A B. Notation. Let R A B be a relation from A to B.

1.1 Language and Logic

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Review 3. Andreas Klappenecker

Date: October 24, 2008, Friday Time: 10:40-12:30. Math 123 Abstract Mathematics I Midterm Exam I Solutions TOTAL

7.11 A proof involving composition Variation in terminology... 88

Mathematics 220 Homework 4 - Solutions. Solution: We must prove the two statements: (1) if A = B, then A B = A B, and (2) if A B = A B, then A = B.

Foundations of Computation

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

0 Logical Background. 0.1 Sets

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

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Foundations Revision Notes

MATH 13 FINAL EXAM SOLUTIONS

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

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Notes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013

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.

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

MATH 363: Discrete Mathematics

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

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

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Lecture 13: Soundness, Completeness and Compactness

Proofs. Chapter 2 P P Q Q

Proofs. Chapter 2 P P Q Q

CSE 311: Foundations of Computing I Autumn 2014 Practice Final: Section X. Closed book, closed notes, no cell phones, no calculators.

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

HANDOUT AND SET THEORY. Ariyadi Wijaya

10 Problem 1. The following assertions may be true or false, depending on the choice of the integers a, b 0. a "

CS280, Spring 2004: Prelim Solutions

CS156: The Calculus of Computation Zohar Manna Winter 2010

Math 3000 Section 003 Intro to Abstract Math Final Exam

Review Problems for Midterm Exam II MTH 299 Spring n(n + 1) 2. = 1. So assume there is some k 1 for which

Economics 204 Summer/Fall 2017 Lecture 1 Monday July 17, 2017

Section 0. Sets and Relations

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

Predicate Logic. Andreas Klappenecker

Number Theory. Final Exam from Spring Solutions

Harvard CS 121 and CSCI E-207 Lecture 6: Regular Languages and Countability

Complete Induction and the Well- Ordering Principle

Practice Exam 1 CIS/CSE 607, Spring 2009

Name: Student ID: Instructions:

CMPSCI 601: Tarski s Truth Definition Lecture 15. where

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

Assignment #2 COMP 3200 Spring 2012 Prof. Stucki

1 Predicates and Quantifiers

Chapter 1. Sets and Mappings

MATH 114 Fall 2004 Solutions to practice problems for Final Exam

Math /Foundations of Algebra/Fall 2017 Foundations of the Foundations: Proofs

Introduction to Proofs

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

*EXAM 1 Answer key* EECS 203 Spring 2016

Chapter 3 Basic Number Theory

NORTHERN INDIA ENGINEERING COLLEGE, LKO D E P A R T M E N T O F M A T H E M A T I C S. B.TECH IIIrd SEMESTER QUESTION BANK ACADEMIC SESSION

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

CSE 1400 Applied Discrete Mathematics Definitions

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

At least one of us is a knave. What are A and B?

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

1 Partitions and Equivalence Relations

Transcription:

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati Important 1. No questions about the paper will be entertained during the exam. 2. You must answer each question in the space provided for that question in the answer sheet. Answers appearing outside the space provided will not be considered. 3. Keep your rough work separate from your answers. A supplementary sheet is being provided for rough work. Do not attach your rough work to the answer sheet. 4. This exam has 3 questions over 5 pages, with a total of 50 marks. 1. Indicate whether the following statements are true (T) or false (F). Each question carries two marks. A wrong answer will get you 2 marks for each question. (a) For sets A, B and C, if A C = B C and A C = B C then A = B. Solution: TRUE. To prove that A B, take any a A and assume a B. Then a A C = B C. Then a C, and therefore a A C = B C, which implies a B, a contradiction. The proof of B A is symmetric. (b) For sets A, B and C, the equality (A \ B) \ C = A \ (B \ C) holds, where the set difference operation is defined as A \ B = {a A a B}. Solution: FALSE. Take A = B = C = {1}. A \ (B \ C) = {1}. Then (A \ B) \ C =, but (c) There is a bijection from the closed interval [0, 1] of the reals to the closed interval [0, 2] of the reals. Here [a, b] = {x R a x b}. Solution: TRUE. It is easily checked that the function f : [0, 1] [0, 2] defined by f(x) = 2x is a bijection. (d) The function f(x) = (1/x) 1 is a bijection from the half open interval (0, 1] = {x x R and 0 < x 1} on the reals to the non-negative reals R 0 = {x x R and x 0}. Solution: TRUE. It is easily checked that f is a bijection between the two sets. (e) Let Z + be the set of positive integers and R Z 2 + Z 2 + be the relation defined by ((a, b), (c, d)) R if and only if ad = bc. Then R is an equivalence relation.

CS 514 (Cont.) Autumn 2017 Page 2 of 5 Solution: TRUE. The three properties of an equivalence relation can be easily checked. (f) Let R 1 and R 2 be equivalence relations on a set X. Then R 1 R 2 is also an equivalence relation. Solution: FALSE. Let X = {a, b, c}, R 1 = {(a, a), (b, b), (c, c), (a, b), (b, a)} and R 2 = {(a, a), (b, b), (c, c), (b, c), (c, b)}. Then R 1 and R 2 are equivalence relations but R 1 R 2 is not an equivalence relation. (g) Let (Z, ) be the set of integers with the relation m n meaning m divides n, i.e., there exists a k Z such that n = mk. Then the divides relation on integers is a partial order. Solution: FALSE. The relation is not antisymmetric, since 5 divides 5 and 5 also divides 5, but 5 5. (h) If A is an uncountable set and B is a countable set then A \ B = {a A a B} is uncountable. Solution: TRUE. If A \ B were countable then A = (A \ B) (A B), being a union of two countable sets, would also be countable. (16) 2. Indicate whether the following statements are true (T) or false (F). Each question carries two marks. A wrong answer will get you 2 marks for each question. (a) If a formula A in propositional logic is satisfiable, then A is unsatisfiable. Solution: FALSE. The formulas P and P are both satisfiable, where P is an atomic formula. (b) A formula A in propositional logic is valid iff A is unsatisfiable. Solution: TRUE. A is valid iff every truth assignment τ satisfies A iff every truth assignment falsifies A iff A is unsatisfiable. (c) (A B) is equivalent to ( B A), where A and B are arbitrary formulas of propositional logic.

CS 514 (Cont.) Autumn 2017 Page 3 of 5 Solution: TRUE. Use truth tables for (A B) and ( B A). (d) If P is a binary predicate symbol in first-order logic then the formula ( y xp (x, y)) ( x yp (x, y)) is valid. Solution: TRUE. Using informal arguments, suppose the structure M satisfies y xp (x, y). Then M satisfies xp (x, m) for some m M, where M is the universe of M. This implies M satisfies P (n, m) for all n M and some m M, which is the same as M satisfies x yp (x, y). (e) The first-order logic formula ( x(p (x) Q(x)) (( xp (x)) ( xq(x)))) is valid. Here P and Q are unary predicate symbols. Solution: FALSE. Take the structure M with the universe M = N and P M (n) is true iff n is odd and Q M (n) is true iff n is even. (f) The first-order sentence x y (x = y) is satisfied by an interpretation iff its universe contains exactly two elements. Solution: FALSE. The formula says the universe contains at least two elements. (g) Consider the sentence A = (A 1 A 2 A 3 A 4 ) in first-order logic, where P is a binary predicate symbol and A 1, A 2, A 3 and A 4 are defined as follows: A 1 = xp (x, x) A 2 = x y((p (x, y) P (y, x)) x = y) A 3 = x y z((p (x, y) P (y, z)) P (x, z)) A 4 = y x(p (x, y) (x = y)) Then all interpretations that satisfy A are infinite, i.e., have infinite domains (universes). Solution: TRUE. The first three sentences together assert that the interpretation of P must be a partial order. The last sentence says that there is no minimal element, which implies the order must be infinite. (h) Consider the sentence A = (A 1 A 2 A 3 ) in first order logic, where P is a binary predicate symbol and A 1, A 2 and A 3 are defined as follows: A 1 = x P (x, x) A 2 = x y(p (x, y) P (y, x)) A 3 = x y z((p (x, y) P (y, z)) P (x, z))

CS 514 (Cont.) Autumn 2017 Page 4 of 5 Then A is satisfiable. Solution: TRUE. The three sentences together assert that the interpretation of P must be a non-reflexive, symmetric and transitive relation. The structure M with the universe any non-empty set (e.g., N) with P M =, the empty relation, satisfies the sentence A. (16) 3. Indicate whether the following statements are true or false, with a justification. There is no negative marking for this question but without proper justification you won t get any credit. Each question carries 3 marks. (a) If a b (mod m) and c d (mod m), where a, b, c, d and m are integers with c and d positive and m 2, then a c b d (mod m). Solution: FALSE. Take m = 3, a = b = 2, c = 1 and d = 4. Then a c = 2 and b d = 16 and 2 16 (mod 3). (b) There are no three consecutive odd positive integers, all greater than 3, that are primes, i.e., there are no odd primes of the form p, p + 2 and p + 4 where p > 3. Solution: TRUE. If p is a multiple of 3 then the statement holds since we are given p > 3. Suppose not, i.e., p 1 (mod 3) or p 2 (mod 3). In the first case, p + 2 is divisible by 3 and in the second, p + 4 is divisible by 3 and both are greater than 3. (c) 937 is a multiplicative inverse of 13 modulo 2436. Solution: TRUE. 937 13 = 12181 = 2436 5 + 1. (d) The congruence 4x 5 (mod 9) has no solution in x. Solution: FALSE. Take x = 8. In general, any k which is relatively prime to n has an inverse modulo n, so 4 has an inverse modulo 9. Multiply both sides of the congruence by 4 1. (e) If p is a prime, the only solution of x 2 x 1 (mod p) or x 1 (mod p). 1 (mod p) are integers x such that Solution: TRUE. x 2 1 (mod p) iff p divides (x 2 1) iff p divides (x + 1) or p divides (x 1), and the result follows.

CS 514 (Cont.) Autumn 2017 Page 5 of 5 (f) 22 200000001 has a multiplicative inverse modulo 49. Solution: TRUE. 22 and 49 are relatively prime, and therefore 22 200000001 and 49 are relatively prime as well. (18)