SlideShare a Scribd company logo
1 of 11
MATHEMATICAL FOUNDATION OF
COMPUTER SCIENCE
by,
S.Subhalakshmi
M.Sc(Computer Science)
Nadar saraswathi college of arts and science.
Inclusion and Exclusion Principle:
The Inclusion and Exclusion Principle is a counting technique
which generalizes the familiar method of obtaining the number of elements in
the union of two finite sets, symbolically expressed as
where A and B are two finite sets and |S| indicates the cardinality of a set
S
The principle is more clearly seen in the case of three sets, which for the set A , B
and C is given by,
Generalizing the results of these examples gives the principle of inclusion–exclusion
.To find the cardinality of the union of n sets:
1. Include the cardinalities of the sets.
2. Exclude the cardinalities of the pairwise intersections.
3. Include the cardinalities of the triple-wise intersections.
4. Exclude the cardinalities of the quadruple-wise intersections.
5. Include the cardinalities of the quintuple-wise intersections.
6. Continue, until the cardinality of then tuple-wise intersection is
included (if n is odd) or excluded (n even).
 The name comes from the idea that the principle is based on
over-generous inclusion, followed by compensating exclusion.
 This concept is attributed to Abraham de Moivre (1718), but it first
appears in a paper of Daniel da Silva (1854), and later in a paper
by J. J. Sylvester (1883).
 Sometimes the principle is referred to as the formula of Da Silva,
or Sylvester due to these publications.
“One of the most useful principles of enumeration in discrete
probability and combinatorial theory is the celebrated principle of
inclusion–exclusion. When skillfully applied, this principle has yielded
the solution to many a combinatorial problem."
In its general form, the principle of inclusion–exclusion states that for
finite set A1, ..., An one has the identity
This can be compactly written as
or
In Demorgan’s law we have,
let P1, P2, ..., Pn be a list of properties that elements of a set S including
may or may not have the principle of inclusion and exclusion.
EXAMPLES:
Counting integers:
How many integers in {1,...,100} are not divisible by 2, 3 or 5?
Let S = {1,...,100} and p1 is divisible by 2,p2 is divisible by
3,p3 is divisible by 5.
|A1| = 50, |A2| = 33, and |A3| = 20.
16 is divisible by 6,10 is divisible by 10,6 is divisible by 15.
There are three integers divisible by 30.The number of integers not
divisible by 2,3,5.
100 − (50 + 33 + 20) + (16 + 10 + 6) − 3 = 26.
Applications:
1.counting derangements:
It is a combinatorial problem of counting all derangements
of a finite set. The derangements has no fixed points.
2. Counting intersections:
De Morgan's law, can be used to count the cardinality of the
intersection of sets as well.
3. Graph coloring:
A well known application of the principle is the construction
of the chromatic polynomial of a graph.
4. Bipartite graph perfect matchings:
The number of perfect matchings of a bipartite graph can be calculated using
the principle.
5.Number of onto functions:
The Principle of inclusion–exclusion gives the number of onto functions
between A and B as:
6.Permutations with forbidden positions:
A permutation of the set S = {1,2,...,n} where each element of S is restricted to
not being in certain positions is called a permutation with forbidden positions.
Mathematical foundation in cs

More Related Content

What's hot

Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design PresentationKawsar Ahmed
 
Topological Sorting
Topological SortingTopological Sorting
Topological SortingShahDhruv21
 
Polynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxPolynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxAlbin562191
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE A. N. M. Jubaer
 
Number theory
Number theory Number theory
Number theory tes31
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics LectureGenie Rose Santos
 
Eucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsEucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsSWAMY J S
 
Maximal and minimal elements of poset.pptx
Maximal and minimal elements of poset.pptxMaximal and minimal elements of poset.pptx
Maximal and minimal elements of poset.pptxKiran Kumar Malik
 
Application of Matrices in real life
Application of Matrices in real lifeApplication of Matrices in real life
Application of Matrices in real lifeShayshab Azad
 
Applications of linear algebra in computer science
Applications of linear algebra in computer scienceApplications of linear algebra in computer science
Applications of linear algebra in computer scienceArnob Khan
 
Graphs in data structure
Graphs in data structureGraphs in data structure
Graphs in data structurehamza javed
 
Intro & Applications of Discrete Math
Intro & Applications of Discrete MathIntro & Applications of Discrete Math
Intro & Applications of Discrete MathBilal Khan
 
Relationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & PatternRelationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & PatternBharat Rathore
 

What's hot (20)

Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design Presentation
 
Topological Sorting
Topological SortingTopological Sorting
Topological Sorting
 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
 
Polynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxPolynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptx
 
Artificial Intelligence and Mathematics
Artificial Intelligence and MathematicsArtificial Intelligence and Mathematics
Artificial Intelligence and Mathematics
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE
 
Engineering mathematics 1
Engineering mathematics 1Engineering mathematics 1
Engineering mathematics 1
 
Bfs and Dfs
Bfs and DfsBfs and Dfs
Bfs and Dfs
 
Number theory
Number theory Number theory
Number theory
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics Lecture
 
Eucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsEucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomials
 
Maximal and minimal elements of poset.pptx
Maximal and minimal elements of poset.pptxMaximal and minimal elements of poset.pptx
Maximal and minimal elements of poset.pptx
 
Application of Matrices in real life
Application of Matrices in real lifeApplication of Matrices in real life
Application of Matrices in real life
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Applications of linear algebra in computer science
Applications of linear algebra in computer scienceApplications of linear algebra in computer science
Applications of linear algebra in computer science
 
Graphs in data structure
Graphs in data structureGraphs in data structure
Graphs in data structure
 
Intro & Applications of Discrete Math
Intro & Applications of Discrete MathIntro & Applications of Discrete Math
Intro & Applications of Discrete Math
 
Relationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & PatternRelationship Among Token, Lexeme & Pattern
Relationship Among Token, Lexeme & Pattern
 

Similar to Mathematical foundation in cs

1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptx1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptxmxian444
 
Y7 m280115workw ithnumb1
Y7 m280115workw ithnumb1Y7 m280115workw ithnumb1
Y7 m280115workw ithnumb13SNEducation
 
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...LouelaDePaz
 
Lesson 7: Graphing Inequalities
Lesson 7: Graphing InequalitiesLesson 7: Graphing Inequalities
Lesson 7: Graphing InequalitiesKevin Johnson
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematicNaralaswapna
 
maths ppt on exponents, playing with no. & graphs
maths ppt on exponents, playing with no. & graphsmaths ppt on exponents, playing with no. & graphs
maths ppt on exponents, playing with no. & graphsDeepansha Datla
 
Number Systems and Arithmetic Operations.pptx
Number Systems and Arithmetic Operations.pptxNumber Systems and Arithmetic Operations.pptx
Number Systems and Arithmetic Operations.pptxshahbazsahbi8
 
An applied approach to calculas
An applied approach to calculasAn applied approach to calculas
An applied approach to calculasTarun Gehlot
 
VARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHES
VARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHESVARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHES
VARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHESIAEME Publication
 
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...ssifa0344
 
Set theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaningSet theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaningDipakMahurkar1
 
Cardinality of a set
Cardinality of a setCardinality of a set
Cardinality of a setmyla gambalan
 
Edu 635 curriculum map grade 3 m alvarez
Edu 635 curriculum map grade 3 m alvarezEdu 635 curriculum map grade 3 m alvarez
Edu 635 curriculum map grade 3 m alvarezMelissa Alvarez
 

Similar to Mathematical foundation in cs (20)

1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptx1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptx
 
Math Analysis I
Math Analysis I Math Analysis I
Math Analysis I
 
set.pdf
set.pdfset.pdf
set.pdf
 
Y7 m280115workw ithnumb1
Y7 m280115workw ithnumb1Y7 m280115workw ithnumb1
Y7 m280115workw ithnumb1
 
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
 
Lesson 7: Graphing Inequalities
Lesson 7: Graphing InequalitiesLesson 7: Graphing Inequalities
Lesson 7: Graphing Inequalities
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematic
 
file_5.pptx
file_5.pptxfile_5.pptx
file_5.pptx
 
maths ppt on exponents, playing with no. & graphs
maths ppt on exponents, playing with no. & graphsmaths ppt on exponents, playing with no. & graphs
maths ppt on exponents, playing with no. & graphs
 
Section3 2
Section3 2Section3 2
Section3 2
 
Number Systems and Arithmetic Operations.pptx
Number Systems and Arithmetic Operations.pptxNumber Systems and Arithmetic Operations.pptx
Number Systems and Arithmetic Operations.pptx
 
Lemh104
Lemh104Lemh104
Lemh104
 
An applied approach to calculas
An applied approach to calculasAn applied approach to calculas
An applied approach to calculas
 
VARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHES
VARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHESVARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHES
VARIOUS FUZZY NUMBERS AND THEIR VARIOUS RANKING APPROACHES
 
Lemh103
Lemh103Lemh103
Lemh103
 
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
 
Set theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaningSet theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaning
 
Marh algebra lesson
Marh algebra lessonMarh algebra lesson
Marh algebra lesson
 
