Set, Combinatorics, Probability &
                     Number Theory



           Mathematical Structures
            for Computer Science
                   Chapter 3	





Copyright © 2006 W.H. Freeman & Co.   MSCS Slides   Set, Combinatorics, Probability & Number Theory
Counting
     ●        The idea is to find out how many members are present in a finite
              set. Principles of counting answer the following kind of
              questions:	

              ■    How many four digit numbers can there be if repetition of numbers
                   are allowed and if repetition of numbers are not allowed?	

              ■    If a man has 4 suits, 8 shirts and 5 ties, how many outfits can he put
                   together?	

     ●        Multiplication Principle: If there are n possible outcomes for a
              first event and m possible outcomes for a second event, then there
              are n*m possible outcomes for the sequence of two events.	

     ●        Hence, from the multiplication principle, it follows that for two
              sets A and B	

          	

      	

      	

    	

       	

|A×B| = |A|*|B|	

     ●        A child is allowed to choose one jellybean out of two jellybeans,
              one red and one black, and one gummy bear out of three gummy
              bears, yellow, green, and white. How many different sets of
              candy can the child have?

Section 3.2                                       Counting                                 1
Example: Multiplication Principle

     ●        There are 2×3=6 or 3×2=6 possible outcomes as seen
              from the following figures	





Section 3.2                            Counting                    2
Addition Principle
     ●        Addition Principle: If A and B are disjoint events with n and m
              outcomes, respectively, then the total number of possible outcomes for
              event “A or B” is n+m.	

     ●        If A and B are disjoint sets, then |A ∪ B| = |A| + |B| using the addition
              principle.	

     ●        Prove that if A and B are finite sets then	

          	

      	

|A-B| = |A| - |A ∩ B| and |A-B| = |A| - |B| if B ⊆ A 	

                 	

(A-B) ∪ (A ∩ B) = (A ∩ Bʹ′) ∪ (A ∩ B) 	

                 	

 	

      	

= A ∩ (Bʹ′ ∪ B) 	

                 	

 	

      	

= A ∩ U	

                 	

 	

      	

= A	

     ●        Also, A-B and A ∩ B are disjoint sets, therefore using the addition
              principle	

                 	

 	

|A| = | (A-B) ∪ (A ∩ B) | = |A-B| + |A ∩ B|	

     ●        Hence, |A-B| = |A| - |A ∩ B| 	

     ●        If B ⊆ A, then A ∩ B = B	

     ●        Hence, |A-B| = |A| - |B| 	


Section 3.2                                              Counting                         3
Decision trees
     ●        Trees that provide the number of outcomes of an event based on
              a series of possible choices are called decision trees.	

     ●        Tony is pitching pennies. Each toss results in heads (H) or tails
              (T). How many ways can he toss the coin five times without
              having two heads in a row?




     ●        There are 13 possible outcomes as seen from the tree.

Section 3.2                                   Counting                            4

More Related Content

PPT
Section3 2
PPTX
permutation and combination
PPTX
Permutations and-combinations-maths
PDF
Mult div strategies L5 to L8
DOCX
Stage 6 Strategy & Knowledge
PPT
permutation and combination
DOCX
Stage 5 strategy & knowledge
PPT
Permutations and Combinations
Section3 2
permutation and combination
Permutations and-combinations-maths
Mult div strategies L5 to L8
Stage 6 Strategy & Knowledge
permutation and combination
Stage 5 strategy & knowledge
Permutations and Combinations

What's hot (20)

PPT
Counting Project
PPTX
Lusbyn morales numeros reales
ODP
Factorials
PPS
Addsub poly
DOCX
G6 m5-c-lesson 12-s
DOCX
Lessons 12 13 merged
PDF
Probability Day 3 - Permutations and Combinations
PPTX
5.4 Complex Numbers
PPTX
Rational numbers ppt
PPT
Complex nos demo 2
PDF
A solution to Fermats last theorem using a colour analogy
PDF
Lesson 2 Nov 19 09
PPTX
Wordproblem
PDF
8th pre alg -l63
DOC
PPTX
Module 3 lesson 3
DOCX
Exp 8 evidencia
DOCX
Cr#4
PPT
Lesson 2
PPTX
Multimedia Student Tutorial Exponents
Counting Project
Lusbyn morales numeros reales
Factorials
Addsub poly
G6 m5-c-lesson 12-s
Lessons 12 13 merged
Probability Day 3 - Permutations and Combinations
5.4 Complex Numbers
Rational numbers ppt
Complex nos demo 2
A solution to Fermats last theorem using a colour analogy
Lesson 2 Nov 19 09
Wordproblem
8th pre alg -l63
Module 3 lesson 3
Exp 8 evidencia
Cr#4
Lesson 2
Multimedia Student Tutorial Exponents
Ad

Viewers also liked (18)

PPT
Forecasting
PDF
CPSC 125 Ch 4 Sec 4
PPT
Statistics lesson 1
PDF
CPSC 125 Ch 3 Sec 1
PDF
CPSC 125 Ch 3 Sec 3
PPT
Introductory sessions
PPT
CPSC 125 Ch 1 sec 1
PPTX
Measures of central tendency
PPT
Probability+distribution
PPT
Probability distribution 2
PPT
Hypothesis
PDF
PROJECT REPORT 2(2014)TATA PROJECT
PPT
Measures of dispersion
PPT
Sampling distribution
PPTX
Binomial probability distributions ppt
PPT
Statistics lesson 1
PPT
Permutations & Combinations
PDF
So You Wanna be a Startup CTO 20170301
Forecasting
CPSC 125 Ch 4 Sec 4
Statistics lesson 1
CPSC 125 Ch 3 Sec 1
CPSC 125 Ch 3 Sec 3
Introductory sessions
CPSC 125 Ch 1 sec 1
Measures of central tendency
Probability+distribution
Probability distribution 2
Hypothesis
PROJECT REPORT 2(2014)TATA PROJECT
Measures of dispersion
Sampling distribution
Binomial probability distributions ppt
Statistics lesson 1
Permutations & Combinations
So You Wanna be a Startup CTO 20170301
Ad

Similar to CPSC 125 Ch 3 Sec 2 (20)

PPT
Discrete Math Ch5 counting + proofs
PPTX
Permutations and Combinations (All Formulas)
PPTX
Permutations and Combinations(For Class 11)
PDF
Permutation and combinations
PDF
9.5 Counting Principles
PDF
Counting -Methods-probabilities-theory prst2
PPTX
Pdm presentation
PPT
Combinatorics
PPTX
Counting Theroy .pptx
PPTX
Counting, mathematical induction and discrete probability
PPTX
Permutation and combination
PPTX
chapter five.pptx
PPTX
MFCS UNIT-III.pptx
PPTX
math 10 2023.pptx in statistics and probability information
PPTX
unit 4 Elementary descrete mathematics combinatorics.pptx
PPTX
Unit 5 - Permutation & Combinations.pptx
PDF
Probability module 1
PDF
Probability, Statistic & Random Process - Lecture 2 - Counting.pdf
PPT
Combinatorics: Permutation and Combination
Discrete Math Ch5 counting + proofs
Permutations and Combinations (All Formulas)
Permutations and Combinations(For Class 11)
Permutation and combinations
9.5 Counting Principles
Counting -Methods-probabilities-theory prst2
Pdm presentation
Combinatorics
Counting Theroy .pptx
Counting, mathematical induction and discrete probability
Permutation and combination
chapter five.pptx
MFCS UNIT-III.pptx
math 10 2023.pptx in statistics and probability information
unit 4 Elementary descrete mathematics combinatorics.pptx
Unit 5 - Permutation & Combinations.pptx
Probability module 1
Probability, Statistic & Random Process - Lecture 2 - Counting.pdf
Combinatorics: Permutation and Combination

