Discrete Math (2) Haiming Chen Associate Professor, PhD

Slides:



Advertisements
Similar presentations
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
Advertisements

1.6 Functions. Chapter 1, section 6 Functions notation: f: A B x in A, y in B, f(x) = y. concepts: –domain of f, –codomain of f, –range of f, –f maps.
Jessie Zhao Course page: 1.
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
CSE115/ENGR160 Discrete Mathematics 02/16/12 Ming-Hsuan Yang UC Merced 1.
Functions f( ) = A B Lecture 15: Nov 4.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
Functions Goals Introduce the concept of function Introduce injective, surjective, & bijective functions.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
CSC 2300 Data Structures & Algorithms January 16, 2007 Chapter 1. Introduction.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Functions.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
Functions. Let A and B be sets A function is a mapping from elements of A to elements of B and is a subset of AxB i.e. can be defined by a set of tuples!
Functions, Sequences, and Sums
Discrete Structures Functions Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore.
Section 1.8: Functions A function is a mapping from one set to another that satisfies certain properties. We will first introduce the notion of a mapping.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
February 12, 2015Applied Discrete Mathematics Week 2: Functions and Sequences 1Exercises Question 1: Given a set A = {x, y, z} and a set B = {1, 2, 3,
Functions. Copyright © Peter Cappello2 Definition Let D and C be nonempty sets. A function f from D to C, for each element d  D, assigns exactly 1 element.
ICS 253: Discrete Structures I
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Fall 2002CMSC Discrete Structures1 … and the following mathematical appetizer is about… Functions.
10/26/20151 … and the following mathematical appetizer is about… Functions.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
Functions1 Elementary Discrete Mathematics Jim Skon.
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)
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 
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Basic Structures: Functions Muhammad Arief download dari
CSE 2353 – October 1 st 2003 Functions. For Real Numbers F: R->R –f(x) = 7x + 5 –f(x) = sin(x)
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
CompSci 102 Discrete Math for Computer Science January 31, 2012 Prof. Rodger Slides modified from Rosen AB a b c d x y z.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Functions. L62 Agenda Section 1.8: Functions Domain, co-domain, range Image, pre-image One-to-one, onto, bijective, inverse Functional composition and.
MATH 224 – Discrete Mathematics
Basic Structures: Sets, Functions, Sequences, and Sums.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
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.
Section 2.3. Section Summary  Definition of a Function. o Domain, Cdomain o Image, Preimage  One-to-one (Injection), onto (Surjection), Bijection 
Chapter 2 1. Chapter Summary Sets The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions and sequences.
FUNCTIONS.
Functions Goals Introduce the concept of function
ICS 253: Discrete Structures I
Functions Section 2.3.
CS 2210:0001 Discrete Structures Sets and Functions
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
CSE15 Discrete Mathematics 02/15/17
MATH 224 – Discrete Mathematics
Relation and function.
… and the following mathematical appetizer is about…
Functions.
Functions Section 2.3.
Functions.
CSE15 Discrete Mathematics 02/27/17
CS100: Discrete structures
… and the following mathematical appetizer is about…
ICS 253: Discrete Structures I
… and the following mathematical appetizer is about…
Functions Rosen 6th ed., §2.3.
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Functions Section 2.3.
Copyright © Zeph Grunschlag,
Presentation transcript:

Discrete Math (2) Haiming Chen Associate Professor, PhD Department of Computer Science, Ningbo University http://www.chenhaiming.cn

Content Sets (review) Set Operations (review) Cardinality of Sets Function

Sets (review)

Sets (review) Subsets Power sets Cartesian Products

Cartesian Products ordered n-tuples

Cartesian Products

Set Operations union intersection difference complement

Set Operations

Cardinality of Sets cardinality of a finite set as the number of elements in the set Countable? Set of Odd Positive Integers

Cardinality of Sets the set of real numbers is an uncountable set.

Functions Functions are sometimes also called mappings or transformations

Functions Functions are specified in many different ways Assignments Formula Computer program a relation from A to B a subset of A × B. int max (int x, int y) { int z; z=y; if (x>y) z=x; return (z); } for every element a ∈ A, contains one, and only one, ordered pair (a, b)

Functions Write the function illustrated by the figure in a relation f Preimage of A Image of Adams f f Domain of f Codomain of f f range of function: {A,B, C, F}

Equal Function Same domain Same codomain Map each element of their common domain to the same element in their common codomain

Example Domain: A={Abdul, Brenda, Carla, Desire, Eddie, Felicia} Codomain: B={y | y is a positive integer less than 100} Range: {21, 22, 24}

Example Let f be the function that assigns the last two bits of a bit string of length 2 or greater to that string. Domain: S={bs| bs is a bit string of length 2 or greater} Codomain: B={00, 01, 10, 11} Range: {00, 01, 10, 11}

Example What’s the domain, codomain, and range of the function max? int max (int x, int y) { int z; z=y; if (x>y) z=x; return (z); } integer-valued real-valued

Function

Function Let f be a function from A to B and let S be a subset of A.

Function

Function One-to-one (injective) function For two different domain elements, they are never assigned to the same value.

Function Onto (surjective) function every member of the codomain is the image of some element of the domain one-to-one correspondence, or a bijection

Inverse Functions

Example

Compositions of Functions

Examples

Example

Graphs of Functions

Floor and ceiling functions The floor function assigns to the real number x the largest integer that is less than or equal to x. The ceiling function assigns to the real number x the smallest integer that is greater than or equal to x.

Homework Page 153, Exercise 23 Page 154, Exercise 36 Page 155, Exercise 67 (a)(c)(e)(g)