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

Similar documents
Functions as Relations

2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R.

Today s Topics. Methods of proof Relationships to logical equivalences. Important definitions Relationships to sets, relations Special functions

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

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

3. Abstract Boolean Algebras

Functions Functions and Modeling A UTeach/TNT Course

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

Functions. Given a function f: A B:

0 Sets and Induction. Sets

Mathematics 220 Workshop Cardinality. Some harder problems on cardinality.

General Notation. Exercises and Problems

3 FUNCTIONS. 3.1 Definition and Basic Properties. c Dr Oksana Shatalov, Fall

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

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 13 FINAL EXAM SOLUTIONS

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

Section Summary. Definition of a Function.

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

AMB111F Notes 1: Sets and Real Numbers

Number Axioms. P. Danziger. A Group is a set S together with a binary operation (*) on S, denoted a b such that for all a, b. a b S.

Chapter 1. Sets and Mappings

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

3 FUNCTIONS. 3.1 Definition and Basic Properties. c Dr Oksana Shatalov, Spring

Section 4.4 Functions. CS 130 Discrete Structures

MAT115A-21 COMPLETE LECTURE NOTES

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Math Fall 2014 Final Exam Solutions

3 FUNCTIONS. 3.1 Definition and Basic Properties. c Dr Oksana Shatalov, Fall

Introduction to Proofs in Analysis. updated December 5, By Edoh Y. Amiran Following the outline of notes by Donald Chalice INTRODUCTION

Chapter 1. Sets and Numbers

QUESTION BANK II PUC SCIENCE

Week Some Warm-up Questions

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Mathematics Review for Business PhD Students Lecture Notes

Properties of the Integers

Selected problems from past exams

REVIEW FOR THIRD 3200 MIDTERM

Cartesian Products and Relations

MT804 Analysis Homework II

Numbers, sets, and functions

Notes on ordinals and cardinals

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

Sets, Functions and Relations

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Mathematics Review for Business PhD Students

Func%ons. function f to the element a of A. Functions are sometimes called mappings or transformations.

MATH 3300 Test 1. Name: Student Id:

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

Functional Equations

MATH 51H Section 4. October 16, Recall what it means for a function between metric spaces to be continuous:

1. Decide for each of the following expressions: Is it a function? If so, f is a function. (i) Domain: R. Codomain: R. Range: R. (iii) Yes surjective.

Day 15. Tuesday June 12, 2012

Solutions to Homework Problems

Discrete Mathematics

SETS AND FUNCTIONS JOSHUA BALLEW

Monoids. Definition: A binary operation on a set M is a function : M M M. Examples:

Foundations of Mathematics

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Continuity. Chapter 4

Real Analysis Math 131AH Rudin, Chapter #1. Dominique Abdi

Prof. Ila Varma HW 8 Solutions MATH 109. A B, h(i) := g(i n) if i > n. h : Z + f((i + 1)/2) if i is odd, g(i/2) if i is even.

MAT3500/ Mandatory assignment 2013 Solutions

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

CLASS12 RELATIONS AND FUNCTIONS

Sec$on Summary. Definition of a Function.

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

2) e = e G G such that if a G 0 =0 G G such that if a G e a = a e = a. 0 +a = a+0 = a.

Rings and Fields Theorems

Math 455 Some notes on Cardinality and Transfinite Induction

MODEL ANSWERS TO HWK #7. 1. Suppose that F is a field and that a and b are in F. Suppose that. Thus a = 0. It follows that F is an integral domain.

Chapter 0. Introduction: Prerequisites and Preliminaries

Section Summary. Definition of a Function.

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

and problem sheet 6

Infinite constructions in set theory

MODEL ANSWERS TO THE FIRST HOMEWORK

Math 42, Discrete Mathematics

Topology. Xiaolong Han. Department of Mathematics, California State University, Northridge, CA 91330, USA address:

Math 3450 Homework Solutions

RED. Name: Math 290 Fall 2016 Sample Exam 3

MATH 131A: REAL ANALYSIS (BIG IDEAS)

MATH 2001 MIDTERM EXAM 1 SOLUTION

About This Document. MTH299 - Examples Weeks 1-6; updated on January 5, 2018

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

5 Set Operations, Functions, and Counting

A strongly rigid binary relation

MTH Abstract Algebra I and Number Theory S17. Homework 6/Solutions

INFINITY: CARDINAL NUMBERS

Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples

Proofs. Chapter 2 P P Q Q

Finite and Infinite Sets

Continuity. Chapter 4

A Short Review of Cardinality

SOLUTIONS TO EXERCISES FOR. MATHEMATICS 205A Part 1. I. Foundational material

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

1 Basic Combinatorics


Real Analysis - Notes and After Notes Fall 2008

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

Transcription:

Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem. Problem 1. [5pts] Consider our definitions of Z, Q, R, and C. Recall that A B means A is a subset of B and A B means A is not a subset of B. Prove that (a) Z Q, Proof. Let i Z be an arbitrary integer. Then i 1 is a rational number in Q, and i = i 1. (b) Q Z, Proof. 1 2 is a rational number in Q, but it is not an integer, so 1 2 (c) R Q, / Z. Proof. 2 is a real number, but as we know from class it is irrational. (d) R C, Proof. Let x be a real number. Then x + 0i is a complex number in C, and x = x + 0i. and (e) C R. Proof. i is a complex number in C, but i = 1 and for every real number x R, x 2 0, so since i 2 < 0, i is not a real number. (We would also accept that we know i is imaginary and not a real number, but giving a reason is always nice.) 1

Problem 2. [5pts] Prove that if A B, then P(A) P(B). Proof. Let S P(A) be an arbitrary element of P(A). By the definition of P(A), S is a subset of A. Therefore, for every element x S, the element x is also in A. Since A B, the element x A is also an element x B. Therefore, S is also a subset of B. Hence, S is an element of P(B) and P(A) P(B). 2

Problem 3. [5pts] Let A and B be sets. Prove that A B = A + B A B, using the following steps: 1. Prove that if E and F are disjoint sets (i.e. E F = ) then E F = E + F. Proof. Since E F =, each element of E F is in exactly one of E or F (not both). There are E such elements that are in E and F such elements that are in F. Thus, there are E + F elements total in E F. 2. Prove that A B = A + B \ A. Proof. Note that A (B \ A) =. Therefore, by the previous part (with E = A and F = B \ A), A (B \ A) = A + B \ A. It remains to show that A (B \ A) = A B, which holds since A (B \ A) = A (B A) = (A A) (A B) = U (A B) = A B. 3. Prove that B \ A = B A B. Proof. Note that B\A = B A B if and only if B = B A + B\A. Since (B A) (B\A) =, we can apply the first part with E = B A and F = B\A to find that (B A) (B\A) = B A + B\A. It remains to show that B = (B A) (B \ A), but this holds since any element x B is either in A or not in A, so it is in B A or B \ A. (You can also use Set Identities, if you want.) 4. Conclude that A B = A + B A B. Proof. From previous parts, we see that A B = A + B \ A = A + B A B. 3

Problem 4. [5pts] Let U = {1, 2, 3, 4, 5, 6, 7}, A = {1, 3, 5, 7}, B = {4, 5, 6, 7}. Determine the following sets: A = {2, 4, 6} A B = {5, 7} A B = {1, 3, 4, 5, 6, 7} A \ B = {1, 3} A B = {1, 3, 6} 4

Problem 5. [5pts] Let A and B be sets. Prove that P(A) P(B) = P(A B). Proof. We prove both P(A) P(B) P(A B) and P(A B) P(A) P(B) to show equality. (P(A) P(B) P(A B)) Let S P(A) P(B). Thus S P(A) and S P(B). By definition of the power set, S is a subset of A and S is a subset of B. Therefore, every element of S is an element of A and an element of B. Hence S is a subset of A B and by definition of the power set, S P(A B). (P(A B) P(A) P(B)) Let S P(A B). By definition of the power set, S is a subset of A B. So every element of S is in both A and B. Then S is a subset of A and a subset of B. By definition of the power set, S is in P(A) and in P(B). Therefore, S P(A) P(B). 5

Problem 6. [10pts] Let A, B, and C be subsets of a universe U. Use definitions of set operations and set identities to prove the following equality of sets: ((B A) (B C)) \ (A B C) = (B (A C)) ((B A) (B C)) \ (A B C) = (B (A C)) \ (A B C) Distributive law = (B (A C)) (A B C) Definition of set difference = (B (A C)) (A B C) DeMorgan s law = B ((A C) (A B C)) Associative law = B ((A (A B C)) (C (A B C))) Distributive law = B ((A A) (A B) (A C)) (C A) (C B) (C C)) Distributive law = B ( (A B) (A C) (C A) (C B) ) Complementation law = B ((A B) (A C) (C A) (C B)) Identity law = B ((A B) (A \ C) (C \ A) (C B)) Definition of set difference = B ((A C) (A B) (C B)) Definition of symm. diff. and comm. law = (B (A C)) (B (A B)) ((B (C B))) Distributive law = (B (A C)) (B B A) (B B A) Commutative and Associative laws = (B (A C)) ( A) ( A) Complementation laws = (B (A C)) Domination law = B (A C) Identity law 6

