Professional Documents
Culture Documents
Counting Without Repetition
Counting Without Repetition
Example:
D = the set of the diagonals of a regular pentagon. #D = 5.
Variations
Example : From a class of 20 students you choose 5 students in a particular order. Such a choice
is a variation of 20 elements choose 5.
There are 20 possibilities to choose the first student. For the choice of the second student there
are only 19 possibilities. And so on.
In general:
Example 2
From a box with 7 different cakes you have to choose three cakes.
The first choice is a cake for your brother. The second is for your sister; the third is for yourself.
Mind that you have to choose the cakes in a specific order. You have to make one variation of 7
elements choose 3. There are V(7,3)=7.6.5=210 possibilities to make that choice.
Permutations
Example: Take a class of 20 students. Put the 20 students in a row. This can be done in many
different ways. Each choice is a permutation of the 20 elements. Forming such a row is actually a
special variation. It's the variation of 20 elements choose 20.
In general:
Example:
Arrange 5 different marbles in one row. There are P(5) = 5! = 120 different possibilities.
Combinations
Example
From a team of 5 racers, A,B,C,D,E, we choose 3 racers. The order of the selected racers has no
importance. Such a choice is a combination of 5 elements choose 3. The number of such choices
is C(5,3).
To construct a formula for C(5,3), we shall compare variations with combinations. We make two
columns. In the first column we write all the variations of the 5 racers choose 3. In the second
column we write the corresponding combinations.
variations combinations
ABC ABC
ACB
BAC
BCA
CAB
CBA
ABD ABD
ADB
BDA
BAD
DAB
DBA
... ...
etc etc
From this table it is obvious that each combination corresponds with 6 variations. So, there are
six times more variations than combinations.
We have V(5,3) = C(5,3). 3!
In general:
n!
<=> C(n,p) = ------------
p!.(n-p)!
Example 2:
Out of a collection of twenty books, you take four books to read them at home.
We'll calculate the number of choices.
n = 20 ; p = 4
The order of the selected books has no importance.
The number of such choices is C(20,4) = 4845
Properties of combinations
Binomial coefficient
The number C(n,p) is also called a binomial coefficient and this also is written as
n
( )
p
Binomial theorem
+ C(n,n) bn
To prove this theorem we use mathematical induction.
It is easy to verify that the theorem holds for n = 2 .
Now, assume it holds for n = k. We'll show it holds for n= k+1.
(a + b)k+1 = (a + b).(a + b)k
+ C(k+1,k+1) bk+1
This proves the theorem.
(x3 - 1/(2x))5
The third term contains x2.( 1/x)2 = x0. We calculate the third term.
C(4,2) x2 (-2/x)2 = 24
Find the term in x4 in the expansion of (x2 + 1/(3x)5
The first term contains (x2)5 = x10
The third term contains (x2)3.(1/x)2 = x4. We calculate the third term.
Example
S = { a,b,c }
p = 4
V'(n,p) = np
Example 2
448
174
117
711
888
...
etc
Example :
Take 3 red marbles, 2 blue marbles, and 5 yellow ones. Place this marbles in a specific order.
We call this a permutations with repetition of the 10 marbles.
C(10,3).C(10-3,2)
10! 7!
= -------.-------
3!.7! 2!.5!
10!
= --------------
3! . 2! . 5!
This method can easily be generalized. Take 'a' equal elements of a first type, 'b' equal elements
of the second type and 'c' equal elements of the third type. The number of different ways to put
all these elements in a row, is:
(a+b+c)!
= --------------
a! . b! . c!
Work in the same way for any other number of types.
Example 2:
4!
-------- = 12
1!.2!.1!
Example:
A = (a,b,c,d,e) and p = 6
Then (a, a, b, d, d, d) ; (b, b, b, c, d, e) ; (c, c, c, c, c, c)
are combinations with repetition of 5 elements choose 6.
We can represent unambiguously such combination by means of a symbol with points and
slashes. A slash means 'go to next element'.
Example :
You have a box with red sweets, a box with yellow sweets and a box with black sweets. In how
many ways can you choose 5 sweets?
The possible choices are combinations with repetition of three elements choose 5. The number of
different choices is C'(3,5) = C(7,5) = 21.
Example 2:
Find the number of non negative integer solutions to the equation p+q+r < 11.
Take the characters a,b,c and d. Point 10 times to one of these characters. Sort the result
alphabetically. Now you have string of 10 characters. For example aabbbcdddd
With this string corresponds exactly one solution of p + q + r < 11.
Let p = the frequency of a, q = the frequency of b, r = the frequency of c in the string. In the
string aabbbcdddd is p=2, q=3, r=1 and p + q + r <11.
Conversely, with each solution of p + q + r <11 corresponds exactly one string. For example with
p=3, q=3 ,c=2 corresponds aaabbbccdd.
Examples: