CSE 20 – Discrete Mathematics

Slides:



Advertisements
Similar presentations
Countability. The cardinality of the set A is equal to the cardinality of a set B if there exists a bijection from A to B cardinality? bijection? injection.
Advertisements

CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
1 CMSC 250 Chapter 7, Functions. 2 CMSC 250 Function terminology l A relationship between elements of two sets such that no element of the first set is.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
1 Annoucement n Skills you need: (1) (In Thinking) You think and move by Logic Definitions Mathematical properties (Basic algebra etc.) (2) (In Exploration)
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Example Prove that: “IF 3n + 2 is odd, then n is odd” Proof by Contradiction: -p = 3n + 2 is odd, q = n is odd. -Assume that ~(p  q) is true OR -(p 
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
COMPSCI 102 Introduction to Discrete Mathematics.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Discrete Mathematics Set.
Lecture 4 Infinite Cardinals. Some Philosophy: What is “2”? Definition 1: 2 = 1+1. This actually needs the definition of “1” and the definition of the.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
CS 285- Discrete Mathematics
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Sequences Lecture 11. L62 Sequences Sequences are a way of ordering lists of objects. Java arrays are a type of sequence of finite size. Usually, mathematical.
One of Cantor's basic concepts was the notion of the size or cardinality of a set M, denoted by |M|  M - finite sets M is an n-set or has size n, if.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Discrete Mathematics Lecture 6
Discrete Mathematics CS 2610
Functions 1.
Great Theoretical Ideas in Computer Science
CSE 105 Theory of Computation
Chapter 2 Sets and Functions.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
2.4 Sequences and Summations
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
CS201: Data Structures and Discrete Mathematics I
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Yet another important mathematical concept
Discrete Structures for Computer Science
CSE15 Discrete Mathematics 02/27/17
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Countable and Countably Infinite Sets
Great Theoretical Ideas in Computer Science
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
Introduction to Relations and Functions
Ch 5 Functions Chapter 5: Functions
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics CS 2610
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
One-to-One and Onto, Inverse Functions
One-to-One and Onto, Inverse Functions
Lecture # 18 Types of Functions
CPSC 121: Models of Computation
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Copyright © Zeph Grunschlag,
Presentation transcript:

CSE 20 – Discrete Mathematics                            Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Based on a work at http://peerinstruction4cs.org. Permissions beyond the scope of this license may be available at http://peerinstruction4cs.org. CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett

Today’s Topics: Functions Set sizes Infinite set sizes (if time permits)

1. Functions

What is a function? Is the following a function from X to Y? Yes No X

What is a function? Is the following a function from X to Y? Yes No X

What is a function? Is the following a function from X to Y? Yes No X

What is a function? Is the following a function from X to Y? Yes Y No

What is a function? Is the following a function from Y to X? Yes Y No

What is a function A function f:XY maps any element of X to an element of Y Every element of X is mapped – f(x) is always defined Every element of X is mapped to just one value in Y

Injective, Surjective, Bijective… Is the following function Injective Surjective Bijective None X Y

Injective, Surjective, Bijective… Is the following function Injective Surjective Bijective None X Y

Injective, Surjective, Bijective… Is the following function Injective Surjective Bijective None X Y

Injective, Surjective, Bijective… Function f:X  Y f is injective if: f(x)=f(y)  x=y That is, no two elements in X are mapped to the same value f is surjective if: yY xX s.t. f(x)=y There is always an “inverse” Could be more than one x! f is bijective if it is both injective and surjective

2. Set sizes

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is injective then |X||Y|. Try and prove yourself first

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is injective then |X||Y|. Proof by picture (not really a proof, just for intuition): X Y

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is injective then |X||Y|. Proof: Consider the set S={(x,f(x)): xX}. Since f is a function, each xX appears exactly once hence |S|=|X|. Since f is injective, the values of f(x) are all distinct, i.e. each value yY appears in at most one pair. Hence |S||Y|. So, |X||Y|. QED.

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is surjective then |X||Y|. Try and prove yourself first

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is surjective then |X||Y|. Proof by picture (not really a proof, just for intuition): X Y

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is surjective then |X||Y|. Proof: Consider the set S={(x,f(x)): xX}. Since f is a function, each xX appears exactly once hence |S|=|X|. Since f is surjective, all values yY appear in at least one pair. So |S||Y|. So, |X||Y|. QED.

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is bijective then |X|=|Y|. Try and prove yourself first

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is bijective then |X|=|Y|. Proof by picture (not really a proof, just for intuition): X Y

Set sizes Let X,Y be finite sets, f:XY a function Theorem: If f is bijective then |X|=|Y|. Proof: f is bijective so it is both injective (hence |X||Y|) and surjective (hence |X||Y|). So |X|=|Y|. QED.

3. Infinite set sizes

Infinite set sizes Let X,Y be infinite sets (e.g natural numbers, primes numers, reals) We define |X||Y| if there is an injective function f:X  Y If Z=integers and E=even integers, is |Z||E| |E||Z| Both Neither

Infinite set sizes |Z|=|E| How do we prove this? |E||Z| because we can define f:EZ by f(x)=x. It is injective. |Z||E| because we can define f:ZE by f(x)=2x. It is injective.

Infinite set sizes Interesting facts: |Z|=|E|=|prime numbers|=|N| BUT! This “size”, or cardinality, is called countable and denoted as 0 It is the smallest infinite size BUT! |reals|>|Z| There are “really” more reals than integers We will prove this (maybe) later in the course