SlideShare a Scribd company logo
1 of 30
Download to read offline
Functions
Shiwani Gupta
History and applications
• Pure and applied mathematics
2
Definition of Functions
• Given any sets A and B, a function f from
(or “mapping”) A to B (f:A→B) is an
assignment of exactly one / unique element
f(x)B to each element xA.
Note: Every element of A must be related to
some element of B
Any element of A must be related to a unique
element of B
Graphical Representations
• Functions can be represented graphically in
several ways:
• •
A
B
a b
f
f
•
•
•
•
•
•
•
•
• x
y
Plot
Graph
Like Venn diagrams
A B
Representations
• State the rule
– f:X→Y, f(x)=2x
• Tabular Form
– x: -2 1 3 4 6
– f(x): 8 2 7 9 21
• Ordered pair
– F={(-2,8),(1,2),(3,7),(4,9),(6,21)}
5
Definition of Functions (cont’d)
• Formally: given f:A→B
“x is a function” : (x,y: x=y  f(x)  f(y)) or
“x is a function” : ( x,y: (x=y)  (f(x)  f(y))) or
“x is a function” : ( x,y: (x=y)  (f(x) = f(y))) or
“x is a function” : ( x,y: (x=y) → (f(x) = f(y))) or
“x is a function” : ( x,y: (f(x)  f(y)) → (x  y))
Some Function Terminology
• If f:A→B, and f(a)=b (where aA & bB),
then:
– A is the domain of f.
– B is the codomain of f.
– b is the image of a under f.
– a is a pre-image of b under f.
• In general, b may have more than one pre-image.
– The range RB of f is {b | a f(a)=b }.
Range vs. Codomain - Example
• 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 __________________.
{A,B,C,D,E} unknown!
{A,B}
still {A,B,C,D,E}!
Function Addition/Multiplication
• We can add and multiply functions
f,g:R→R:
– (f + g):R→R, where (f + g)(x) = f(x) + g(x)
– (f × g):R→R, where (f × g)(x) = f(x) × g(x)
Function Composition
• For functions g:A→B and f:B→C, there is a
special operator called compose (“○”).
– It composes (i.e., creates) a new function out of f,g by
applying f to the result of g.
(f○g):A→C, where (f○g)(a) = f(g(a)).
– Note g(a)B, so f(g(a)) is defined and C.
– The range of g must be a subset of f’s domain!!
– Note that ○ (like Cartesian , but unlike +,,) is non-
commuting. (In general, f○g  g○f.)
Function Composition
One-to-One Functions
• A function is one-to-one (1-1), or injective,
or an injection, iff every element of its
range has only one pre-image.
• Only one element of the domain is mapped
to any given one element of the range.
– Domain & range have same cardinality. What
about codomain?
One-to-One Functions (cont’d)
• Formally: given f:A→B
“x is injective” : (x,y: xy  f(x)=f(y)) or
“x is injective” : ( x,y: (xy)  (f(x)=f(y))) or
“x is injective” : ( x,y: (xy)  (f(x)  f(y))) or
“x is injective” : ( x,y: (xy) → (f(x)  f(y))) or
“x is injective” : ( x,y: (f(x)=f(y)) → (x =y))
One-to-One Illustration
• Graph representations of functions that are
(or not) one-to-one:
•
•
•
•
•
•
•
•
•
One-to-one
•
•
•
•
•
•
•
•
•
Not one-to-one
•
•
•
•
•
•
•
•
•
Not even a
function!
Sufficient Conditions for 1-1ness
• Definitions (for functions f over numbers):
– f is strictly (or monotonically) increasing iff
x>y → f(x)>f(y) for all x,y in domain;
– f is strictly (or monotonically) decreasing iff
x>y → f(x)<f(y) for all x,y in domain;
• If f is either strictly increasing or strictly
decreasing, then f is one-to-one.
– e.g. f(x)=x3
Onto (Surjective) Functions
• A function f:A→B is onto or surjective or a
surjection iff its range is equal to its
codomain (bB, aA: f(a)=b).
• An onto function maps the set A onto (over,
covering) the entirety of the set B, not just
over a piece of it.
Illustration of Onto
• Some functions that are or are not onto their
codomains:
Onto
(but not 1-1)
•
•
•
•
•
•
•
•
•
Not Onto
(not 1-1)
•
•
•
•
•
•
•
•
•
Both 1-1
and onto
•
•
•
•
•
•
•
•
1-1 but
not onto
•
•
•
•
•
•
•
•
•
Bijections
• A function f is a one-to-one
correspondence, or a bijection, or
reversible, or invertible, iff it is both one-
to-one and onto.
Inverse of a Function
• For bijections f:A→B, there exists an
inverse of f, written f −1:B→A, which is the
unique function such that:
Iff =−
1
Inverse of a function (cont’d)
The Identity Function
• For any domain A, the identity function
I:A→A (variously written, IA, 1, 1A) is the
unique function such that aA: I(a)=a.
• Some identity functions you’ve seen:
– ing with T, ing with F, ing with , ing
with U.
• Note that the identity function is both one-
to-one and onto (bijective).
• The identity function:
Identity Function Illustrations
•
•
•
•
•
•
•
•
•
Domain and range x
y
Graphs of Functions
• We can represent a function f:A→B as a set
of ordered pairs {(a,f(a)) | aA}.
• Note that a, there is only one pair (a, f(a)).
• For functions over numbers, we can
represent an ordered pair (x,y) as a point on
a plane. A function is then drawn as a curve
(set of points) with only one y for each x.
  
  
• If n pigeons fly into m pigeonholes and n >
m, then at least one hole must contain two or
more pigeons
Pigeonhole Principle
Pigeonhole Principle
• Basic Form of the Pigeonhole Principle: A
function from one finite set to a smaller finite set
cannot be one-to-one: there must be at least two
elements in the domain that have the same image in
the co-domain
• An arrow diagram for a function from a finite set to
a smaller finite set must have at least two arrows
from the domain that point to the same element in
the codomain.
• Next is some of the examples on how to apply the
pigeonhole principle.
• In a group of 6 people, must there be at least 2 who
were born in the same month?
Not. Six people could have birthdays in each of the
six months Jan to June
Example (1)
• In a group of thirteen people, must there be at least
two who were born in the same month?
Yes. For there are only 12 months in a year and
number of people  number of months (13  12)
Example (2)
• A drawer contains 10 black and 10 white socks. You
pull some out without looking at them. What is the
least number of socks you must pull out to be sure
to get a matched pair?
Three. If you just pick two, they may have different
colors.
Example (3)
• Let A = {1,2,3,4,5,6,7,8}
(a) If five integers are selected from A, must at least
one pair of the integers have a sum of 9?
Yes. Partition the set A into {1,8}, {2,7}, {3,6}, and
{4,5}. The function P is defined by letting P(ai) be
the subset that contains ai.
(b) If four are selected? No.
Example (4)
If n pigeons fly into m pigeonholes and for some
positive integer, k, n  km, then at least one
pigeonhole contains k + 1 or more pigeons.
Generalized Form of Pigeonhole Principle: For any
function f from a finite set X to a finite set Y and for
any positive integer k, if n(X) > k  n(Y), then there is
some y Y such that y is the image of at least k+1
distinct elements of X.
i.e. f(x1)=f(x2)= …=f(xk+1)=y.
Generalized Pigeonhole Principle

