counting principles, permutations & combinations

Upload: prashanttrehan

Post on 02-Jun-2018

234 views

Category:

Documents


2 download

TRANSCRIPT

  • 8/11/2019 Counting Principles, Permutations & Combinations

    1/19

    Fundamental Counting Principle

    In general, if there are m choices for doing one thing, and after that occurs, there are n choices for doing

    another, and then together they can be done in m x n ways.

    If one event can occur in m ways and a second event can occur in n ways, then both events can occur inm x n ways, provided the outcome of the first event does not influence the outcome of the second

    event.

    Example:

    A restaurant offers a choice of 2 salads, 6 main dishes, 4 side dishes, and 3 desserts. How many different

    4-course meals can be selected?

    Four independent events are involved: selecting a salad, selecting a main dish, selecting a side dish, and

    selecting a dessert.

    The first event can occur in 2 ways, the second in 6 ways, the third in 4 ways, and the fourth in 3 ways.Thus, there are 2x6x4x3 = 144 possible meals.

    Example:

    If I looked at another example, say throwing a coin and rolling a die. Drawing a tree diagram I would

    quickly see there are twelve possible outcomes H1, H2, H3, H4, H5, H6, T1, T2, T3, T4, T5, and T6.

    Again, you might notice there are two possible outcomes when tossing the coin and six outcomes when

    rolling the die.

    Example:Abe, Ben, and Carl are running a race, in how many ways can they finish?

    There are three ways I could choose the winner, and after that occurs; there are two ways to pick

    second place, and one way to pick the third place finisher.

    Therefore there are 3 x 2 x 1 or 6 different way these three boys could finish the race.

  • 8/11/2019 Counting Principles, Permutations & Combinations

    2/19

    Example:

    How many different ways can the letters in the word ACT be arranged?

    There are six different ways to write those letters. We can see that in the following list.

    ACT, ATC, CAT, CTA, TAC, CAT

    We could have determined there were six by using the Fundamental Counting Principle, three ways topick the first letter, 2 ways to pick the second, then one way to pick the third.

    That could also have been described using 3!

    Example:

    If a different person must be selected for each position, in how many ways can we choose the president,

    vice president, and secretary from a group of seven members if the first person chosen is the president,

    the second the vice president, and the third is the secretary?

    We have a total of 7 people taken three at a time. Using the Fundamental Counting Principle, the first

    person can be chosen 7 ways, the next 6, and the third 5;We have 7 x 6 x 5 or 210 ways of choosing the officers.

    Example:

    How many numbers of three different digits each can be formed by choosing the digits 1; 2; 3; 4; 5 and

    6?

    To form a three-digit number, we must fill the positions - - - with different digits. For the first position

    we have six choices. After filling that position with some digit, we can fill the second position with any of

    the remaining five digits. Finally there are four choices for the last position. By the basic principle of

    counting, the total number of three different digits that can be formed by choosing from the six given

    digits is 6 x 5 x 4 = 120.

    Note:

    If repetitions are allowed, the total number would then be 6 x 6 x 6 = 216.

  • 8/11/2019 Counting Principles, Permutations & Combinations

    3/19

    Multiplication Principle

    Example:

    Consider the 3 letter words that can be made from the letters WORD if no letter is repeated. These can

    be listed by means of a tree diagram.

    There are:

    4 ways of choosing the 1st letter

    3 ways of choosing the 2nd letter

    2 ways of choosing the 3rd letter

    Number of words = 4 x 3 x 2 = 24

    Addition Principle

    Example:

    Consider the 3 letter words starting or finishing with O that can be made from the letters WORD if no

    letter is repeated.

    Now words starting or finishing with O are mutually exclusive i.e. they do not overlap. Therefore we can

    find the number starting with O and the number finishing with O and add the two numbers.

    Number of words starting or finishing with O = 6 + 6 = 12

    Circular Arrangements

    In general, n objects can be arranged in a circle in (n - 1)! ways.

  • 8/11/2019 Counting Principles, Permutations & Combinations

    4/19

    Together Arrangements

    In this type of problem, we need to count arrangements where some of the objects must remain

    together. The multiplication principle applies and we use a treat as one technique.

    Example:3 science, 4 mathematics and 5 history books are arranged on a shelf. How many arrangements are

    possible if the books from each subject are to be together?

    Treat the books for each subject as one book:

    Number of arrangements = 3!

    Number of ways of arranging the science books = 3!

    Number of ways of arranging the mathematics books = 4!

    Number of ways of arranging the history books = 5!

    Total number of arrangements = 3! x 3! x 4! x 5! = 103680

    Arrangements Involving Identical Objects

    Example:

    Consider the number of arrangements of the letters EMPLOYEE. If all 8 letters were different, then the

    number of arrangements would be 8! but this number involves counting arrangements more than once.

    E.g. The 8! arrangements includes 6 versions of EEEMPLOY:

    Similarly every arrangement occurs 6 times in the total of 8! (6 is the number of arrangements of the 3

    Es ie. 3!).

    Solution is (8! / 3!)

    Note:

    This idea can be extended to problems where more than one type of object is repeated:

    Number of distinct arrangements of the letters MISSISSIPPI is

  • 8/11/2019 Counting Principles, Permutations & Combinations

    5/19

    Example:

    How many numbers lying between 100 and 1000 can be formed with the digits 0, 1, 2, 3, 4, 5, if the

    repetition of the digits is not allowed?

    Every number between 100 and 1000 is a 3-digit number. We, first, have to count the permutations of 6

    digits taken 3 at a time. This number would be 6P3.But, these permutations will include those also where 0 is at the 100s place. For example, 092, 042,

    etc are such numbers which are actually 2-digit numbers and hence the number of such numbers has to

    be subtracted from 6P3 to get the required number.

    To get the number of such numbers, we fix 0 at the 100s place and rearrange the remaining 5 digits

    taking 2 at a time. This number is 5P2. So

    The required number is 6P35P3 = 4 5 64 5 = 100

    Another way tackling this is:

    There are 5 ways for the first digit (since 0 is not an option).

    There are 5 ways for the second digit and 4 ways for the third digit.

    Therefore there are 5x5x4 ways; there are 100 ways.

    Example:

  • 8/11/2019 Counting Principles, Permutations & Combinations

    6/19

    Example:

    Example:

  • 8/11/2019 Counting Principles, Permutations & Combinations

    7/19

  • 8/11/2019 Counting Principles, Permutations & Combinations

    8/19

    Permutation

    Permutation is an arrangement of objects in which the order matterswithout repetition.

    Permutation is an ordered selection of r objects, without repetition, taken from n distinct objects is

    called a permutation of r objects chosen from a set of n objects.

    Note:

    In case you want to find the number of permutations of n objects taken all at a time, set r = n

    Example:

    There are 5 runners in a race. How many different permutations are possible for the places in which the

    runners finish?

    By formula, we have a permutation of 5 runners being taken 5 at a time.

    Note:

    Using a permutation or the Fundamental Counting Principle, order matters. A permutation does not

    allow repetition. For instance, in finding the number of arrangements of license plates, the digits can be

    re-used. In other words, someone might have the license plate 333 333. To determine the possible

    number of license plates, I could not use the permutation formula because of the repetitions; I would

    have to use the Fundamental Counting Principle.

    Since there are 10 ways to choose each digit on the license plate, the number of plates would be

    determined by10 x 10 x 10 x 10 x 10 x 10 or 1,000,000.

  • 8/11/2019 Counting Principles, Permutations & Combinations

    9/19

    Example:

    A class in mathematics consists of 6 men and 4 women. An examination is given, and the students are

    ranked according to their performance. Assume that no two students obtain the same score.

    (a) How many different rankings are possible?

    (b) If the men are ranked just among themselves and the women among themselves, how many

    different rankings are possible?

    (a) As each ranking corresponds to a particular ordered arrangement of the 10 people, thus the number

    of different rankings is 10P10 = 10! = 3; 628; 800.

    (b) As there are 6! possible rankings of the men among themselves and 4! possible rankings of the

    Women among themselves, it follows that there are 6! 4! = 720 x 24 = 17280 possible rankings in this

    case.

    Permutations With Repeated Objects

    The number of different permutations of n objects such that n1 are of one type, n2 are of a second

    type, , and nk are of a kth type is

    Example:

    How many different letter arrangements can be formed using the letters P E P P E R?

    First note that there are 6! permutations of the letters P1 E1 P2 P3 E2 R when the 3 P's and the 2 E's are

    distinguished from each other.

    However, consider any one of these permutations, say P1 R P2 E1 P3 E2. If the three P's and the two E's

    were interchanged, the resulting permutation would be indistinguishable from P R P E P E.

    For each of the 6! permutations, observe that there are 3! ways to permute the three P's and 2! ways to

    permute the two E's. It follows that there are 6! / (3! 2!) = 60 possible arrangements of the letters P E P

    P E R.

    Solution is 6! / (3! 2!)

    Example:

    If a coin is tossed seven times and the outcome of each toss is noted, in how many ways can four heads

    and three tails occur?

    Solution is 7! / (4!*3!) = 35 different ways

  • 8/11/2019 Counting Principles, Permutations & Combinations

    10/19

    Example:

    A chess tournament has 10 competitors of which 4 from China, 3 from Japan, 2 from Britain, and 1 from

    France. If the tournament result lists just the nationalities of the players in the order in which they

    placed, how many outcomes are possible?

    There are 12,600 possible outcomes.

    Example:

    How many ways can a committee of 3 be selected from 7 people so that there is a president, a vice-

    president and a secretary?

    Using the multiplication principle:

  • 8/11/2019 Counting Principles, Permutations & Combinations

    11/19

    Combination

    Combination is an arrangement of objects in which the order does not matterwithout repetition.

    Combination is an unordered selection of r objects, without repetition, taken from n distinct objects is

    called a combination of r objects chosen from a set of n objects.

    Example:

    List all permutations and combinations of the three letters A;B and C when they are taken two at a time.

    The permutations are

    AB AC BC BA CA CB so 3P2 = 6.

    The combinations areAB AC BC so 3C2 = 3

    Example:

    In a club of 20 members, how many different four-member committees are possible?

    The order in which the members of a committee are arranged is not important. Therefore, the total

    number of possible arrangements is 20C4.

    Special Combinations

    Choosing 7 from 7 so that order does not matter can only be done 1 way:

    7C7 = 1

    Choosing 0 from 7 so that order does not matter can only be done 1 way:

    7C0= 1

  • 8/11/2019 Counting Principles, Permutations & Combinations

    12/19

    Example:

    In how many different ways can a group of 3 people out of a group of 7 people be chosen to work on a

    project if it has already been decided that a certain person must work on the project?

    This is still a combination but the problem has been reduced to selecting 2 more people from the

    remaining 6 people.

    Example:

    From among 12 students trying out for the basketball team, how many ways can 7 students be selected?

    Does the order matter? Is this a permutation or combination? Well, if you were going out for the team

    and a list was printed, would it matter if you were listed first or last? All you would care about is that

    your name is on the list. The order is not important, therefore this would be a combination problem of

    12 students take 7 at a time.

  • 8/11/2019 Counting Principles, Permutations & Combinations

    13/19

    Example:

    From a group of 6 men and 8 women a committee consisting of 3 men and 3 women is to be formed.

    How many different committees are possible if

    (a) 2 of the men refuse to serve together,

    (b) 2 of the women refuse to serve together,

    (c) 1 man and 1 woman refuse to serve together?

    Again, the order in which the members of a committee are arranged is not important. First, 3 of the 6

    men are selected. This can be done in 6C3 = 20 ways. Then, 3 of the 8 women are selected, which can be

    done in 8C3 = 56 ways. By the basic principle of counting, there are 8C3 X 6C3 = 56 x 20 = 1120 different

    committees if no restriction is assumed.

    (a) Let us first focus on the men team. The number of ways the two (trouble) men serve together is

    4C1 = 4, because once these two (trouble) men are selected, there is only one place left in the

    committee for the remaining 4 men. Taking into consideration the women team, the number of

    different committees formed if the two men serve together is 8C3 x 4 = 224. It follows that there are

    1120 - 224 = 896 committees if 2 of the men refuse to serve together.

    Solution is 8C3 * (6C34C1)

    (b) Similar to (a), the number of different committees formed if the two women serve together is

    6C1 x 6 C3 = 120. It follows that there are 1120 - 120 = 1000 committees if 2 of the women refuse to

    serve together.

    Solution is 6C3 * (8C36C1)

    (c) The number of ways the man and the woman serve together is 7C2 x 5 C2 = 210. It follows that there

    are 1120 - 210 = 910 committees if 1 man and 1 woman refuse to serve together.

    Solution is 8C3 * 6C3 - 7C2 * 5C2

    Example:

    Ted has 6 employees, three of them must be on duty during the night shift, how many ways can he

    choose who will work?

    Does order matter? Since it does not matter, this problem can be solved by using the Fundamental

    Counting Principle, then dividing out the same grouping or you could use the formula for combination of

    6 people being taken three at a time.

    There are 6 ways to choose the first person, 5 ways to choose the second, and 4 ways to choose the

    third, thats 120 permutations. Each group of three employees can be ordered 3!Or 6 ways.

    So, we divide the number of permutations by the different ordering of the three employees.

    6X5X4 / 3! = 120 / 6 = 20 ways to pick the shifts

    By formula, wed have6C3 = 6! (3!*3!)

  • 8/11/2019 Counting Principles, Permutations & Combinations

    14/19

    CombinationsInclusions / Exclusions

    Example:

    Consider the number of ways a committee of 3 can be selected from 7 people A,B,C,D,E,F,G (order does

    not matter) if:

    B must be included (select 2 from A,C,D,E,F,G) 6C2

    D must be excluded (select 3 from A,B,C,E,F,G) 6C3

    C and E cannot be chosen together 5C3 + 5C2 + 5C2

    The justification for the last answer is as follows:

    C and E cannot be chosen, hence the total combinations are

    - C and E are not chosen, then select 3 from 5 which 5C3

    - C is included and E is excluded, then select 2 from 5 which is 5C2

    - C is excluded and E is included, then select 2 from 5 which is 5C2

    Choosing Sets Of Objects With Distinct Subsets

    Note:

    In these problems, find the number of ways of choosing each subset and then use the multiplication

    principle.

    Example:

    6 people are chosen (order does not matter) from 5 Queenslanders, 4 Tasmanians and 3 Victorians:

  • 8/11/2019 Counting Principles, Permutations & Combinations

    15/19

    Example:

    Example:

  • 8/11/2019 Counting Principles, Permutations & Combinations

    16/19

  • 8/11/2019 Counting Principles, Permutations & Combinations

    17/19

    Example: (IMP)

  • 8/11/2019 Counting Principles, Permutations & Combinations

    18/19

    Example:

  • 8/11/2019 Counting Principles, Permutations & Combinations

    19/19

    Example: