SlideShare a Scribd company logo
1 of 9
Download to read offline
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 1
Functions
It is a mapping in which every element of set A is uniquely associated at the element with set B.
The set of A is called Domain of a function and set of B is called Co domain.
Domain, Co-Domain, and Range of a Function:
Domain of a Function: Let f be a function from P to Q. The set P is called the domain of the
function f.
Co-Domain of a Function: Let f be a function from P to Q. The set Q is called Co-domain of
the function f.
Range of a Function: The range of a function is the set of picture of its domain. In other words,
we can say it is a subset of its co-domain. It is denoted as f (domain).
1. If f: P → Q, then f (P) = {f(x): x ∈ P} = {y: y ∈ Q | ∃ x ∈ P, such that f (x) = y}.
Example: Find the Domain, Co-Domain, and Range of function.
1. Let x = {1, 2, 3, 4}
2. y = {a, b, c, d, e}
3. f = {(1, b), (2, a), (3, d), (4, c)
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 2
Solution:
Domain of function: {1, 2, 3, 4}
Range of function: {a, b, c, d}
Co-Domain of function: {a, b, c, d, e}
Functions as a Set
If P and Q are two non-empty sets, then a function f from P to Q is a subset of P x Q, with two
important restrictions
1. ∀ a ∈ P, (a, b) ∈ f for some b ∈ Q
2. If (a, b) ∈ f and (a, c) ∈ f then b = c.
Note1: There may be some elements of the Q which are not related to any element of set P.
2. Every element of P must be related with at least one element of Q.
Example1: If a set A has n elements, how many functions are there from A to A?
Solution: If a set A has n elements, then there are nn
functions from A to A.
Representation of a Function
The two sets P and Q are represented by two circles. The function f: P → Q is represented by a
collection of arrows joining the points which represent the elements of P and corresponds
elements of Q
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 3
Example1:
1. Let X = {a, b, c} and Y = {x, y, z} and f: X → Y such that
2. f= {(a, x), (b, z), (c, x)}
Then f can be represented diagrammatically as follows
Example2: Let X = {x, y, z, k} and Y = {1, 2, 3, 4}. Determine which of the following
functions. Give reasons if it is not. Find range if it is a function.
a. f = {(x, 1), (y, 2), (z, 3), (k, 4)
b. g = {(x, 1), (y, 1), (k, 4)
c. h = {(x, 1), (x, 2), (x, 3), (x, 4)
d. l = {(x, 1), (y, 1), (z, 1), (k, 1)}
e. d = {(x, 1), (y, 2), (y, 3), (z, 4), (z, 4)}.
Solution:
1. It is a function. Range (f) = {1, 2, 3, 4}
2. It is not a function because every element of X does not relate with some element of Y
i.e., Z is not related with any element of Y.
3. h is not a function because h (x) = {1, 2, 3, 4} i.e., element x has more than one image in
set Y.
4. d is not a function because d (y) = {2, 3} i.e., element y has more than image in set Y.
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 4
Types of Functions
1. Injective (One-to-One) Functions: A function in which one element of Domain Set is
connected to one element of Co-Domain Set.
2. Surjective (Onto) Functions: A function in which every element of Co-Domain Set has one
pre-image.
Example: Consider, A = {1, 2, 3, 4}, B = {a, b, c} and f = {(1, b), (2, a), (3, c), (4, c)}.
It is a Surjective Function, as every element of B is the image of some A
Note: In an Onto Function, Range is equal to Co-Domain.
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 5
3. Bijective (One-to-One Onto) Functions: A function which is both injective (one to -
one) and surjective (onto) is called bijective (One-to-One Onto) Function.
Example:
1. Consider P = {x, y, z}
2. Q = {a, b, c}
3. and f: P → Q such that
4. f = {(x, a), (y, b), (z, c)}
The f is a one-to-one function and also it is onto. So it is a bijective function.
4. Into Functions: A function in which there must be an element of co-domain Y does not have
a pre-image in domain X.
Example:
1. Consider, A = {a, b, c}
2. B = {1, 2, 3, 4} and f: A → B such that
3. f = {(a, 1), (b, 2), (c, 3)}
4. In the function f, the range i.e., {1, 2, 3} ≠ co-domain of Y i.e., {1, 2, 3, 4}
Therefore, it is an into function
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 6
5. One-One Into Functions: Let f: X → Y. The function f is called one-one into function if
different elements of X have different unique images of Y.
Example:
1. Consider, X = {k, l, m}
2. Y = {1, 2, 3, 4} and f: X → Y such that
3. f = {(k, 1), (l, 3), (m, 4)}
The function f is a one-one into function
6. Many-One Functions: Let f: X → Y. The function f is said to be many-one functions if there
exist two or more than two different elements in X having the same image in Y.
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 7
Example:
1. Consider X = {1, 2, 3, 4, 5}
2. Y = {x, y, z} and f: X → Y such that
3. f = {(1, x), (2, x), (3, x), (4, y), (5, z)}
The function f is a many-one function
7. Many-One Into Functions: Let f: X → Y. The function f is called the many-one function if
and only if is both many one and into function.
Example:
1. Consider X = {a, b, c}
2. Y = {1, 2} and f: X → Y such that
3. f = {(a, 1), (b, 1), (c, 1)}
As the function f is a many-one and into, so it is a many-one into function.
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 8
8. Many-One Onto Functions: Let f: X → Y. The function f is called many-one onto function if
and only if is both many one and onto.
Example:
1. Consider X = {1, 2, 3, 4}
2. Y = {k, l} and f: X → Y such that
3. f = {(1, k), (2, k), (3, l), (4, l)}
The function f is a many-one (as the two elements have the same image in Y) and it is onto (as
every element of Y is the image of some element X). So, it is many-one onto function
Discrete Structure & Theory of Logic Unit 1
G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 9
Recurrence Relation
The manner in which the terms of a sequence are found in recursive manner is called recurrence
relation.
Definition
An equation which defines a sequence recursively, where the next term is a function of the
previous terms is known as recurrence relation.
A recurrence relation is an equation that recursively defines a sequence
Recursively Defined Function
We can also define functions recursively: in terms of the same function of a smaller variable. In
this way, a recursive function "builds" on itself.
A recursive definition has two parts:
1. Definition of the smallest argument (usually f (0) or f (1)).
2. Definition of f (n), given f (n - 1), f (n - 2), etc.
Here is an example of a recursively defined function:
We can calculate the values of this function:
f (0)=5
f (1)=f (0) + 2 = 5 + 2 = 7
f (2)=f (1) + 2 = 7 + 2 = 9
f (3)=f (2) + 2 = 9 + 2 = 11
…
This recursively defined function is equivalent to the explicitly defined function f (n) = 2n + 5.
However, the recursive function is defined only for nonnegative integers.

More Related Content

What's hot

Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
Different types of functions
Different types of functionsDifferent types of functions
Different types of functionsKatrina Young
 
Composition and inverse of functions
Composition  and inverse of functionsComposition  and inverse of functions
Composition and inverse of functionsCharliez Jane Soriano
 
The Fundamental theorem of calculus
The Fundamental theorem of calculus The Fundamental theorem of calculus
The Fundamental theorem of calculus AhsanIrshad8
 
3.1 derivative of a function
3.1 derivative of a function3.1 derivative of a function
3.1 derivative of a functionbtmathematics
 
Functions in discrete mathematics
Functions in discrete mathematicsFunctions in discrete mathematics
Functions in discrete mathematicsRachana Pathak
 
IMPROPER INTEGRAL
   IMPROPER INTEGRAL   IMPROPER INTEGRAL
IMPROPER INTEGRALkishan619
 
Limits in Maths presentation
Limits in Maths presentationLimits in Maths presentation
Limits in Maths presentation3130370505746
 
2.1 Union, intersection and complement
2.1 Union, intersection and complement2.1 Union, intersection and complement
2.1 Union, intersection and complementJan Plaza
 
Math functions, relations, domain & range
Math functions, relations, domain & rangeMath functions, relations, domain & range
Math functions, relations, domain & rangeRenee Scott
 
3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiation3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiationmath265
 
Limits and continuity powerpoint
Limits and continuity powerpointLimits and continuity powerpoint
Limits and continuity powerpointcanalculus
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiersblaircomp2003
 
Sequences and Series
Sequences and SeriesSequences and Series
Sequences and Seriessujathavvv
 
application of partial differentiation
application of partial differentiationapplication of partial differentiation
application of partial differentiationeteaching
 

What's hot (20)

Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Different types of functions
Different types of functionsDifferent types of functions
Different types of functions
 
Topology M.Sc. 2 semester Mathematics compactness, unit - 4
Topology M.Sc. 2 semester Mathematics compactness, unit - 4Topology M.Sc. 2 semester Mathematics compactness, unit - 4
Topology M.Sc. 2 semester Mathematics compactness, unit - 4
 
Composition and inverse of functions
Composition  and inverse of functionsComposition  and inverse of functions
Composition and inverse of functions
 
The Fundamental theorem of calculus
The Fundamental theorem of calculus The Fundamental theorem of calculus
The Fundamental theorem of calculus
 
3.1 derivative of a function
3.1 derivative of a function3.1 derivative of a function
3.1 derivative of a function
 
Functions in discrete mathematics
Functions in discrete mathematicsFunctions in discrete mathematics
Functions in discrete mathematics
 
IMPROPER INTEGRAL
   IMPROPER INTEGRAL   IMPROPER INTEGRAL
IMPROPER INTEGRAL
 
Limits in Maths presentation
Limits in Maths presentationLimits in Maths presentation
Limits in Maths presentation
 
Supremum And Infimum
Supremum And InfimumSupremum And Infimum
Supremum And Infimum
 
Functions
FunctionsFunctions
Functions
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Functions in mathematics
Functions in mathematicsFunctions in mathematics
Functions in mathematics
 
2.1 Union, intersection and complement
2.1 Union, intersection and complement2.1 Union, intersection and complement
2.1 Union, intersection and complement
 
Math functions, relations, domain & range
Math functions, relations, domain & rangeMath functions, relations, domain & range
Math functions, relations, domain & range
 
3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiation3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiation
 
Limits and continuity powerpoint
Limits and continuity powerpointLimits and continuity powerpoint
Limits and continuity powerpoint
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
Sequences and Series
Sequences and SeriesSequences and Series
Sequences and Series
 
application of partial differentiation
application of partial differentiationapplication of partial differentiation
application of partial differentiation
 

Similar to Functions, Relations & Recursion

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.pdfRajuSingh806014
 
5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.Jan Plaza
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphsSujata Tapare
 
Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1FellowBuddy.com
 
functions-1.pdf
functions-1.pdffunctions-1.pdf
functions-1.pdfKevalVala4
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representationsallyn joy calcaben
 
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
 
Domain-and-Range-of-a-Function
Domain-and-Range-of-a-FunctionDomain-and-Range-of-a-Function
Domain-and-Range-of-a-FunctionEmeraldAcaba
 
Relations & functions
Relations & functionsRelations & functions
Relations & functionsindu thakur
 
functions
 functions  functions
functions Gaditek
 
4.1 Inverse Functions
4.1 Inverse Functions4.1 Inverse Functions
4.1 Inverse Functionssmiller5
 

Similar to Functions, Relations & Recursion (20)

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
 
5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphs
 
Task3
Task3Task3
Task3
 
7 functions
7   functions7   functions
7 functions
 
Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1Limits and Continuity - Intuitive Approach part 1
Limits and Continuity - Intuitive Approach part 1
 
functions-1.pdf
functions-1.pdffunctions-1.pdf
functions-1.pdf
 
Function.pptx
Function.pptxFunction.pptx
Function.pptx
 
2. Functions I.pdf
2. Functions I.pdf2. Functions I.pdf
2. Functions I.pdf
 
Functions
FunctionsFunctions
Functions
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
 
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.
 
Domain-and-Range-of-a-Function
Domain-and-Range-of-a-FunctionDomain-and-Range-of-a-Function
Domain-and-Range-of-a-Function
 
Relations & functions
Relations & functionsRelations & functions
Relations & functions
 
functions
 functions  functions
functions
 
4.1 Inverse Functions
4.1 Inverse Functions4.1 Inverse Functions
4.1 Inverse Functions
 
Inverse function
Inverse function Inverse function
Inverse function
 
project
projectproject
project
 
Introductory calculus
Introductory calculusIntroductory calculus
Introductory calculus
 
.
..
.
 

More from NANDINI SHARMA

Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics NANDINI SHARMA
 
Mathematical Induction in Discrete Structure
Mathematical Induction in Discrete StructureMathematical Induction in Discrete Structure
Mathematical Induction in Discrete StructureNANDINI SHARMA
 
SETS in Discrete Structure
SETS in Discrete StructureSETS in Discrete Structure
SETS in Discrete StructureNANDINI SHARMA
 
Rules of Inference in Discrete Structure
Rules of Inference in Discrete StructureRules of Inference in Discrete Structure
Rules of Inference in Discrete StructureNANDINI SHARMA
 
Proposition Logic in Discrete Structure
Proposition Logic in Discrete StructureProposition Logic in Discrete Structure
Proposition Logic in Discrete StructureNANDINI SHARMA
 
Algebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTLAlgebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTLNANDINI SHARMA
 
FIELD in Discrete Structure
FIELD in Discrete StructureFIELD in Discrete Structure
FIELD in Discrete StructureNANDINI SHARMA
 
LATTICE in Discrete Structure
LATTICE in Discrete StructureLATTICE in Discrete Structure
LATTICE in Discrete StructureNANDINI SHARMA
 
5 variable kmap questions
5 variable kmap questions5 variable kmap questions
5 variable kmap questionsNANDINI SHARMA
 
Computer Architecture & Organization
Computer Architecture & OrganizationComputer Architecture & Organization
Computer Architecture & OrganizationNANDINI SHARMA
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemNANDINI SHARMA
 
Number System (Computer)
Number System (Computer)Number System (Computer)
Number System (Computer)NANDINI SHARMA
 
Data Structure Part III
Data Structure Part IIIData Structure Part III
Data Structure Part IIINANDINI SHARMA
 
Data Structure Part II
Data Structure Part IIData Structure Part II
Data Structure Part IINANDINI SHARMA
 
Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2NANDINI SHARMA
 

More from NANDINI SHARMA (20)

Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
Mathematical Induction in Discrete Structure
Mathematical Induction in Discrete StructureMathematical Induction in Discrete Structure
Mathematical Induction in Discrete Structure
 
SETS in Discrete Structure
SETS in Discrete StructureSETS in Discrete Structure
SETS in Discrete Structure
 
Predicate logic
Predicate logicPredicate logic
Predicate logic
 
Rules of Inference in Discrete Structure
Rules of Inference in Discrete StructureRules of Inference in Discrete Structure
Rules of Inference in Discrete Structure
 
Proposition Logic in Discrete Structure
Proposition Logic in Discrete StructureProposition Logic in Discrete Structure
Proposition Logic in Discrete Structure
 
Algebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTLAlgebraic Structure Part 2 DSTL
Algebraic Structure Part 2 DSTL
 
FIELD in Discrete Structure
FIELD in Discrete StructureFIELD in Discrete Structure
FIELD in Discrete Structure
 
Algebraic Structure
Algebraic StructureAlgebraic Structure
Algebraic Structure
 
LATTICE in Discrete Structure
LATTICE in Discrete StructureLATTICE in Discrete Structure
LATTICE in Discrete Structure
 
DSTL: TREES AND GRAPH
DSTL: TREES AND GRAPHDSTL: TREES AND GRAPH
DSTL: TREES AND GRAPH
 
5 variable kmap questions
5 variable kmap questions5 variable kmap questions
5 variable kmap questions
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Computer Architecture & Organization
Computer Architecture & OrganizationComputer Architecture & Organization
Computer Architecture & Organization
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Multimedia
Multimedia Multimedia
Multimedia
 
Number System (Computer)
Number System (Computer)Number System (Computer)
Number System (Computer)
 
Data Structure Part III
Data Structure Part IIIData Structure Part III
Data Structure Part III
 
Data Structure Part II
Data Structure Part IIData Structure Part II
Data Structure Part II
 
Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2Computer Network Notes (Handwritten) UNIT 2
Computer Network Notes (Handwritten) UNIT 2
 

Recently uploaded

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

Functions, Relations & Recursion

  • 1. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 1 Functions It is a mapping in which every element of set A is uniquely associated at the element with set B. The set of A is called Domain of a function and set of B is called Co domain. Domain, Co-Domain, and Range of a Function: Domain of a Function: Let f be a function from P to Q. The set P is called the domain of the function f. Co-Domain of a Function: Let f be a function from P to Q. The set Q is called Co-domain of the function f. Range of a Function: The range of a function is the set of picture of its domain. In other words, we can say it is a subset of its co-domain. It is denoted as f (domain). 1. If f: P → Q, then f (P) = {f(x): x ∈ P} = {y: y ∈ Q | ∃ x ∈ P, such that f (x) = y}. Example: Find the Domain, Co-Domain, and Range of function. 1. Let x = {1, 2, 3, 4} 2. y = {a, b, c, d, e} 3. f = {(1, b), (2, a), (3, d), (4, c)
  • 2. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 2 Solution: Domain of function: {1, 2, 3, 4} Range of function: {a, b, c, d} Co-Domain of function: {a, b, c, d, e} Functions as a Set If P and Q are two non-empty sets, then a function f from P to Q is a subset of P x Q, with two important restrictions 1. ∀ a ∈ P, (a, b) ∈ f for some b ∈ Q 2. If (a, b) ∈ f and (a, c) ∈ f then b = c. Note1: There may be some elements of the Q which are not related to any element of set P. 2. Every element of P must be related with at least one element of Q. Example1: If a set A has n elements, how many functions are there from A to A? Solution: If a set A has n elements, then there are nn functions from A to A. Representation of a Function The two sets P and Q are represented by two circles. The function f: P → Q is represented by a collection of arrows joining the points which represent the elements of P and corresponds elements of Q
  • 3. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 3 Example1: 1. Let X = {a, b, c} and Y = {x, y, z} and f: X → Y such that 2. f= {(a, x), (b, z), (c, x)} Then f can be represented diagrammatically as follows Example2: Let X = {x, y, z, k} and Y = {1, 2, 3, 4}. Determine which of the following functions. Give reasons if it is not. Find range if it is a function. a. f = {(x, 1), (y, 2), (z, 3), (k, 4) b. g = {(x, 1), (y, 1), (k, 4) c. h = {(x, 1), (x, 2), (x, 3), (x, 4) d. l = {(x, 1), (y, 1), (z, 1), (k, 1)} e. d = {(x, 1), (y, 2), (y, 3), (z, 4), (z, 4)}. Solution: 1. It is a function. Range (f) = {1, 2, 3, 4} 2. It is not a function because every element of X does not relate with some element of Y i.e., Z is not related with any element of Y. 3. h is not a function because h (x) = {1, 2, 3, 4} i.e., element x has more than one image in set Y. 4. d is not a function because d (y) = {2, 3} i.e., element y has more than image in set Y.
  • 4. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 4 Types of Functions 1. Injective (One-to-One) Functions: A function in which one element of Domain Set is connected to one element of Co-Domain Set. 2. Surjective (Onto) Functions: A function in which every element of Co-Domain Set has one pre-image. Example: Consider, A = {1, 2, 3, 4}, B = {a, b, c} and f = {(1, b), (2, a), (3, c), (4, c)}. It is a Surjective Function, as every element of B is the image of some A Note: In an Onto Function, Range is equal to Co-Domain.
  • 5. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 5 3. Bijective (One-to-One Onto) Functions: A function which is both injective (one to - one) and surjective (onto) is called bijective (One-to-One Onto) Function. Example: 1. Consider P = {x, y, z} 2. Q = {a, b, c} 3. and f: P → Q such that 4. f = {(x, a), (y, b), (z, c)} The f is a one-to-one function and also it is onto. So it is a bijective function. 4. Into Functions: A function in which there must be an element of co-domain Y does not have a pre-image in domain X. Example: 1. Consider, A = {a, b, c} 2. B = {1, 2, 3, 4} and f: A → B such that 3. f = {(a, 1), (b, 2), (c, 3)} 4. In the function f, the range i.e., {1, 2, 3} ≠ co-domain of Y i.e., {1, 2, 3, 4} Therefore, it is an into function
  • 6. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 6 5. One-One Into Functions: Let f: X → Y. The function f is called one-one into function if different elements of X have different unique images of Y. Example: 1. Consider, X = {k, l, m} 2. Y = {1, 2, 3, 4} and f: X → Y such that 3. f = {(k, 1), (l, 3), (m, 4)} The function f is a one-one into function 6. Many-One Functions: Let f: X → Y. The function f is said to be many-one functions if there exist two or more than two different elements in X having the same image in Y.
  • 7. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 7 Example: 1. Consider X = {1, 2, 3, 4, 5} 2. Y = {x, y, z} and f: X → Y such that 3. f = {(1, x), (2, x), (3, x), (4, y), (5, z)} The function f is a many-one function 7. Many-One Into Functions: Let f: X → Y. The function f is called the many-one function if and only if is both many one and into function. Example: 1. Consider X = {a, b, c} 2. Y = {1, 2} and f: X → Y such that 3. f = {(a, 1), (b, 1), (c, 1)} As the function f is a many-one and into, so it is a many-one into function.
  • 8. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 8 8. Many-One Onto Functions: Let f: X → Y. The function f is called many-one onto function if and only if is both many one and onto. Example: 1. Consider X = {1, 2, 3, 4} 2. Y = {k, l} and f: X → Y such that 3. f = {(1, k), (2, k), (3, l), (4, l)} The function f is a many-one (as the two elements have the same image in Y) and it is onto (as every element of Y is the image of some element X). So, it is many-one onto function
  • 9. Discrete Structure & Theory of Logic Unit 1 G L Bajaj Group of Intitutions, Mathura | Compiled By: Nandini Sharma Page 9 Recurrence Relation The manner in which the terms of a sequence are found in recursive manner is called recurrence relation. Definition An equation which defines a sequence recursively, where the next term is a function of the previous terms is known as recurrence relation. A recurrence relation is an equation that recursively defines a sequence Recursively Defined Function We can also define functions recursively: in terms of the same function of a smaller variable. In this way, a recursive function "builds" on itself. A recursive definition has two parts: 1. Definition of the smallest argument (usually f (0) or f (1)). 2. Definition of f (n), given f (n - 1), f (n - 2), etc. Here is an example of a recursively defined function: We can calculate the values of this function: f (0)=5 f (1)=f (0) + 2 = 5 + 2 = 7 f (2)=f (1) + 2 = 7 + 2 = 9 f (3)=f (2) + 2 = 9 + 2 = 11 … This recursively defined function is equivalent to the explicitly defined function f (n) = 2n + 5. However, the recursive function is defined only for nonnegative integers.