Counting Techniques: Combinations - PowerPoint PPT Presentation

About This Presentation
Title:

Counting Techniques: Combinations

Description:

Counting Techniques: Combinations Combinations Typical situation: How many 5-card hands can be made from a deck of 52 cards? Definition: r-combination of a set of n ... – PowerPoint PPT presentation

Number of Views:223
Avg rating:3.0/5.0
Slides: 12
Provided by: vard157
Category:

less

Transcript and Presenter's Notes

Title: Counting Techniques: Combinations


1
Counting TechniquesCombinations
2
Combinations
  • Typical situation How many 5-card hands
  • can be made from a deck of 52 cards?
  • Definition r-combination of a set of n elements
    is a subset of r of the n elements.
  • The number of all r-combinations
  • of a set of n elements denoted
  • and read n choose r.
  • In the example above, want to find C52,5 .

3
Unordered versus ordered selections
  • Two ordered selections are the same if
  • ? the elements chosen are the same
  • ? the elements chosen are in the same order.
  • Ordered selections correspond to r-permutations.
  • The number of all r-permutations is P(n,r) .
  • Two unordered selections are the same if
  • ? the elements chosen are the same.
  • (regardless of the order in which the elements
    are chosen)
  • Unordered selections correspond to
    r-combinations.
  • The number of all r-combinations is C(n,r) .

4
Formula for computing C(n,r)
  • Suppose we want to compute P(n,r) .
  • Constructing an r-permutation from a set of n
    elements can be thought as a 2-step process
  • Step 1 Choose a subset of r elements
  • Step 2 Choose an ordering of the r-element
    subset.
  • Step 1 can be done in C(n,r) different ways.
  • Step 2 can be done in r! different ways.
  • (regardless of how the step 1 was performed)
  • Based on the multiplication rule, P(n,r) C(n,
    r) r!
  • Thus,

5
Examples on Combinations
  • The number of different 5-card hands
  • from a deck of 52 cards
  • 4 members from a group of 11
  • are supposed to work as a team on a project.
  • Q How many distinct 4-person teams can be
    chosen?
  • A

6
Examples on Combinations
  • Suppose in the project example,
  • Mary might work on the project only if
    John is also involved in the project.
  • Q What is the number of 4-people teams
  • that can be chosen from 11 people in this
    case?
  • Solution Divide the set S of all possible teams
    into two subsets. Let X be the set of teams with
    Mary
  • Y be the set of teams without Mary.
  • ? If Mary is in the team, then John is also
    there.
  • The remaining 2 spots
  • should be filled by the other 9 members.
  • Thus, n(X) C(9, 2) 98 / 2 36 .
  • ? Suppose Mary is not in the team.
  • Then any of the other 10 members can fill
    the 4 spots.
  • Thus, n(Y) C(10, 4) (10987) /
    (1234) 210 .
  • Based on the addition rule,
  • n(S) n(X) n(Y) 36210 246

7
Examples on Combinations
  • Suppose that 3 cars in a production run of 40 are
    defective.
  • A sample of 4 is to be selected to be checked
    for defects.
  • Questions
  • 1) How many different samples can be chosen?
  • 2) How many samples will contain
  • exactly one defective car?
  • 3) What is the probability that a randomly
    chosen sample will contain exactly one
    defective car?
  • 4) How many samples will contain
  • at least one defective car?
  • Solution
  • 1) C(40, 4) (40393837) / (1234)
    91,390

8
Examples on Combinations
  • 2) How many samples will contain
  • exactly one defective car?
  • Think of selecting a sample as a 2-step process
  • Step 1 Choose the defective cars
  • Step 2 Choose the good cars.
  • There are C(3,1) ways to choose 1 defective car.
  • There are C(37,3) ways to choose 3 good cars.
  • By the multiplication rule, the number of
    samples containing exactly 1 defective car
    is
  • C(3,1) C(37,3) 3(373635) / (123)
    23,310
  • 3) What is the probability that a randomly
    chosen sample will contain exactly one
    defective car?
  • The probability 23,310 / 91,390 .255

9
Examples on Combinations
  • 4) How many samples will contain at least one
    defective car?
  • There are 2 ways to answer this question,
  • either by the addition rule
  • or by the difference rule.
  • The solution by the difference rule is less
    intuitive but shorter. Lets solve it by the
    difference rule.
  • ( of samples with 1 defective cars)
  • (all possible samples)
  • ( of samples with no defective cars) .
  • But ( of samples with no defective cars)
  • ( of samples with only good cars)
    C(37,4)66,045
  • Thus, ( of samples with 1 defective cars)
  • 91,390 66,045 25,345

10
Some Advice about Counting
  • Apply the multiplication rule if
  • ? The elements to be counted
  • can be obtained through a multistep process
  • ? Each step is performed
  • in a fixed number of ways regardless of
  • how preceding steps were performed.
  • Apply the addition rule if
  • ? The set of elements to be counted
  • can be broken up into disjoint subsets.
  • Note Often a counting problem is solved by
    applying both the multiplication and addition
    rules (and their variations) at different stages
    of the solution.

11
Some Advice about Counting
  • In any counting problem, make sure that
  • 1) every element is counted
  • 2) no element is counted more than once.
  • (avoid double counting)
  • When using the multiplication rule,
  • these directives become
  • 1) every outcome should appear as some branch of
    tree
  • 2) no outcome should appear
  • on more than one branch of tree.
  • When using the addition rule, the directives
    become
  • 1) every outcome should be in some subset
  • 2) the subsets should be disjoint.
Write a Comment
User Comments (0)
About PowerShow.com