HSE Basic counting

From testwiki
Revision as of 20:25, 4 March 2007 by imported>Ellis (Binomial expansion)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:High School Mathematics Extensions TOC

Counting

Template:High School Mathematics Extensions/Supplementary/TOC

Ordered Selection

Suppose there are 20 songs in your mp3 collection. The computer is asked to randomly selected 10 songs and play them in the order they are selected, how many ways are there to select the 10 songs? This type of problems is called ordered selection counting, as the order in which the things are selected is important. E.g. if one selection is

1, 2, 3, 4, 5, 6, 7, 8, 9 and 10

then

2, 1, 3, 4, 5, 6, 7, 8, 9 and 10

is considered a different selection.

There are 20 ways to choose the first song since there are 20 songs, then there are 19 ways to choose the second song and 18 ways to choose the third song ... and so on. Therefore the total number of ways can be calculated by considering the following product:

20 × 19 × 18 × 17 × 16 × 15 × 14 × 13 × 12 × 11

or denoted more compactly:

20!10!

Here we use the factorial function, defined by 0!=1 and n!=(n1)!×n. (In other words, n!=1×2×3×...×n)

In general, the number of ordered selections of m items out of n items is:

n!(nm)!

The idea is that we cancel off all but the first m factors of the n! product.

Unordered Selection

Out of the 15 people in your mathematics class, five will be chosen to represent the class in a school wide mathematics competition. How many ways are there to choose the five students? This problem is called an unordered selection problem, i.e. the order in which you select the students is not important. E.g. if one selection is

Joe, Lee, Sue, Britney, Justin

another selection is

Lee, Joe, Sue, Justin, Britney

the two selections are considered equivalent.

There are

15!10!

ways to choose the 5 candidates in ordered selection, but there are 5! permutations of the same five candidates. (That is, 5! different permutations are actually the same combination). Therefore there are

15!10!5!

ways of choosing 5 students to represent your class.

In general, to choose (unordered selection) m candidates from n, there are

n!m!(nm)!=(nm)

ways. We took the formula for ordered selections of m candidates from n, and then divided by m! because each unordered selection was counted as m! ordered selections.

Note: (nm) is read "n choose m".

Examples

Example 1 How many different ways can the letters of the word BOOK be arranged?

Solution 1 4! ways if the letters are all distinct. Since O is repeated twice, there are 2! permutations. Therefore there are 4!/2! = 12 ways.

Example 2 How many ways are there to choose 5 diamonds from a deck of cards?

Solution 2 There are 13 diamonds in the deck. So there are (135) ways.

(135)=13!8!5!=13×12×11×10×9120=1287

Binomial expansion

The binomial expansion deals with the expansion of following expression

(a+b)n

Take n = 3 for example, we shall try to expand the expression manually we get

(a+b)3 =(aa+ab+ba+bb)(a+b)
=aaa+aab+aba+abb+baa+bab+bba+bbb

We deliberately did not simplify the expression at any point during the expansion, we didn't even use the well known (a + b)2 = a2 + 2ab + b2. As you can see, the final expanded form has 8 terms. They are all the possible terms of powers of a and b with three factors!

Since there are 3 factors in each term and all the possibles terms are in the expanded expression. How many terms are there with only one b? The answer should be (31), i.e. from 3 possible positions, choose 1 for b. Similarly we can work out all the coefficient of like-terms. So

(a+b)3 =(30)a3+(31)a2b+(32)ab2+(33)b3

And more generally

(a+b)n =(n0)an+(n1)an1b+(n2)an2b2+...(nn1)abn1+(nn)bn

or more compactly using the summation sign (otherwise known as sigma notation)

(a+b)n =i=0n(ni)anibi

Template:High School Mathematics Extensions TOC