 Fundamentals of Electrical Engineering I
 Ch 7: Appendix
 Loc 7.2
 Fundamentals of Electrical Engineering I
 Ch 7
 Loc 7.2
Permutations and Combinations
The lottery "game" consists of picking
numbers from a pool of
. For example, you select
numbers out of
. To win, the order in which you pick the numbers doesn't matter; you only have to choose the right set of
numbers. The chances of winning equal the number of different length
sequences that can be chosen. A related, but different, problem is selecting the batting lineup for a baseball team. Now the order matters, and many more choices are possible than when order does not matter.
Answering such questions occurs in many applications beyond games. In digital communications, for example, you might ask how many possible doublebit errors can occur in a codeword. Numbering the bit positions from
to
, the answer is the same as the lottery problem with
. Solving these kind of problems amounts to understanding permutations  the number of ways of choosing things when order matters as in baseball lineups  and combinations  the number of ways of choosing things when order does not matter as in lotteries and bit errors.
Calculating permutations is the easiest. If we are to pick
numbers from a pool of
, we have
choices for the first one. For the second choice, we have
. The number of lengthtwo ordered sequences is therefore be
. Continuing to choose until we make
choices means the number of permutations is
. This result can be written in terms of factorials as
, with
. For mathematical convenience, we define
.
When order does not matter, the number of combinations equals the number of permutations divided by the number of orderings. The number of ways a pool of
things can be ordered equals
. Thus, once we choose the nine starters for our baseball game, we have
different lineups! The symbol for the combination of
things drawn from a pool of
is
and equals
.
Exercise
What are the chances of winning the lottery? Assume you pick
numbers from the numbers

.
Combinatorials occur in interesting places. For example, Newton derived that the
th power of a sum obeyed the formula
.
Exercise
What does the sum of binomial coefficients equal? In other words, what is
Because of Newton's binomial theorem, the sum equals
.
A related problem is calculating the probability that any two bits are in error in a length
codeword when
is the probability of any bit being in error. The probability of any particular twobit error sequence is
. The probability of a twobit error occurring anywhere equals this probability times the number of combinations:
. Note that the probability that zero or one or two, etc. errors occurring must be one; in other words, something must happen to the codeword! That means that we must have
. Can you prove this?
This textbook is open source. Download for free at http://cnx.org/contents/778e36af4c214ef79c02dae860eb7d14@9.72.
Get the latest tools and tutorials, fresh from the toaster.