Let A(x) be x is an element of A, and B(x) be x is an element of B.

Similar documents
A B. bijection. injection. Section 2.4: Countability. a b c d e g

2. Functions, sets, countability and uncountability. Let A, B be sets (often, in this module, subsets of R).

Functions. Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A.

Infinity and Uncountability. Countable Countably infinite. Enumeration

Functions 2/1/2017. Exercises. Exercises. Exercises. and the following mathematical appetizer is about. Functions. Functions

Functions. How is this definition written in symbolic logic notation?

Cardinality of Sets. Washington University Math Circle 10/30/2016

Comparing sizes of sets

Homework Set #2 Math 440 Topology Topology by J. Munkres

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

CSE 20 DISCRETE MATH. Fall

Material from Recitation 1

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31

CSE 20 DISCRETE MATH. Winter

MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability)

Slides for Faculty Oxford University Press All rights reserved.

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Regarding Python level necessary for the course

MITOCW watch?v=4dj1oguwtem

CSC Discrete Math I, Spring Sets

Functions. Prof. Susan Older. 20 October (CIS 375) Functions 20 Oct / 14

r=1 The Binomial Theorem. 4 MA095/98G Revision

Lecture 17: Continuous Functions

EDAA40 At home exercises 1

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

T. Background material: Topology

2/18/14. Uses for Discrete Math in Computer Science. What is discrete? Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.

Proof Techniques Alphabets, Strings, and Languages. Foundations of Computer Science Theory

Section 1.7 Sequences, Summations Cardinality of Infinite Sets

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers.

CS3102 Theory of Computation Problem Set 2, Spring 2011 Department of Computer Science, University of Virginia

Section 2.4 Sequences and Summations

M3P1/M4P1 (2005) Dr M Ruzhansky Metric and Topological Spaces Summary of the course: definitions, examples, statements.

MATH 271 Summer 2016 Assignment 4 solutions

CONNECTED SPACES AND HOW TO USE THEM

Chapter 3. Set Theory. 3.1 What is a Set?

Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

MATH 22 MORE ABOUT FUNCTIONS. Lecture M: 10/14/2003. Form follows function. Louis Henri Sullivan

CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in .

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely

MA651 Topology. Lecture 4. Topological spaces 2

Cardinality of Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Cardinality of Sets Fall / 15

CS 341 Homework 1 Basic Techniques

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Tutorial 3 Q&A. En la pregunta 7 de la sección 2.2 el cual dice: 7. Prove the domination laws in Table 1 by showing that: a)a U = U b)a =

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth

2.1 Sets 2.2 Set Operations

Notes on metric spaces and topology. Math 309: Topics in geometry. Dale Rolfsen. University of British Columbia

Announcements. Problem Set 3 due Friday, October 21. Alternate Midterm Times. Drop by office hours! Ask questions at

Calculating Cardinalities

Computation, Computers, and Programs. Administrivia. Resources. Course texts: Kozen: Introduction to Computability Hickey: Introduction to OCaml

CS3102 Theory of Computation Solutions to Problem Set 1, Spring 2012 Department of Computer Science, University of Virginia

Functions and Sequences Rosen, Secs. 2.3, 2.4

CS6160 Theory of Computation Problem Set 2 Department of Computer Science, University of Virginia

Final Test in MAT 410: Introduction to Topology Answers to the Test Questions

Phil 320 Chapter 1: Sets, Functions and Enumerability I. Sets Informally: a set is a collection of objects. The objects are called members or

Lecture 25 : Counting DRAFT

2 Review of Set Theory

4. Definition: topological space, open set, topology, trivial topology, discrete topology.

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

CPSC 121: Models of Computation PART 1 REVIEW OF TEXT READING

Cardinality Lectures

To illustrate what is intended the following are three write ups by students. Diagonalization

Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D.

Final Exam, F11PE Solutions, Topology, Autumn 2011

CS100: DISCRETE STRUCTURES

Introduction to Algebraic and Geometric Topology Week 5

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

Functions. Jason Filippou UMCP. Jason Filippou UMCP) Functions / 19

Mathematics for Computer Science Exercises from Week 4

THEORY OF COMPUTATION

The Size of the Cantor Set

Notes on point set topology, Fall 2010

Review of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16

CS3102 Theory of Computation Solutions to Selected Problems from Set 1 Department of Computer Science, University of Virginia

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:

Topology 550A Homework 3, Week 3 (Corrections: February 22, 2012)

1-3 Continuity, End Behavior, and Limits

Set and Set Operations

HW 1 CMSC 452. Morally DUE Feb 7 NOTE- THIS HW IS THREE PAGES LONG!!! SOLUTIONS THROUGOUT THIS HW YOU CAN ASSUME:

1.7 The Heine-Borel Covering Theorem; open sets, compact sets

Introduction to Sets and Logic (MATH 1190)

2.1 Symbols and Terminology

Figure 1.1: This is an illustration of a generic set and its elements.

In class 75min: 2:55-4:10 Thu 9/30.

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

CHAPTER 4. COMPUTABILITY AND DECIDABILITY

1 Sets, Fields, and Events

9.5 Equivalence Relations

CS 125 Section #10 Midterm 2 Review 11/5/14

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

1 Point Set Topology. 1.1 Topological Spaces. CS 468: Computational Topology Point Set Topology Fall 2002

SET DEFINITION 1 elements members

2. Metric and Topological Spaces

Transcription:

Homework 6. CSE 240, Fall, 2014 Due, Tuesday October 28. Can turn in at the beginning of class, or earlier in the mailbox labelled Pless in Bryan Hall, room 509c. Practice Problems: 1. Given two arbitrary sets A,B, prove that (A intersection B) union (A intersection B-complement) equals A. You may *not* use a venn diagram. You may define characteristic functions for A,B so that A = {x PA(x}), and B = {x PB(x)}. Let A(x) be x is an element of A, and B(x) be x is an element of B. Our expression on sets can then be written in logical terms: (A(x) ^ B(x)) v (A(x) ^ ~B(x)) <--> A(x) To prove this equivalence, we start with the left side, and derive the right side: (A(x) ^ B(x)) v (A(x) ^ ~B(x)) <--> A(x) ^ (B(x) v ~B(x)) <--> A(x) ^ T <--> A(x). q.e.d. 2. Let f(x) = 2x + 1 and g(x) = (x-3)2. For each definition of Domain and Co-Domain defined below, answer (i) is the function injective? (ii) is the function surjective? (iii) Is the function a bijection? (iv) If the function if bijective, give its inverse (a) the function f, when the domain and co-domain are the reals. ANSWER: f is injective, surjective and a bijection. the inverse of f is: invf(y) = y/2-1/2. This is an inverse because invf(f(x)) = x: (2x+1)/2-1/2 = x + 1/2-1/2 = x. (b) the function f, when the domain in the integers and co-domain is the reals. ANSWER: f is injective (1-1), but not surjective (onto), and not a bijection. (c) the function (f o g) when the domain and co-domain are the reals. [Recall, (f o g)(x) = f(g(x))] ANSWER: (f 0 g)(x) = f(g(x)) = 2 (x-3)/2 + 1 = x-3 + 1 = x-2 this is injective, surjective and bijective. the inverse of f, invf is invf(y) = y+2 3. List the elements of the following sets: (a) {1, 2, 3} {a, b} (1,a), (2,a), (3,a), (1,b), (2,b), (3,b) [no braces needed because I didn t ask you to define 1

(b) P owerset({1, 2, 3}) P owerset({1, 2, 4}) {}, {1}, {2}, {1,2} 4. Prove the cardinality of all finite length binary strings (strings over the alphabet {0, 1}) is the same as the cardinality of all finite length strings over the alphabet {0, 1, 2, 3} A = all string {0,1} B = all strings {0,1,2,3} Proof A <= B if I can find an f: B --> A that is onto, then A < B f(s) = s if all characters is s are 0 or 1. f(s) = 0 if there is any character that is a 2 or a 3. this is an onto function because f(s) = s for strings in B that are also in A and all strings that are in A are also in B. Proof A >= B if I can find an f: A --> B that is onto, then A > B f(s): f is going to map strings in A as follows: s = a binary string of 0 s and 1 s. For example: 00101001110101. we break that string into pairs of characeters: 00 10 10 01 11 01 01 and replace each pair with the number that binary pair represents: 0 2 2 1 3 1 1 and that becomes our output string: 0221311 Proof that f is onto: Let y be any element of B take each element of y, represent it as a 2 bit binary string, and concatenate all those bit strings together to make y. Then f(y ) = y because that is how we constructed f. Therefore f is onto and A >= B 2

Since A >= B and A <= B, it must be that A = B 5. Sets that are the same size as the integers are called countable, which is short for countably infinite. Which of the following sets are countable? Give an intuitive answer that describes a mapping between these sets and the integers, or argue in a few sentences why this isn t possible. (example) The set of even integers. ANSWER: f(x) = x 2 integers. is a bijection between even integers and (example) The set of finite length binary strings. ANSWER: there is a bijection between the binary strings and the positive integers they represent. (a) P (N) (the powerset of natural numbers). ANSWER: This is uncountable. You can map each element of: P (N) onto an infinitely long bit string of 0 s and 1 s (like we have mapped the subsets of finite sets onto bitstrings), and then you can prove that there are more infinitely long bitstrings than there are integers following the same diagonalization proof that we used to prove the real numbers are bigger. (b) The set of all possible functions f : N {0, 1}. ANSWER: This is uncountable. You can map each possible function f onto an infinitely long bit string of 0 s and 1 s (that gives the definition of that function for each natural number). Then you can prove that there are more infinitely long bitstrings than there are integers following the same diagonalization proof that we used to prove the real numbers are bigger. (c) The set of all possible functions f : {0, 1} N. This is countable. This is the same size as the rational number. To define one possible function f, you need to specify f(0) and f(1), which is a pair of integers. So each function f can be mapped to an integer coordinate, and we can map those to the integers the same way we mapped the rational numbers to the integers. 6. Let A, B, and C be any sets that each have at least 1 element. Also, let f, g, h be functions, where: g : A B, h : A C, and f : A B C, where f is defined by g, h so that: f(x) = (g(x), h(x)) Prove or give a counterexample for each of the following statements. (In this case, a counterexample must include a definition of sets A,B,C and a definition of the functions g,h that make the statement false.). (a) If g or h is one-to-one, then f is one-to-one We prove the contrapositive of this statement: if $f$ is NOT one-to-one, then g is not one-to-one and h is not one-to-one. Assume that $f$ is not one-to-one. Then there are to elements in A (let s call them a1 and a2), such that f(a1) = f(a2) and (a1 is not equal to a2)... if no two elements like this exist, then f would be one to one. So, f(a1) = f(a2). By definition of f: By definition of f: f(a1) = (g(a1), h(a1)), and f(a2) = (g(a2), h(a2)) 3

So, if f(a1) = f(a2), then (g(a1), h(a1)) = (g(a2), h(a2)), and because two ordered pairs are only the same if both elements are the same, then g(a1) = g(a2) and h(a1) = h(a2). This proves that neither g or h are one-to-one. Therefor if $f$ is NOT one-to-one, then g is not one-to-one and h is not one-to-one. Therefore if g is one-to-one and h is one-to-one then g is one to one. (b) If neither g or h is one-to-one, then f is not one-to-one Counter example: A = {1,2,3,...,10} B = {1,2} C = {1,2,3,4,5} g: A -> B is defined so that: g(1) = 1 g(2) = 1 g(3) = 1 g(4) = 1 g(5) = 1 g(6) = 2 g(7) = 2 g(8) = 2 g(9) = 2 g(10) = 2 h: A -> C is defined so that h(1) = 1 h(2) = 2 h(3) = 3 h(4) = 4 h(5) = 5 h(6) = 1 h(7) = 2 h(8) = 3 h(9) = 4 h(10) = 5 then neither g or h is one to one, but f(1) = (1,1) f(2) = (1,2) f(3) = (1,3). 4

. f(6) = (2,1) f(7) = (2,2) but f is 1-1 (many examples are possible). Problems to turn in: 1. Let A be the set {2, 3, 4}, and B be the set {1, 2, 3, 4, 5}. Let P(A) be the powerset of A, and P(B) be the powerset of B. (a) How many elements does the set A B have? 3 5 = 15. (b) How many elements does A P (A) have? 3 2 3 = 24. (c) list two different elements of A P (A) (2, {}), (3, {1, 3, 4}) (d) How many elements does P (A) P (B) have? 2 3 2 5 = 8 32 = 256 2. Let A, B, and C be any sets that each have at least 1 element. Also, let f, g, h be functions, where: g : A B, h : A C, and f : A B C, where f is defined by g, h so that: f(x) = (g(x), h(x)) Prove or give a counterexample for each of the following statements. (In this case, a counterexample must include a definition of sets A,B,C and a definition of the functions g,h that make the statement false.). (a) If f is onto, the both g and h are onto. Assume f is onto Prove g is onto. Let y be any element of B Let c be any element of C. (y, c) B C, by definition of cartesian product. There is some x A such that f(x) = (y, c), because f is onto. by definition of f, f(x) = (y,c) means that g(x) = y, andh(x) = c. therefore, this value of x has the property that g(x) = y. therefore g is onto (we started with an arbitrary value of y and showed that there is an x such that g(x) = y Prove h is onto. [This is almost exactly the same as the above proof: Let y be any element of C Let b be any element of B. (b, y) B C, by definition of cartesian product. There is some x A such that f(x) = (b, y), because f is onto. by definition of f, f(x) = (y,c) means that g(x) = b, andh(x) = y. therefore, this value of x has the property that h(x) = y. therefore h is onto (we started with an arbitrary value of y and showed that there is an x such that h(x) = y). Therefore, if f is onto, the both g and h are onto. 5

(b) if g and h are both onto, then f is onto. Define A = B = C = {1, 2, 3}. Define g(x) = h(x) = x. Then f(x) = (x, x). Both g, h are onto, but f is not onto because it never creates the element (1,2). (there are other elements it doesn t create, but you just need to show one. 6