Selasa, 12 Julai 2016

COMBINATION & PERMUTATION : PART 1

Introduction of Combinations 

is to count all of the possible ways that a single set of objects can be selected without regard to the order in which they are selected.

·         n objects can be arranged in n(n – 1)(n – 2) … (3)(2)(1) ways. This represented by the symbol n!, which is called n factorial. (By convention, 0! = 1.)
·         A combination is a selection of all or part of a set of objects, without regard to the order in which they were selected. This means that XYZ is considered the same combination as ZYX.

·         The number of combinations of n objects taken r at a time is denoted by nCr.



Example 1:

How many different ways can you select 2 letters from the set of letters: X, Y, and Z?
 (Hint: In this problem, order is NOT important; i.e., XY is considered the same selection as YX.)

Solution: One way to solve this problem is to list all of the possible selections of 2 letters from the set of X, Y, and Z. They are: XY, XZ, and YZ. Thus, there are 3 possible combinations.
Another approach is to use Rule 1. Rule 1 tells us that the number of combinations is n! / r!(n - r)!. We have 3 distinct objects so n = 3. And we want to arrange them in groups of 2, so r = 2. Thus, the number of combinations is 3! / 2!(3 - 2)! or 3! /2!1!. This is equal to (3)(2)(1)/(2)(1)(1) = 3.

Example 2:

Five-card stud is a poker game, in which a player is dealt 5 cards from an ordinary deck of 52 playing cards. How many distinct poker hands could be dealt? 
(Hint: In this problem, the order in which cards are dealt is NOT important; For example, if you are dealt the ace, king, queen, jack, ten of spades, that is the same as being dealt the ten, jack, queen, king, ace of spades.)

Solution: For this problem, it would be impractical to list all of the possible poker hands. However, the number of possible poker hands can be easily calculated using Rule 1.
Rule 1 tells us that the number of combinations is n! / r!(n - r)!. We have 52 cards in the deck so n = 52. And we want to arrange them in groups of 5, so r = 5. Thus, the number of combinations is 52! / 5!(52 - 5)! or 52! / 5!47!. This is equal to 2,598,960 distinct poker hands.


Tiada ulasan:

Catat Ulasan