CSNB143 – Discrete Structure Topic 8 – Function. Learning Outcomes Students should be able to understand function and know how it maps. Students should.

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.
Functions CSLU Fall 2007 Cameron McInally Fordham University.
The Engineering Design of Systems: Models and Methods
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.
Discrete Structures Chapter 5 Relations and Functions Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 02/22/11 Ming-Hsuan Yang UC Merced 1.
Discrete Structures Chapter 5 Relations and Functions
CSE115/ENGR160 Discrete Mathematics 02/21/12
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 8 Equivalence relations on sets Function between sets Types of function.
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.
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.
FUNCTION Discrete Mathematics Asst. Prof. Dr. Choopan Rattanapoka.
Mathematics. Session Set, Relation & Function Session - 3.
CSCI 115 Chapter 5 Functions. CSCI 115 §5.1 Functions.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
6.3 Permutation groups and cyclic groups  Example: Consider the equilateral triangle with vertices 1 , 2 , and 3. Let l 1, l 2, and l 3 be the angle bisectors.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFunctions.
Chap. 5 Relations and Functions. Cartesian Product For sets A, B the Cartesian product, or cross product, of A and B is denoted by A ╳ B and equals {(a,
Functions Section 2.3 of Rosen Spring 2012 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions: Use Piazza.
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.
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 
Chapter 9 Functions Let A and B be nonempty sets. A function f from A to B, written f: A  B is a relation from A to B with the property that every element.
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.
CompSci 102 Discrete Math for Computer Science January 31, 2012 Prof. Rodger Slides modified from Rosen AB a b c d x y z.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
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.
CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –
Introduction to Real Analysis Dr. Weihu Hong Clayton State University 8/27/2009.
Basic Structures: Sets, Functions, Sequences, and Sums.
Math 3121 Abstract Algebra I Lecture 7: Finish Section 7 Sections 8.
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.
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.
CS Lecture 14 Powerful Tools     !. Build your toolbox of abstract structures and concepts. Know the capacities and limits of each tool.
CSNB 143 Discrete Mathematical Structures
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.
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.
Permutations Introduction – Lecture 2. Permutations As we know a permutation  is a bijective bijektivna mapping of a set A onto itself:  : A  A. Permutations.
Functions – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Functions Reading: Kolman, Section 5.1.
Functions CSRU1400 Spring 2008Ellen Zhang 1 CISC1400, Fall 2010 Ellen Zhang.
Discrete Mathematics 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 6 Dr.-Ing. Erwin Sitompul
Discrete Mathematics Lecture # 19 Inverse of Functions.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
Properties of Groups Proposition 1: Let (G,  ) be a group. i.The inverse element of any element of G is unique. Remark: In view of i., we may use the.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
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.
Prepared By Meri Dedania (AITS) Discrete Mathematics by Meri Dedania Assistant Professor MCA department Atmiya Institute of Technology & Science Yogidham.
Groups and Applications
Chapter 2 Sets and Functions.
CSNB 143 Discrete Mathematical Structures
Functions Section 2.3.
CSE15 Discrete Mathematics 02/27/17
DISCRETE COMPUTATIONAL STRUCTURES
Lecture # 18 Types of Functions
Functions Section 2.3.
Presentation transcript:

CSNB143 – Discrete Structure Topic 8 – Function

Learning Outcomes Students should be able to understand function and know how it maps. Students should be able to identify different type of function and solve it.

Topic 8 – Function Understanding function Function is a special type of relation A function f from A to B is written as we write a normal relation f : A  B The rule is for all a  Dom (f), f(a) contains just one element of B. If a is not in Dom (f), then f(a) = . The element a is called an argument of the function f and f(a) is called the value of the function for the argument a and is also referred to as the image of a under f

Topic 8 – Function Understanding function The rule for f : A  B is for all a  Dom (f), f(a) contains just one element of B. If a is not in Dom (f), then f(a) = . Example: Let A = {1, 2, 3, 4} and B = {a, b, c, d} and let f = {(1, a), (2, a), (3, d), (4, c)} We have f(1) = a f(2) = a f(3) = d f(4) = c Since each set f(n) is a single value, f is a function.

Topic 8 – Function Understanding function Another example: Let A = {1, 2, 3} and B = {x, y, z}. Consider the relations R = {(1, x), (2, x), (3, x)} S = {(1, x), (1, y), (2, z), (3, y)} T = {(1, z), (2, y)} Determine if the relations R, S and T are functions – Relation R is a function with Dom(R) = {1, 2, 3} and Ran(R) = {x}. – Relation S is not a function since S(1) = {x, y}. It shows that element 1 has two images under f. Note that if the elements have two or more images or value, it is not a function. – Relation T is not a function since 3 has no image under f.

Topic 8 – Function Special types of function Let f be a function from A to B, TypesCharacteristics Everywhere definedDom(f) = A OntoRan (f) = B One to oneIf f(a) = f(a’), then a = a’

Topic 8 – Function Special types of function Example: Let A = {1, 2, 3, 4} and B = {a, b, c, d} and let f = {(1, a), (2, a), (3, d), (4, c)}. Determine the type of function f is TypesCharacteristicsOutcomes Everywhere defined Dom(f) = ADom(f) = {1,2,3,4}. Hence Dom(f) = A Hence f is of type everywhere defined OntoRan (f) = BRan (f) = {a, d, c} Hence Dom(f)  B Hence f is not of type onto One to oneIf f(a) = f(a’), then a = a’Since f(1) = f(2) = a Hence f is not of type one to one

Topic 8 – Function Special types of functions Another example: Let A = {a 1, a 2, a 3 }; B = {b 1, b 2, b 3 }; C = {c 1, c 2 } and D = {d 1, d 2, d 3, d 4 }. Consider the following four functions, from A to B, A to D, B to C, and D to B respectively Identify the types of each function a)f = {(a 1, b 2 ), (a 2, b 3 ), (a 3, b 1 )} b)f = {(a 1, d 2 ), (a 2, d 1 ), (a 3, d 4 )} c)f = {(b 1, c 2 ), (b 2, c 2 ), (b 3, c 1 )} d)f = {(d 1, b 1 ), (d 2, b 2 ), (d 3, b 1 )}