Cardinality of a set
Cardinality of a setCardinality of a set
Cardinality of a set
 
Edu 635 curriculum map grade 3 m alvarez
Edu 635 curriculum map grade 3 m alvarezEdu 635 curriculum map grade 3 m alvarez
Edu 635 curriculum map grade 3 m alvarez
 

More from Subha Selvam

More from Subha Selvam (14)

Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Mobile computing
Mobile computingMobile computing
Mobile computing
 
Complier Design
Complier DesignComplier Design
Complier Design
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Web programming
Web programmingWeb programming
Web programming
 
Big data
Big dataBig data
Big data
 
Data mining
Data miningData mining
Data mining
 
Operating system
Operating systemOperating system
Operating system
 
Database management
Database managementDatabase management
Database management
 
Database management
Database managementDatabase management
Database management
 
Computer network
Computer networkComputer network
Computer network
 
Java
JavaJava
Java
 
Sc
ScSc
Sc
 
Ds
DsDs
Ds
 

Recently uploaded

Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Vipesco
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubssamaasim06
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...amilabibi1
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsaqsarehman5055
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lodhisaajjda
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Delhi Call girls
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfSenaatti-kiinteistöt
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Baileyhlharris
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfSkillCertProExams
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardsticksaastr
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIINhPhngng3
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Pooja Nehwal
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Chameera Dedduwage
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCamilleBoulbin1
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoKayode Fayemi
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar TrainingKylaCullinane
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 

Recently uploaded (20)

Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 

Mathematical foundation in cs

  • 1. MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE by, S.Subhalakshmi M.Sc(Computer Science) Nadar saraswathi college of arts and science.
  • 2. Inclusion and Exclusion Principle: The Inclusion and Exclusion Principle is a counting technique which generalizes the familiar method of obtaining the number of elements in the union of two finite sets, symbolically expressed as where A and B are two finite sets and |S| indicates the cardinality of a set S
  • 3. The principle is more clearly seen in the case of three sets, which for the set A , B and C is given by, Generalizing the results of these examples gives the principle of inclusion–exclusion .To find the cardinality of the union of n sets:
  • 4. 1. Include the cardinalities of the sets. 2. Exclude the cardinalities of the pairwise intersections. 3. Include the cardinalities of the triple-wise intersections. 4. Exclude the cardinalities of the quadruple-wise intersections. 5. Include the cardinalities of the quintuple-wise intersections. 6. Continue, until the cardinality of then tuple-wise intersection is included (if n is odd) or excluded (n even).
  • 5.  The name comes from the idea that the principle is based on over-generous inclusion, followed by compensating exclusion.  This concept is attributed to Abraham de Moivre (1718), but it first appears in a paper of Daniel da Silva (1854), and later in a paper by J. J. Sylvester (1883).  Sometimes the principle is referred to as the formula of Da Silva, or Sylvester due to these publications. “One of the most useful principles of enumeration in discrete probability and combinatorial theory is the celebrated principle of inclusion–exclusion. When skillfully applied, this principle has yielded the solution to many a combinatorial problem."
  • 6. In its general form, the principle of inclusion–exclusion states that for finite set A1, ..., An one has the identity This can be compactly written as
  • 7. or In Demorgan’s law we have, let P1, P2, ..., Pn be a list of properties that elements of a set S including may or may not have the principle of inclusion and exclusion.
  • 8. EXAMPLES: Counting integers: How many integers in {1,...,100} are not divisible by 2, 3 or 5? Let S = {1,...,100} and p1 is divisible by 2,p2 is divisible by 3,p3 is divisible by 5. |A1| = 50, |A2| = 33, and |A3| = 20. 16 is divisible by 6,10 is divisible by 10,6 is divisible by 15. There are three integers divisible by 30.The number of integers not divisible by 2,3,5. 100 − (50 + 33 + 20) + (16 + 10 + 6) − 3 = 26.
  • 9. Applications: 1.counting derangements: It is a combinatorial problem of counting all derangements of a finite set. The derangements has no fixed points. 2. Counting intersections: De Morgan's law, can be used to count the cardinality of the intersection of sets as well. 3. Graph coloring: A well known application of the principle is the construction of the chromatic polynomial of a graph.
  • 10. 4. Bipartite graph perfect matchings: The number of perfect matchings of a bipartite graph can be calculated using the principle. 5.Number of onto functions: The Principle of inclusion–exclusion gives the number of onto functions between A and B as: 6.Permutations with forbidden positions: A permutation of the set S = {1,2,...,n} where each element of S is restricted to not being in certain positions is called a permutation with forbidden positions.