UWO CS2214 Feb. 4, Assignment #1 Due: Feb. 12, 2017, by 23:55 Submission: on the OWL web site of the course

Similar documents
UWO CS2214 Jan. 19, Assignment #1 Due: Jan. 29, 2017, by 23:55 Submission: on the OWL web site of the course

447 HOMEWORK SET 1 IAN FRANCIS

Section 4.4 Functions. CS 130 Discrete Structures

REVIEW FOR THIRD 3200 MIDTERM

Functions as Relations

Functions. Given a function f: A B:

Solutions to Homework Problems

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

and problem sheet 6

4.1 Real-valued functions of a real variable

Functions Functions and Modeling A UTeach/TNT Course

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

MATH 13 FINAL EXAM SOLUTIONS

Name (print): Question 4. exercise 1.24 (compute the union, then the intersection of two sets)

9 FUNCTIONS. 9.1 The Definition of Function. c Dr Oksana Shatalov, Fall

(a) We need to prove that is reflexive, symmetric and transitive. 2b + a = 3a + 3b (2a + b) = 3a + 3b 3k = 3(a + b k)

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

COM S 330 Homework 05 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem.

SETS AND FUNCTIONS JOSHUA BALLEW

Chapter 1 : The language of mathematics.

CS100: DISCRETE STRUCTURES

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

MATH 2200 Final LC Review

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

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

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

Homework 1 Solutions

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition.

HOMEWORK ASSIGNMENT 6

Functions. Definition 1 Let A and B be sets. A relation between A and B is any subset of A B.

Thus, X is connected by Problem 4. Case 3: X = (a, b]. This case is analogous to Case 2. Case 4: X = (a, b). Choose ε < b a

Ross Program 2017 Application Problems

By (a), B ε (x) is a closed subset (which

All numbered readings are from Beck and Geoghegan s The art of proof.

Solutions Quiz 9 Nov. 8, Prove: If a, b, m are integers such that 2a + 3b 12m + 1, then a 3m + 1 or b 2m + 1.

MAS114: Solutions to Exercises

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

Math 210 Exam 2 - Practice Problems. 1. For each of the following, determine whether the statement is True or False.

Cartesian Products and Relations

Section Summary. Definition of a Function.

Math 4606, Summer 2004: Inductive sets, N, the Peano Axioms, Recursive Sequences Page 1 of 10

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

5 FUNCTIONS. 5.1 Definition and Basic Properties. c Dr Oksana Shatalov, Fall

Notes. Functions. Introduction. Notes. Notes. Definition Function. Definition. Slides by Christopher M. Bourke Instructor: Berthe Y.

RED. Fall 2016 Student Submitted Sample Questions

CISC-102 Fall 2017 Week 3. Principle of Mathematical Induction

A n = A N = [ N, N] A n = A 1 = [ 1, 1]. n=1

Numbers, sets, and functions

CHAPTER 7 FUNCTIONS. Alessandro Artale UniBZ - artale/

Your quiz in recitation on Tuesday will cover 3.1: Arguments and inference. Your also have an online quiz, covering 3.1, due by 11:59 p.m., Tuesday.

Math 42, Discrete Mathematics

Practice Second Midterm Exam III

Topology Exercise Sheet 2 Prof. Dr. Alessandro Sisto Due to March 7

Math 140A - Fall Final Exam

Course 212: Academic Year Section 1: Metric Spaces

Implication (6A) Young Won Lim 3/17/18

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

QUESTION BANK II PUC SCIENCE

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

Section 7.2: One-to-One, Onto and Inverse Functions

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

Math Fall 2014 Final Exam Solutions

MATH 224 FOUNDATIONS DR. M. P. M. M. M C LOUGHLIN HAND-OUT XIV FUNCTIONS REVISED 2016

MATH FINAL EXAM REVIEW HINTS

Introduction to Proofs

Homework 5 Solutions

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

Direct Proof and Proof by Contrapositive

ANALYSIS QUALIFYING EXAM FALL 2017: SOLUTIONS. 1 cos(nx) lim. n 2 x 2. g n (x) = 1 cos(nx) n 2 x 2. x 2.

LESSON RELATIONS & FUNCTION THEORY

Section 1.7 Proof Methods and Strategy. Existence Proofs. xp(x). Constructive existence proof:

Topics in Logic, Set Theory and Computability

Introduction to Abstract Mathematics

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY COIMBATORE Discrete Mathematics Functions

Principle of Mathematical Induction

HOW TO CREATE A PROOF. Writing proofs is typically not a straightforward, algorithmic process such as calculating

Solved Examples. Given are two sets A {1, 2, -2, 3} and B = {1, 2, 3, 5}. Is the function f(x) = 2x - 1 defined from A to B?

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS. 1. Combinatorics

Math 4603: Advanced Calculus I, Summer 2016 University of Minnesota Notes on Cardinality of Sets

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

Math 127 Homework. Mary Radcliffe. Due 29 March Complete the following problems. Fully justify each response.

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

Contribution of Problems

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

CS103 Handout 08 Spring 2012 April 20, 2012 Problem Set 3

Homework 5 Solutions

Proof worksheet solutions

1 Homework. Recommended Reading:

0 Logical Background. 0.1 Sets

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

3 Hausdorff and Connected Spaces

TIPS FOR WRITING PROOFS IN HOMEWORK ASSIGNMENTS. 1. Simple rules

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

MAS114: Exercises. October 26, 2018

MATH 54 - TOPOLOGY SUMMER 2015 FINAL EXAMINATION. Problem 1

Topological Vector Spaces III: Finite Dimensional Spaces

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Inverse Functions

Maths 212: Homework Solutions

Transcription:

UWO CS2214 Feb. 4, 2019 Assignment #1 Due: Feb. 12, 2017, by 23:55 Submission: on the OWL web site of the course Format of the submission. You must submit a single file which must be in PDF format. All other formats (text or Miscrosoft word format) will be ignored and considered as null. You are strongly encouraged to type your solutions using a text editor. To this end, we suggest the following options: 1. Miscrosoft word and convert your document to PDF 2. the typesetting system L A TEX; see https://www.latex-project.org/ and https://en.wikipedia.org/wiki/latex#example to learn about L A TEX; see https://www.tug.org/begin.html to get started 3. using a software tool for typing mathematical symbols, for instance http://math.typeit.org/ 4. using a Handwriting recognition system such as those equipping tablet PCs Hand-writing and scanning your answers is allowed but not encouraged: 1. if you go this route please use a scanning printer and do not take a picture of your answers with your phone, 2. if the quality of the obtained PDF is too poor, your submission will be ignored and considered as null. Problem 1 (Proving properties about the integers) [15 marks] Prove or disprove the following properties: 1. For every integer n we have n n 2. 2. For every integer n, the integer n 2 + n + 1 is odd. Solution 1 1. We proceed by cases, considering n 0 and 1 n. If n is a nonpositive integer, we have n 0 and also 0 n 2, thus we have n n 2. If n is a positive integer, we have 1 n and n n, which imply n n 2. 1

2. We proceed by cases, considering n even abd n odd. If n is even, then there exists an integer k such that n = 2 k holds and we have n 2 + n + 1 = 4 k 2 + 2 k + 1, thus implying that n 2 + n + 1 is odd. If n is odd, then there exists an integer k such that n = 2 k + 1 holds and we have n 2 + n + 1 = 4 k 2 + 6 k + 3, thus again implying that n 2 + n + 1 is odd. Problem 2 (Proving properties about real numbers) [15 marks] Prove or disprove the following properties: 1. For every real number x, if x 0 or 1 x holds, then x x 2 holds as well. 2. For all real number x we have 2x = 2 x Solution 2 1. One can prove the claim in the same way that we proved the first claim of Problem 1, thus by considering the two cases x 0 and 1 x. Note that when 0 < x < 1 holds we have x 2 < x; of course this configuration cannot happen in the integer case. An alternative proof of can be by solving the inequation ((x 0) (1 x)) (x x 2 ) x x 2 the solution set of which being precisely: (x 0) (1 x). 2. The claim is false. To show this, it is suffcient to exhibit a counterexample. Consider x = 1.6. We have 2 x = 2 1 = 2 and 2x = 3.2 = 3. As an additional remark, consider a real number x of the form n + ε where n is an integer and 1 2 < ε < 1 holds. Then we have While we have 2 x = 2n. 2x = 2(n + ε) = 2 n + 1 + (2 ε 1) = 2 n + 1, since 0 < 2 ε 1 < 1 holds. 2

Problem 3 (Properties of preimage sets) [20 marks] Let f be a function from a set A to a set B. Let S and T be two subsets of B. Prove the following properties: 1. f 1 (S T ) = f 1 (S) f 1 (T ) 2. f 1 (S T ) = f 1 (S) f 1 (T ) Your proof should be in the style of the proofs done in class, see Section 1.7 of the slides. Solution 3 1. By definition, the set f 1 (S) is the set the elements x A such that f(x) S holds. Similarly: the set f 1 (T ) is the set the elements x A such that f(x) T holds. the set f 1 (S T ) is the set the elements x A such that f(x) S T holds. It follows that if an element x A belongs to f 1 (S T ), then either f(x) S or f(x) T holds, that is, either x f 1 (S) or x f(x) T holds. Thus, we have proved the following implication for all x A: that is, The inclusion x f 1 (S T ) x f 1 (S) f 1 (T ), f 1 (S T ) f 1 (S) f 1 (T ). f 1 (S) f 1 (T ) f 1 (S T ) is proved in a similar way. 2. To prove the equality f 1 (S T ) = f 1 (S) f 1 (T ) we could proceed as for f 1 (S T ) = f 1 (S) f 1 (T ). For variety, we provide a more compact proof avoiding the proof of the two inclusions. Consider an arbitrary element x in A. Then, the following equivalences hold: x f 1 (S T ) f(x) S T (f(x) S) (f(x) T ) (x f 1 (S)) (x f 1 (T )) x f 1 (S) f 1 (T ). Problem 4 (Properties of functions) [30 marks] Which of the functions below is injective? surjective? When the function is bijective, determine its inverse. Justify your answers. 3

1. f 1 : 2. f 2 : 3. f 3 : 4. f 4 : Z Z n 2019n + 1 Z Z n n/2 + n/2 x x x x (f 3 (x)) 2 Solution 4 1. f 1 is injective. Indeed, if two integers n 1 and n 2 have the same image by f 1, then we have 2019n 1 + 1 = 2019n 2 + 1, which implies 2019n 1 = 2019n 2 and thus n 1 = n 2. However, f 1 is not surjective. Indeed, the integer m = 0 has no pre-images via f 1 since 2019n + 1 = 0 yields n = 1 2019 which is not an integer. 2. Let us first understand what f 2 computes. It is natural to distinguish two cases: n even and n odd. If n is even, then there exists an integer k such that we have n = 2k. In this case, we have n/2 + n/2 = (2k)/2 + (2k)/2 = k + k = k + k = n. If n is odd, then there exists an integer k such that we have n = 2k+1. In this case, we have n/2 + n/2 = (2k+1)/2 + (2k+1)/2 = k+1/2 + k+1/2 = k+k+1 = n. Therefore, for all integer n, we have f 2 (n) = n. It follows that if two integers n 1 and n 2 have the same image by f 2, then we have n 1 = n 2, that is, f 2 is injective. Similarly, every integer m has a pre-image by f 2, namely itself, thus f 2 is surjective. Consequently, f 2 is bijective and f 2 is its own inverse function. 3. Let us first understand what f 3 computes. Observe that for all x [1, 2), we have 1 x < 2, thus x = 1, hence f 3 (x) = x 1. It follows that if two real numbers x 1 and x 2 have the same image by f 3, then we have x 1 1 = x 2 1, thus x 1 = x 2, that is, f 3 is injective. Similarly, every real number y [0, 1) has a pre-image by f 3 in [1, 2), namely y + 1, thus f 3 is surjective. Consequently, f 3 is bijective and its inverse function is: f 1 3 : [0, 1) [1, 2) y y + 1. 4

4. Let us first understand what f 4 computes. From the previous question, we have: f 4 : x (x 1) 2 The function f 4 is injective. Indeed, if x 1 and x 2 are real numbers in the interval [1, 2) with the same image by f 4 then we have (x 1 1) 2 = (x 2 1) 2, which implies (x 1 1 x 2 +1)(x 1 1+x 2 1) = 0, that is, x 1 = x 2 or x 1 = x 2. Since x 1 = x 2 cannot hold for x 1 and x 2 in [1, 2), we deduce x 1 = x 2, that is f 4 is injective. The function f 4 is surjective. Indeed, if y [0, 1) then x = y + 1 is a pre-image of y in [1, 2). Consequently, f 4 is bijective and its inverse function is: f 1 4 : [0, 1) [1, 2) y y + 1. Problem 5 (Properties of functions) [20 marks] Let f be a surjective function from a set A to a set B and g be a function from B to a set C. Prove or disprove the following properties: 1. if g is surjective then so is gof. 2. if f and g are both injective, then so is gof. Solution 5 1. Assume that g is surjective and let us prove that gof is surjective as well. That is, let us prove that all z C there exists x A such that g(f(x)) = z. Let z C. Since g is surjective there exists y B such that g(y) = z. Since f is surjective there exists x A such that f(x) = y. Hence, there exists x A such that we have gof(x) = z. Therefore, we have proved that gof is surjective. 2. Assume that f and g are both injective and let us prove that gof is injective as well. Let x 1 and x 2 be in A such that gof(x 1 ) = gof(x 2 ) holds. Thus, we have g(f(x 1 )) = g(f(x 2 )). Since g is injective, we deduce f(x 1 ) = f(x 2 ). Since f is injective, we deduce x 1 = x 2. Therefore, we have proved that gof is injective. 5