More Related Content

What's hot

Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphsSujata Tapare
 
Category Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesCategory Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesAshwin Rao
 
Algebraic functions powerpoint
Algebraic functions powerpointAlgebraic functions powerpoint
Algebraic functions powerpointCaron White
 
Abstract Algebra in 3 Hours
Abstract Algebra in 3 HoursAbstract Algebra in 3 Hours
Abstract Algebra in 3 HoursAshwin Rao
 
Functions
FunctionsFunctions
FunctionsGaditek
 
Formal methods 8 - category theory (last one)
Formal methods   8 - category theory (last one)Formal methods   8 - category theory (last one)
Formal methods 8 - category theory (last one)Vlad Patryshev
 
Logarithms
LogarithmsLogarithms
Logarithmssupoteta
 
function on mathematics
function on mathematicsfunction on mathematics
function on mathematicsAkashDas124
 
4.7 graph linear functions day 1
4.7 graph linear functions   day 14.7 graph linear functions   day 1
4.7 graph linear functions day 1bweldon
 
Your data structures are made of maths!
Your data structures are made of maths!Your data structures are made of maths!
Your data structures are made of maths!kenbot
 
The Algebric Functions
The Algebric FunctionsThe Algebric Functions
The Algebric Functionsitutor
 
4.7 notes
4.7 notes4.7 notes
4.7 notestoney
 