Problem 7. [5pts] Let A = {a, b, c}, B = {1, 2, 3, 4}, and C = {π, φ, i}. Define functions f : A B and g : B C as π x = 1 2 x = a φ x = 2 f(x) = 3 x = b g(x) = i x = 3 4 x = c π x = 4 Consider each of the functions f, g, g f and determine if they are injective, surjective, or both. f : injective, not surjective. Since f(a) = 2, f(b) = 3, and f(c) = 4, every element of the domain is mapped to a distinct element of the codomain, so f is injective. Since no element is mapped to 1 B, f is not surjective. g : surjective, not injective. Since g(1) = g(4) = π, g is not injective. Since g(2) = φ, g(3) = i, and g(4) = π, g is surjective. g f : injective and surjective. Since (g f)(a) = g(2) = φ, (g f)(b) = g(3) = i, and (g f)(c) = g(4) = π, every element of the domain is mapped to a distinct element of the codomain, and every element of the codomain is the image of an element of the domain, g f is both injective and surjective. 7

Problem 8. [10pts] Consider the following function f : N Z: ( n f(n) = ( 1) n 2 + 1 ) 1 4 4. 1. [1pt] Write out the elements f(0), f(1), f(2), f(3), f(4), f(5). f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, f(4) = 2, f(5) = 3,... From this part, you should notice that the output differs depending on if the input is even or odd. 2. [4pts] Prove that f is injective. Proof. First, I claim that f(n) < 0 when n is odd and f(n) 0 when n is even. If n = 2k for some integer k 0, then f(2k) = ( 1) 2k (2k/2+1/4) 1/4 = (k +1/4) 1/4 = k 0. If n = 2k +1 for some integer k 0, then f(2k+1) = ( 1) 2k+1 ((2k+1)/2+1/4) 1/4 = k 1/2 1/4 1/4 = (k+1) < 0. Now, assume n and m are natural numbers such that f(n) = f(m). If f(n) 0, then both n and m are even. Then n = 2k and m = 2l for nonnegative integers k and l. Thus, (2k/2 + 1/4) 1/4 = f(2k) = f(n) = f(m) = f(2l) = (2l/2 + 1/4) 1/4. However, this implies that k = l by simple algebra (1/4 s cancel, 2/2 = 1). So n = m. If f(n) < 0, then both n and m are odd. Then n = 2k + 1 and m = 2l + 1 for nonnegative integers k and l. Thus, (k+1) = ((2k+1)/2+1/4) 1/4 = f(2k) = f(n) = f(m) = f(2l+1) = ((2l+1)/2+1/4) 1/4 = (l+1). However, this implies that k = l, so n = m. Therefore f is injective. 3. [5pts] Prove that f is surjective. Proof. Let y be an arbitrary integer. If y 0, then let x = 2y. Note that f(2y) = ( 1) 2y (2y/2 + 1/4) 1/4 = y. If y < 0, then let x = 2 y 1. Note that f(2 y 1) = ( 1) 2 y 1 ((2 y 1)/2+1/4) 1/4 = y = y. 8

4. [+5pts] Describe a function g : Z Q that is surjective (and prove it is surjective). There are many ways to do this, and almost all of them are gross. This is the cleanest version I can think of. We will describe an algorithm that will take as input an integer i and will output a rational number, and the output of this algorithm defines g(i). Algorithm: Input an integer i. If i = 0, then output 0/1. If i < 0, then output g( i), so we must only consider positive integers. If i > 0, then consider the (unsigned) binary representation of i as i = k j=0 a j2 j for some (k +1)-tuple (a k, a k 1,..., a 1, a 0 ). Since i > 0, we can assume that a k = 1 (by making k = log 2 i ). Let q be the minimum integer such that either q > k or a k q = 0. Thus, the binary representation of i starts with q 1-digits, then either stops, or has a 0-digit followed by k q 1 more digits. Let p = k q j=0 a j2 j. Output p q. We claim that for every rational number p q Q, there exists an integer i where the algorithm outputs a rational number equal to p q when given i. We will assume that q > 0, since q 0 and if q < 0 we can use the rational number p q = p q. If p = 0, then the algorithm outputs 0 1 = p q when given 0. If p > 0, then let t j=0 a j2 j be a binary representation of the integer p, defining a (t + 1)-tuple (a t, a t 1,..., a 1, a 0 ). We can further assume that t = log 2 p + 1, so a t = 0. Then, for j {t + 1,..., t + q}, define a j = 1. Then, let i = t+q j=0 a j2 j and notice that this binary representation of i starts with q 1-digits, a zero digit, then the binary representation of p. Therefore, the algorithm will output p q when given the input i (in fact, it will output the fraction in this form, with exactly this p and q pair.) If p < 0, then consider the i that outputs p q and the algorithm given input i will output p q. 9