Topic 8 – Function Invertible function A function f: A  B is said to be invertible if its reverse relation, f -1 is also a function Example: Consider f = {(1, a), (2, a), (3, d), (4, c)}. therefore, f -1 = {(a, 1), (a, 2), (d, 3), (c, 4)} We can clearly see that f -1 is not a function because f -1 (a) = {1, 2}. So f is not an invertible function. Note that if the elements have two or more images or value, it is not a function.

Topic 8 – Function Permutation Function This is a part in which set A have a relation to itself. Set A is finite set. In this case, a function must be onto and one-to-one. A bijection from a set A to itself is called a permutation of A. Example:

Topic 8 – Function Permutation Function Find a) P 4 -1 b) P 3  P 2 a) See that P 4 is a one-to-one function, we have P 4 = {(1, 3), (2, 1), (3, 2)} So, P 4 -1 = {(3, 1), (1, 2), (2, 3)} b)

Topic 8 – Function Cyclic Permutations The composition of two permutations is another permutation, usually referred to as the product of these permutations. If A = {a 1, a 2, …, a n } is a set contained n elements, so there will be n! = n.(n – 1)… 2.1 permutation for A. Let b 1, b 2, …. b r are r elements of set A = {a 1, a 2, ….. a n }. Permutation for P: A  A is given by: P(b 1 ) = b 2 P(b 2 ) = b 3. P(b r ) = b 1 P(x) = x if x  A, x  {b 1, b 2, … b r }

Topic 8 – Function Cyclic Permutations Example: Rule: P(b 1 ) = b 2 P(b 2 )= b 3 P(x) = x P(b r ) = b 1

Topic 8 – Function Cyclic Permutations Example: Let A = {1, 2, 3, 4, 5, 6}. Find: a)(4, 1, 3, 5)  (5, 6, 3) b)(5, 6, 3)  (4, 1, 3, 5)