Category theory for beginners
Category theory for beginnersCategory theory for beginners
Category theory for beginnerskenbot
 
5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.Jan Plaza
 
Category Theory in 10 Minutes
Category Theory in 10 MinutesCategory Theory in 10 Minutes
Category Theory in 10 MinutesJordan Parmer
 

What's hot (19)

Functions
FunctionsFunctions
Functions
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphs
 
Category Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) picturesCategory Theory made easy with (ugly) pictures
Category Theory made easy with (ugly) pictures
 
Algebraic functions powerpoint
Algebraic functions powerpointAlgebraic functions powerpoint
Algebraic functions powerpoint
 
Function of DM
Function of DM Function of DM
Function of DM
 
Abstract Algebra in 3 Hours
Abstract Algebra in 3 HoursAbstract Algebra in 3 Hours
Abstract Algebra in 3 Hours
 
Functions
FunctionsFunctions
Functions
 
Function and graphs
Function and graphsFunction and graphs
Function and graphs
 
Formal methods 8 - category theory (last one)
Formal methods   8 - category theory (last one)Formal methods   8 - category theory (last one)
Formal methods 8 - category theory (last one)
 
Logarithms
LogarithmsLogarithms
Logarithms
 
function on mathematics
function on mathematicsfunction on mathematics
function on mathematics
 
4.7 graph linear functions day 1
4.7 graph linear functions   day 14.7 graph linear functions   day 1
4.7 graph linear functions day 1
 
Venn diagram
Venn diagramVenn diagram
Venn diagram
 
Your data structures are made of maths!
Your data structures are made of maths!Your data structures are made of maths!
Your data structures are made of maths!
 
The Algebric Functions
The Algebric FunctionsThe Algebric Functions
The Algebric Functions
 
4.7 notes
4.7 notes4.7 notes
4.7 notes
 
Category theory for beginners
Category theory for beginnersCategory theory for beginners
Category theory for beginners
 
5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.
 
Category Theory in 10 Minutes
Category Theory in 10 MinutesCategory Theory in 10 Minutes
Category Theory in 10 Minutes
 

Similar to Functionsandpigeonholeprinciple

Similar to Functionsandpigeonholeprinciple (20)

Functions.ppt
Functions.pptFunctions.ppt
Functions.ppt
 
Functions.ppt
Functions.pptFunctions.ppt
Functions.ppt
 
functions-1.pdf
functions-1.pdffunctions-1.pdf
functions-1.pdf
 
Task3
Task3Task3
Task3
 
9-Functions.pptx
9-Functions.pptx9-Functions.pptx
9-Functions.pptx
 
Functions for Grade 10
Functions for Grade 10Functions for Grade 10
Functions for Grade 10
 
Introductory calculus
Introductory calculusIntroductory calculus
Introductory calculus
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
 
L04 (1)
L04 (1)L04 (1)
L04 (1)
 
Prolog2 (1)
Prolog2 (1)Prolog2 (1)
Prolog2 (1)
 
Functions
FunctionsFunctions
Functions
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6
 
Functions
FunctionsFunctions
Functions
 
L1 functions, domain &amp; range
L1 functions, domain &amp; rangeL1 functions, domain &amp; range
L1 functions, domain &amp; range
 
Answers Of Discrete Mathematics
Answers Of Discrete MathematicsAnswers Of Discrete Mathematics
Answers Of Discrete Mathematics
 
9108528.ppt
9108528.ppt9108528.ppt
9108528.ppt
 
01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf
 
Concept of functions 1.pptx
Concept of functions 1.pptxConcept of functions 1.pptx
Concept of functions 1.pptx
 
Functions
FunctionsFunctions
Functions
 
power point presentation on genmath_lesson1_2_.pptx
power point presentation on genmath_lesson1_2_.pptxpower point presentation on genmath_lesson1_2_.pptx
power point presentation on genmath_lesson1_2_.pptx
 

More from Shiwani Gupta

module6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdfmodule6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdfShiwani Gupta
 
module5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdfmodule5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdfShiwani Gupta
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfShiwani Gupta
 
module3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdfmodule3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdfShiwani Gupta
 
module2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdfmodule2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdfShiwani Gupta
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfShiwani Gupta
 