More from David Wood (20)

PPTX
Internet of Things (IoT) two-factor authentication using blockchain
PPTX
Returning to Online Privacy?
PPTX
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
PPTX
BlockSW 2019 Keynote
PDF
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
PDF
Privacy in the Smart City
PDF
Controlling Complexities in Software Development
PDF
Privacy Concerns related to Verifiable Claims
PDF
Implementing the Verifiable Claims data model
PDF
Functional manipulations of large data graphs 20160601
PDF
When Metaphors Kill
PDF
Secularism in Australia
PDF
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
PDF
Building a writer's platform with social media
PDF
Summary of the Hero's Journey
PDF
Open by Default
PDF
Lod Then, Now and Next 20110926
PDF
Linked Data ROI 20110426
PDF
Introduction to Linked Data: RDF Vocabularies
PDF
Introduction to Linked Data: RDF Vocabularies
Internet of Things (IoT) two-factor authentication using blockchain
Returning to Online Privacy?
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
BlockSW 2019 Keynote
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Privacy in the Smart City
Controlling Complexities in Software Development
Privacy Concerns related to Verifiable Claims
Implementing the Verifiable Claims data model
Functional manipulations of large data graphs 20160601
When Metaphors Kill
Secularism in Australia
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Building a writer's platform with social media
Summary of the Hero's Journey
Open by Default
Lod Then, Now and Next 20110926
Linked Data ROI 20110426
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies

CPSC 125 Ch 3 Sec 2

  • 1. Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co. MSCS Slides Set, Combinatorics, Probability & Number Theory
  • 2. Counting ●  The idea is to find out how many members are present in a finite set. Principles of counting answer the following kind of questions: ■  How many four digit numbers can there be if repetition of numbers are allowed and if repetition of numbers are not allowed? ■  If a man has 4 suits, 8 shirts and 5 ties, how many outfits can he put together? ●  Multiplication Principle: If there are n possible outcomes for a first event and m possible outcomes for a second event, then there are n*m possible outcomes for the sequence of two events. ●  Hence, from the multiplication principle, it follows that for two sets A and B |A×B| = |A|*|B| ●  A child is allowed to choose one jellybean out of two jellybeans, one red and one black, and one gummy bear out of three gummy bears, yellow, green, and white. How many different sets of candy can the child have? Section 3.2 Counting 1
  • 3. Example: Multiplication Principle ●  There are 2×3=6 or 3×2=6 possible outcomes as seen from the following figures Section 3.2 Counting 2
  • 4. Addition Principle ●  Addition Principle: If A and B are disjoint events with n and m outcomes, respectively, then the total number of possible outcomes for event “A or B” is n+m. ●  If A and B are disjoint sets, then |A ∪ B| = |A| + |B| using the addition principle. ●  Prove that if A and B are finite sets then |A-B| = |A| - |A ∩ B| and |A-B| = |A| - |B| if B ⊆ A (A-B) ∪ (A ∩ B) = (A ∩ Bʹ′) ∪ (A ∩ B) = A ∩ (Bʹ′ ∪ B) = A ∩ U = A ●  Also, A-B and A ∩ B are disjoint sets, therefore using the addition principle |A| = | (A-B) ∪ (A ∩ B) | = |A-B| + |A ∩ B| ●  Hence, |A-B| = |A| - |A ∩ B| ●  If B ⊆ A, then A ∩ B = B ●  Hence, |A-B| = |A| - |B| Section 3.2 Counting 3
  • 5. Decision trees ●  Trees that provide the number of outcomes of an event based on a series of possible choices are called decision trees. ●  Tony is pitching pennies. Each toss results in heads (H) or tails (T). How many ways can he toss the coin five times without having two heads in a row? ●  There are 13 possible outcomes as seen from the tree. Section 3.2 Counting 4