Functions
Ms. RachanaPathak
([email protected])
Assistant Professor, Dept of Computer Science and Engineering
Walchand Institute of Technology, Solapur
(www.witsolapur.org)
LearningOutcome
2
Walchand Institute of Technology, Solapur
Attheendofthissession,
StudentswillbeabletoexplainFunctionsinDiscreteMathematical
Structures.
Definition of a function
•A function takes an element from a set and maps it to a
UNIQUE element in another set
R Z
f
4.3 4
Domain Co-domain
Pre-image of 4
Image of 4.3
f maps Rto Z
f(4.3)
WalchandInstitute of Technology, Solapur 3
Definition
•Given any sets A, B, a function f from(or “mapping”) A to B
(f:AB) is an assignment of exactly oneelement f(x)B
to each element xA.
Walchand Institute of Technology, Solapur4
Graphical Representation
WalchandInstitute of Technology, Solapur 5
f
A B
a b
•If f:AB, and f(a)=b (where aA& bB), then:
•Ais the domainof f.
•Bis the codomainof f.
•bis theimageof a under f.
•ais a pre-imageof bunder f.
•In general, bmay have more than one pre-image.
•The rangeRBof f is {b| af(a)=b}.
Walchand Institute of Technology, Solapur 6
Terminologies
Domain & Co-Domain
1
2
3
4
5
“a”
“bb“
“cccc”
“dd”
“e”
A string length function
A
B
C
D
F
Rachana
Darshana
Namrata
Priyanka
Rushika
A class grade function
Domain Co-domain
A pre-image
of 1
The image
of “a”
WalchandInstitute of Technology, Solapur 7
Think & Write
Walchand Institute of Technology, Solapur 8
•Suppose that: “f is a function mapping students in this class to
the set of grades {A,B,C,D,E}.”
•At this point, you know f’s codomain is: __________, and its
range is ________.
•Suppose the grades turn out all As and Bs.
•Then the range of f is _________, but its codomain is
__________________.
Answer
•Suppose that: “f is a function mapping students in this class to
the set of grades {A,B,C,D,E}.”
•At this point, you know f’scodomainis: __________, and its
range is ________.
•Suppose the grades turn out all As and Bs.
•Then the range of f is _________, but its codomainis
__________________.
Walchand Institute of Technology, Solapur 9
unknown
{A,B,C,D,E}
A,B
{A,B,C,D,E}
Conclusion :
In this session, We have studied all about Functions
Walchand Institute of Technology, Solapur 10
References
•1. Discrete mathematical structures with applications to computer science --J. P.
Tremblay & R. Manohar(MGH International)
•Reference Books:
•1. Discrete Mathematics with combinatoricsand graph theory-S. SANTHA
(CENGAGE Learning)
•2. Discrete Mathematical Structures –Bernard Kolman, Robert C. Busby (Pearson
Education)
•3. Discrete mathematics --Liu (MGH)
11Walchand Institute of Technology, Solapur
ThankYou!!!
12Walchand Institute of Technology, Solapur