Functions – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Functions Reading: Kolman, Section 5.1.

Slides:



Advertisements
Similar presentations
Lecture 15 Functions CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Advertisements

Transitive Closure Theorem 1. Let R be a relation on a set A. Then R  is the transitive closure of R. the reachability relation R * of a relation R on.
The Inverse of a Matrix (10/14/05) If A is a square (say n by n) matrix and if there is an n by n matrix C such that C A = A C = I n, then C is called.
Functions Section 2.3 of Rosen Fall 2008
Permutations and Inverses. Definition Let A be a set. If f : A  A is a 1-1 correspondence then f is called a permutation of A. Notation: S(A): the set.
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
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,
Section 4.1 Finite Permutation Groups Permutation of a Set Let A be the set { 1, 2, …, n }. A permutation on A is a function f : A  A that is both one-to-one.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Function: Definition A function is a correspondence from a first set, called the domain, to a second set, called the range, such that each element in the.
CSCI 1900 Discrete Structures
Functions.
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.
Functions Definition A function from a set S to a set T is a rule that assigns to each element of S a unique element of T. We write f : S → T. Let S =
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
FUNCTION Discrete Mathematics Asst. Prof. Dr. Choopan Rattanapoka.
CSCI 115 Chapter 5 Functions. CSCI 115 §5.1 Functions.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Do Now: Plot the following coordinates in a coordinate plane: HW: Page ,68,69,70.
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.
Functions and Their Properties Def: Function, Domain and Range A function from a set D to a set R is a rule that assigns to every element in D a unique.
An ordered n-tuple is a set of n objects with an order associated with them. If n objects are represented by x 1, x 2,..., x n, then we write the ordered.
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.
FUNCTIONS.
Functions Section 2.3 of Rosen Spring 2012 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions: Use Piazza.
Section 4.2 Linear Transformations from R n to R m.
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.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
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 
Functions Reading: Chapter 6 (94 – 107) from the text book 1.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Basic Structures: Functions Muhammad Arief download dari
Chapter 5 – Relations and Functions. 5.1Cartesian Products and Relations Definition 5.1: For sets A, B  U, the Cartesian product, or cross product, of.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Discrete Mathematics Relation.
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
 R  A×B,R is a relation from A to B , DomR  A 。  (a,b)  R (a, c)  R  (a,b)  R (a, c)  R unless b=c  function  DomR=A , (everywhere)function.
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
MAT 2720 Discrete Mathematics Section 3.1 Functions
Relations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Properties of Relations Reading: Kolman, Section
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
Section 2.1 Notes: Relations and Functions
Math 3121 Abstract Algebra I Lecture 7: Finish Section 7 Sections 8.
Functions (Mappings). Definitions A function (or mapping)  from a set A to a set B is a rule that assigns to each element a of A exactly one element.
CSNB 143 Discrete Mathematical Structures
Section 3.2: Sequences and Summations. Def: A sequence is a function from a subset of the set of integers (usually the set of natural numbers) to a set.
Chapter 7 – Radical Equations and Inequalities 7.2 – Inverse Functions and Relations.
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.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
A function is a rule f that associates with each element in a set A one and only one element in a set B. If f associates the element b with the element.
3.2 Inverse Functions. Functions A function maps each element in the domain to exactly 1 element in the range.
1 Discrete Mathematical Functions Examples.
Functions CSRU1400 Spring 2008Ellen Zhang 1 CISC1400, Fall 2010 Ellen Zhang.
CSNB143 – Discrete Structure Topic 8 – Function. Learning Outcomes Students should be able to understand function and know how it maps. Students should.
Review Functions. Function A function is a special type of relation in which each element of the domain is paired with exactly one element of the range.
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.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Functions Goals Introduce the concept of function
Functions Section 2.3.
CS201: Data Structures and Discrete Mathematics I
Composition of Functions
Functions Section 2.3.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Presentation transcript:

Functions – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Functions Reading: Kolman, Section 5.1

Functions – Page 2CSCI 1900 – Discrete Structures Domain and Range of a Relation The following definitions assume R is a relation from A to B. –Dom(R) = subset of A representing elements of A the make sense for R. This is called the “domain of R.” –Ran(R) = subset of B that lists all second elements of R. This is called the “range of R.”