ML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdfML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdfShiwani Gupta
 
Uncertain knowledge and reasoning
Uncertain knowledge and reasoningUncertain knowledge and reasoning
Uncertain knowledge and reasoningShiwani Gupta
 

More from Shiwani Gupta (20)

ML MODULE 6.pdf
ML MODULE 6.pdfML MODULE 6.pdf
ML MODULE 6.pdf
 
ML MODULE 5.pdf
ML MODULE 5.pdfML MODULE 5.pdf
ML MODULE 5.pdf
 
ML MODULE 4.pdf
ML MODULE 4.pdfML MODULE 4.pdf
ML MODULE 4.pdf
 
module6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdfmodule6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdf
 
module5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdfmodule5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdf
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdf
 
module3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdfmodule3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdf
 
module2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdfmodule2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdf
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
 
ML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdfML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdf
 
ML MODULE 2.pdf
ML MODULE 2.pdfML MODULE 2.pdf
ML MODULE 2.pdf
 
ML Module 3.pdf
ML Module 3.pdfML Module 3.pdf
ML Module 3.pdf
 
Problem formulation
Problem formulationProblem formulation
Problem formulation
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Relations
RelationsRelations
Relations
 
Logic
LogicLogic
Logic
 
Set theory
Set theorySet theory
Set theory
 
Uncertain knowledge and reasoning
Uncertain knowledge and reasoningUncertain knowledge and reasoning
Uncertain knowledge and reasoning
 
Introduction to ai
Introduction to aiIntroduction to ai
Introduction to ai
 
Planning Agent
Planning AgentPlanning Agent
Planning Agent
 

Recently uploaded

Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 

Recently uploaded (20)

Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 

