0% found this document useful (0 votes)
140 views

Week 10 - FACTORIAL, AND PERMUTATIONS AND COMBINATIONS

This document discusses factorial, permutations, and combinations. It defines factorial as the product of integers from 1 to n. Permutations refer to arrangements where order matters, while combinations refer to selections where order does not matter. Formulas are provided for calculating the number of permutations and combinations. Examples are given to demonstrate solving problems involving factorials, permutations, and combinations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views

Week 10 - FACTORIAL, AND PERMUTATIONS AND COMBINATIONS

This document discusses factorial, permutations, and combinations. It defines factorial as the product of integers from 1 to n. Permutations refer to arrangements where order matters, while combinations refer to selections where order does not matter. Formulas are provided for calculating the number of permutations and combinations. Examples are given to demonstrate solving problems involving factorials, permutations, and combinations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Factorial, and Permutations and Combinations

7 FACTORIAL, AND PERMUTATIONS AND COMBINATIONS


Factorial, and Permutations and Combinations are common problems given as programming activity for
the students. These counting techniques generate possible outcomes and determine the probability of a
specific event. This module will teach you the various ways in which objects from a set may be selected,
generally without replacement, to form subsets using either permutations or combinations. It will also
show you the similarities and differences of the two concepts. By using real-world problems as examples,
you will be taught how to formulate mathematical models to solve the problem.

Objectives:

After completing this module, you should be able to:

1. Compute for the factorial of a given value.


2. Identify the information required to solve the problem.
3. Formulate a mathematical model to solve the problem.
4. Compute the possibilities using permutations or combinations.

DISCRETE STRUCTURES 1 67
Factorial, and Permutations and Combinations

Factorial

 For each positive integer n, its factorial is defined to be the product of all the integers from 1 to
n and is denoted n!.
 Thus n! = n(n - 1) (n - 2) … 3  2  1.

In addition, we define 0! = 1

Example:

5! = 5  4  3  2  1 = 120

-2! = not defined

7!/4! = 7  6  5  4  3  2  1

4321

or or

7654! 7  6  5 = 210

4!

Example:

(n+1)! / n! = (n+1)n!

n!

= n+1

Permutations

 The number of ways in which a subset of objects can be selected from a given set of objects,
where order is important.

For example, the telephone number 123-456-7890 is not the same as the telephone number
789-012-3456.

Example:

Given the set of three letters, {A, B, C}, how many possibilities are there for selecting any two
letters where order is important?

{AB, AC, BC, BA, CA, CB}

For any integer n with n ≥ 1, the number of permutations of a set with n elements is n!.

DISCRETE STRUCTURES 1 68
Factorial, and Permutations and Combinations

Example:

How many ways can the letters in the word COMPUTER be arranged in a row?

Solution:

All the eight letters in the word COMPUTER are distinct, so the number of ways in which we can
arrange the letters equals the number of permutations of a set of eight elements. This equals 8!
= 40,320.

Example:

How many ways can the letters in the word COMPUTER be arranged if the letters CO must
remain next to each other (in order) as a unit?

Solution:

If the letter group CO is treated as a unit, then there are effectively only seven objects that are
to be arranged in a row.

CO M P U T E R

Hence there are as many ways to write the letters as there are permutations of a set of
seven elements, namely 7! = 5,040.

If n and r are integers and 1 ≤ r ≤ n, then the number of r-permutations of a set of n elements is
given by the formula

P(n, r) = n(n − 1)(n − 2) · · · (n − r + 1)

or, equivalently,

P(n, r) = n!

(n − r)!

An r-permutation of a set of n elements is an ordered selection of r elements taken from the set
of n elements.

The number of r-permutations of a set of n elements is denoted P(n, r).

Note that P(n, 0) = 1 whenever n is a nonnegative integer because there is exactly one way to
order zero elements. That is, there is exactly one list with no elements in it, namely the empty
list.

DISCRETE STRUCTURES 1 69
Factorial, and Permutations and Combinations

Example:

How many ways can we award a 1st, 2nd and 3rd place prize among eight contestants? (Gold /
Silver / Bronze)

A B C D E F G H 8 choices

B C D E F G H 7 Choices

C D E F G H 6 Choices

Solution:

Gold medal: 8 choices: A B C D E F G H

Silver medal: 7 choices: B C D E F G H

Bronze medal: 6 choices: C D E F G H

we had 8 choices at first, then 7, then 6.

The total number of options was 8 * 7 * 6 = 336.

P(8,3) 8 * 7 * 6 = 336

Example:

How many ways are there to select a first-prize winner, a second-prize winner, and a third-prize
winner from 25 different people who have entered a contest?

Solution:

Because it matters which person wins which prize, the number of ways to pick the three prize
winners is the number of ordered selections of three elements from a set of 50 elements, that is,
the number of 3-permutations of a set of 50 elements. Consequently, the answer is:

P(50,3) = 50  49  48 =117600

Exercise

1. How many 2-permutation are there of {W, X, Y, Z}? Write them all.
2. How many different ways can five of the letters of the word DISCMATH be chosen and written in
a row?
3. How many different ways can this be done if the first letter must be D?

DISCRETE STRUCTURES 1 70
Factorial, and Permutations and Combinations

Combinations

 The number of ways in which a subset of objects can be selected from a given set of objects,
where order is not important.
 Combination problems address the similar problem where r distinct elements are drawn
simultaneously from a set of n objects, implying that the order in which they are drawn is
irrelevant.

Example:

Given the set of three letters, {A, B, C}, how many possibilities are there for selecting any two
letters where order is not important?

{AB, AC, BC}

The number of r-combinations of a set with n elements, where n is a nonnegative integer and r
is an integer with 0 ≤ r ≤ n, equals

C(n, r) = n! /r! (n − r)!

Example:

How many poker hands of five cards can be dealt from a standard deck of 52 cards?

Solution:

Because the order in which the five cards are dealt from a deck of 52 cards does not matter,
there are:

C(52, 5) = 52! / 5! 47!

C(52, 5) = 52  51  50  49  48 / 5  4  3  2  1

2,598,960.

Example:

Let X = {a, b, c}. Then 2-combinations of the 3 elements of the set X are: {a, b}, {a, c}, and {b, c}.

Solution:

Hence C(3,2)= 3! / 2!1! = 3  2 / 2  1 = 3

Example:

How many ways are there to select five players from a 10-member tennis team to make a trip to
a match at another school?

Solution:

The answer is given by the number of 5-combinations of a set with 10 elements.

C(10, 5) = 10! / 5! 5! = 252.

DISCRETE STRUCTURES 1 71
Factorial, and Permutations and Combinations

Exercise

1. In how many ways can you choose 5 out of 10 friends to invite to a dinner party?

How many ways can a teacher choose 4 students out of the 20 in her class?

2. Find C(8,8)

DISCRETE STRUCTURES 1 72
Factorial, and Permutations and Combinations

References:

1. Kenneth H. Rosen. Discrete Mathematics and Its Applications, 7th Edition. McGrawHill, 2012
2. Gary Weiss Damian Lyons, et al., Fundamentals of Discrete Structures, 2nd edition, Pearson
Learning Solutions, 2012.
3. Susanna S. Epp, Discrete Mathematics with Applications, Brooks Cole; 4th edition, 2011.
4. James L. Hein, Discrete Structures, Logic, and Computability, 3rd edition, Jones & Bartlett
Publishers, 3rd edition, 2009.
5. Kolman, B., Busby, R. C., Ross, S. C. Discrete Mathematical Structures, 6th Edition. Prentice Hall,
2008.

DISCRETE STRUCTURES 1 73

You might also like