Functions – Page 3CSCI 1900 – Discrete Structures Functions A function f is a relation from A to B where each element of A that is in the domain of f maps to exactly one element, b, in B Denoted f(a) = b If an element a is not in the domain of f, then f(a) = 

Functions – Page 4CSCI 1900 – Discrete Structures Functions (continued) Also called mappings or transformations because they can be viewed as rules that assign each element of A to a single element of B. Elements of A Elements of B

Functions – Page 5CSCI 1900 – Discrete Structures Functions (continued) Since f is a relation, then it is a subset of the Cartesian Product A  B. Even though there might be multiple sequence pairs that have the same element b, no two sequence pairs may have the same element a.

Functions – Page 6CSCI 1900 – Discrete Structures Functions Represented with Formulas It may be possible to represent a function with a formula Example: f(x) = x 2 (mapping from Z to N) Since function is a relation which is a subset of the Cartesian product, then it doesn’t need to be represented with a formula. A function may just be a list of sequenced pairs

Functions – Page 7CSCI 1900 – Discrete Structures Functions not Representable with Formulas Example: A mapping from one finite set to another –A = {a, b, c, d} and B = {4, 6} –f(a) = {(a, 4), (b, 6), (c, 6), (d, 4)} Example: Membership functions –f(a) = {0 if a is even and 1 if a is odd} –A = Z and B = {0,1}

Functions – Page 8CSCI 1900 – Discrete Structures Labeled Digraphs A labeled digraph is a digraph in which the vertices or the edges or both are labelled with information from a set. A labeled digraph can be represented with functions

Functions – Page 9CSCI 1900 – Discrete Structures Examples of Labeled Digraphs Distances between cities: –vertices are cities –edges are distances between cities Organizational Charts –vertices are employees Trouble shooting flow chart State diagrams

Functions – Page 10CSCI 1900 – Discrete Structures Labeled Digraphs (continued) If V is the set of vertices and L is the set of labels of a labelled digraph, then the labelling of V can be specified by a function f: V  L where for each v  V, f(v) is the label we wish to attach to v. If E is the set of edges and L is the set of labels of a labelled digraph, then the labelling of E can be specified to be a function g: E  L where for each e  E, g(e) is the label we wish to attach to v.

Functions – Page 11CSCI 1900 – Discrete Structures Identity function The identity function is a function on A Denoted 1 A Defined by 1 A (a) = a 1 A is represented as a subset of A  A with the identity matrix

Functions – Page 12CSCI 1900 – Discrete Structures Composition If f: A  B and g: B  C, then the composition of f and g, g  f, is a relation. Let a  Dom(g  f). –(g  f )(a) = g(f(a)) –If f(a) maps to exactly one element, say b  B, then g(f(a)) = g(b) –If g(b) also maps to exactly one element, say c  C, then g(f(a)) = c –Thus for each a  A, (g  f )(a) maps to exactly one element of C and g  f is a function

Functions – Page 13CSCI 1900 – Discrete Structures Special types of functions f is “everywhere defined” if Dom(f) = A f is “onto” if Ran(f) = B f is “one-to-one” if it is impossible to have f(a) = f(a') if a  a', i.e., if f(a) = f(a'), then a = a' f: A  B is “invertible” if its inverse function f -1 is also a function. (Note, f -1 is simply the reversing of the ordered pairs)

Functions – Page 14CSCI 1900 – Discrete Structures Theorems of Functions Let f: A  B be a function; f -1 is a function from B to A if and only if f is one-to-one If f -1 is a function, then the function f -1 is also one-to-one f -1 is everywhere defined if and only if f is onto f -1 is onto if and only if f is everywhere defined

Functions – Page 15CSCI 1900 – Discrete Structures Another Theorem of Functions If f is everywhere defined, one-to-one, and onto, then f is a one-to-one correspondence between A & B. Thus f is invertible and f -1 is a one-to-one correspondence between B & A.

Functions – Page 16CSCI 1900 – Discrete Structures More Theorems of Functions Let f be any function: 1 B  f = f f  1 A = f If f is a one-to-one correspondence between A and B, then f -1  f = 1 A f  f -1 = 1 B Let f: A  B and g: B  C be invertible. (g  f) is invertible (g  f) -1 = (f -1  g -1 )

Functions – Page 17CSCI 1900 – Discrete Structures Finite sets Let A and B both be finite sets with the same number of elements If f: A  B is everywhere defined, then –If f is one-to-one, then f is onto –If f is onto, then f is one-to-one