Functionsandpigeonholeprinciple

  • 2. History and applications • Pure and applied mathematics 2
  • 3. Definition of Functions • Given any sets A and B, a function f from (or “mapping”) A to B (f:A→B) is an assignment of exactly one / unique element f(x)B to each element xA. Note: Every element of A must be related to some element of B Any element of A must be related to a unique element of B
  • 4. Graphical Representations • Functions can be represented graphically in several ways: • • A B a b f f • • • • • • • • • x y Plot Graph Like Venn diagrams A B
  • 5. Representations • State the rule – f:X→Y, f(x)=2x • Tabular Form – x: -2 1 3 4 6 – f(x): 8 2 7 9 21 • Ordered pair – F={(-2,8),(1,2),(3,7),(4,9),(6,21)} 5
  • 6. Definition of Functions (cont’d) • Formally: given f:A→B “x is a function” : (x,y: x=y  f(x)  f(y)) or “x is a function” : ( x,y: (x=y)  (f(x)  f(y))) or “x is a function” : ( x,y: (x=y)  (f(x) = f(y))) or “x is a function” : ( x,y: (x=y) → (f(x) = f(y))) or “x is a function” : ( x,y: (f(x)  f(y)) → (x  y))
  • 7. Some Function Terminology • If f:A→B, and f(a)=b (where aA & bB), then: – A is the domain of f. – B is the codomain of f. – b is the image of a under f. – a is a pre-image of b under f. • In general, b may have more than one pre-image. – The range RB of f is {b | a f(a)=b }.
  • 8. Range vs. Codomain - Example • 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 __________________. {A,B,C,D,E} unknown! {A,B} still {A,B,C,D,E}!
  • 9. Function Addition/Multiplication • We can add and multiply functions f,g:R→R: – (f + g):R→R, where (f + g)(x) = f(x) + g(x) – (f × g):R→R, where (f × g)(x) = f(x) × g(x)
  • 10. Function Composition • For functions g:A→B and f:B→C, there is a special operator called compose (“○”). – It composes (i.e., creates) a new function out of f,g by applying f to the result of g. (f○g):A→C, where (f○g)(a) = f(g(a)). – Note g(a)B, so f(g(a)) is defined and C. – The range of g must be a subset of f’s domain!! – Note that ○ (like Cartesian , but unlike +,,) is non- commuting. (In general, f○g  g○f.)
  • 12. One-to-One Functions • A function is one-to-one (1-1), or injective, or an injection, iff every element of its range has only one pre-image. • Only one element of the domain is mapped to any given one element of the range. – Domain & range have same cardinality. What about codomain?
  • 13. One-to-One Functions (cont’d) • Formally: given f:A→B “x is injective” : (x,y: xy  f(x)=f(y)) or “x is injective” : ( x,y: (xy)  (f(x)=f(y))) or “x is injective” : ( x,y: (xy)  (f(x)  f(y))) or “x is injective” : ( x,y: (xy) → (f(x)  f(y))) or “x is injective” : ( x,y: (f(x)=f(y)) → (x =y))
  • 14. One-to-One Illustration • Graph representations of functions that are (or not) one-to-one: • • • • • • • • • One-to-one • • • • • • • • • Not one-to-one • • • • • • • • • Not even a function!
  • 15. Sufficient Conditions for 1-1ness • Definitions (for functions f over numbers): – f is strictly (or monotonically) increasing iff x>y → f(x)>f(y) for all x,y in domain; – f is strictly (or monotonically) decreasing iff x>y → f(x)<f(y) for all x,y in domain; • If f is either strictly increasing or strictly decreasing, then f is one-to-one. – e.g. f(x)=x3
  • 16. Onto (Surjective) Functions • A function f:A→B is onto or surjective or a surjection iff its range is equal to its codomain (bB, aA: f(a)=b). • An onto function maps the set A onto (over, covering) the entirety of the set B, not just over a piece of it.
  • 17. Illustration of Onto • Some functions that are or are not onto their codomains: Onto (but not 1-1) • • • • • • • • • Not Onto (not 1-1) • • • • • • • • • Both 1-1 and onto • • • • • • • • 1-1 but not onto • • • • • • • • •
  • 18. Bijections • A function f is a one-to-one correspondence, or a bijection, or reversible, or invertible, iff it is both one- to-one and onto.
  • 19. Inverse of a Function • For bijections f:A→B, there exists an inverse of f, written f −1:B→A, which is the unique function such that: Iff =− 1
  • 20. Inverse of a function (cont’d)
  • 21. The Identity Function • For any domain A, the identity function I:A→A (variously written, IA, 1, 1A) is the unique function such that aA: I(a)=a. • Some identity functions you’ve seen: – ing with T, ing with F, ing with , ing with U. • Note that the identity function is both one- to-one and onto (bijective).
  • 22. • The identity function: Identity Function Illustrations • • • • • • • • • Domain and range x y
  • 23. Graphs of Functions • We can represent a function f:A→B as a set of ordered pairs {(a,f(a)) | aA}. • Note that a, there is only one pair (a, f(a)). • For functions over numbers, we can represent an ordered pair (x,y) as a point on a plane. A function is then drawn as a curve (set of points) with only one y for each x.
  • 24.       • If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons Pigeonhole Principle
  • 25. Pigeonhole Principle • Basic Form of the Pigeonhole Principle: A function from one finite set to a smaller finite set cannot be one-to-one: there must be at least two elements in the domain that have the same image in the co-domain • An arrow diagram for a function from a finite set to a smaller finite set must have at least two arrows from the domain that point to the same element in the codomain. • Next is some of the examples on how to apply the pigeonhole principle.
  • 26. • In a group of 6 people, must there be at least 2 who were born in the same month? Not. Six people could have birthdays in each of the six months Jan to June Example (1)
  • 27. • In a group of thirteen people, must there be at least two who were born in the same month? Yes. For there are only 12 months in a year and number of people  number of months (13  12) Example (2)
  • 28. • A drawer contains 10 black and 10 white socks. You pull some out without looking at them. What is the least number of socks you must pull out to be sure to get a matched pair? Three. If you just pick two, they may have different colors. Example (3)
  • 29. • Let A = {1,2,3,4,5,6,7,8} (a) If five integers are selected from A, must at least one pair of the integers have a sum of 9? Yes. Partition the set A into {1,8}, {2,7}, {3,6}, and {4,5}. The function P is defined by letting P(ai) be the subset that contains ai. (b) If four are selected? No. Example (4)
  • 30. If n pigeons fly into m pigeonholes and for some positive integer, k, n  km, then at least one pigeonhole contains k + 1 or more pigeons. Generalized Form of Pigeonhole Principle: For any function f from a finite set X to a finite set Y and for any positive integer k, if n(X) > k  n(Y), then there is some y Y such that y is the image of at least k+1 distinct elements of X. i.e. f(x1)=f(x2)= …=f(xk+1)=y. Generalized Pigeonhole Principle