Graph Theory
Graph Theory
If I teach two classes and one class has 30 students and the other
has 12 students, how many students do I teach?
Think of the toss as a process with two stages, the first stage is the
toss of one die and the second is the toss of the other.
1st method: There are 6 outcomes for the first stage, and to not get
doubles, there are 5 outcomes for the second stage. By the product
rule there are 30 possibilities. [Note that the number of outcomes
for the second stage does not depend on which outcome occurred in
the first stage.]
There are two natural stages, Jack's pick followed by Jill's pick.
Jack chooses one out of 25 fruit, so there are 25 outcomes in this
stage. To calculate the number of outcomes for Jill's pick we must
know what Jack picked:
If Jack picked an apple, then Jill has 14(10) = 140 choices.
If Jack picked a pear, then Jill has 15(9) = 135 choices.
The product rule does not apply directly, but we can use the addition
rule to break up the problem into subproblems in which it does apply.
Jack picks an apple + Jack picks a pear
15(140) + 10(135) = 2100 + 1350 = 3450
Lists (ordered arrangements)
In general when creating lists, if there are n1 selections for first
place, n2 for second, ... nr for the r-th place (each selection
independent of the preceding) then the number of lists that can be
created equals n1 n2 ...nr (product rule).
a) We are creating a list of two things. There are 4 choices for the
first item and (51 – 4) = 47 choices for the second, so there are
4(47) = 188 ways to do this.
b) This time there are 13 choices for the first item, but the number
of choices for the second depends on what was chosen first. If the
Queen of Spades was picked first, there are (51 – 3) = 48 choices
for the second card. If a different spade had been selected then
there are 51-4 = 47 choices for the second card. So, we get
1(48) + 12(47) ways to do this.
Permutation Problems
There are 50 cards numbered 1 to 50. Two different cards are
chosen at random. How many ways can this be done? In how
many of these picks will one card be twice the other?
In this case we are not forming a list (there is no first card of the
two selected), but we can still use the list idea to solve the
problem. If we were forming a list, the number of possible lists
would be 50(49) since the cards are different. But, two cards A and
B would appear twice in these lists, once as A,B and again as B,A.
So, to answer the question we should divide by 2 to get
½(50)(49) = 25(49).
To answer the second question, we note that the two cards are now
distinguished, there is a larger one and a smaller one. If we select
the larger one first there are 25 choices (it must be even), and then
the smaller card is determined, so there are no additional choices.
Permutation Problems
How many integers greater than 6600 have distinct digits, not
including the digits 7,8,or 9?
Since only 7 digits are allowed, we can not have any integers with
more than 7 decimal places. We also can not have any with less
than 5 decimal places and still be greater than 6600.
We look at the cases of 5, 6 and 7 decimal places separately.
For a 5 place integer, there are only 6 choices for the first digit
since we can't use 0 there. There are also 6 choices for the second
digit since we can't use the digit used in the first place, but we are
now allowed to use 0. The total number is thus 6(6)(5)(4)(3).
Similarly, for a 6 place number we get 6(6)(5)(4)(3)(2) and a 7
place number give 6(6)(5)(4)(3)(2)(1). So, our answer is:
6(6)(5)(4)(3) + 6(6)(5)(4)(3)(2) + 6(6)(5)(4)(3)(2)(1) = 10,800
Permutation problems
Use the prime decomposition to show that every square
integer has an odd number of divisors (including 1 and itself),
and every non-square integer has an even number of divisors.
Duh!!
Combinations
Example: We have already counted the number of lists of r
elements taken from a set of n elements, P(n,r). Now we count
these in a different way. First select the r elements (this can be
done in C(n,r) ways) then arrange the r elements in lists in all
possible ways (P(r,r) ways to do this). So, ...
C n , r = n
r
=
P n , r nn−1n−2⋯n−r1
P r , r
=
r!
Our formula for computing C(n,r) would, in these two cases, give:
n = n!
0 0! n! n
n = n!
n!0!
In order to have these formulas make sense, we must define 0! = 1.
1
There are 13 48 =1348=624 four of a kind hands.
1
A full house consists of 3 cards of one denomination and 2
cards of another denomination.
There are 13
1
4
3
12
1
4 = 134126=3,744 full house hands.
2
[ ]
There are 4
1
13 −10 =5,108 flush hands.
5
Committee Selections
Suppose that there are 10 Republicans, 8 Democrats and 2
Independent legislators who are eligible for committee membership.
n =
n−r
n!
=
n!
n−r ! n−n−r ! n−r ! r !
= n .
r
However, it is also possible to see this relationship without resorting
to the formulas. To every subset of size r in an n set, there
corresponds a unique subset of size n-r, namely, the complement of
the r set. Thus, the total number of size r subsets must equal the total
number of size n-r subsets.
n
n n ⋯ n = n .
0 1 n
∑
i=0 i
n
x y = ∑
n n x i y n−i
i=0 i
i
n n
2 = 11 = ∑ n 1 1 =∑ n .
n n i n−i
i=0 i=0 i
Combinatorial Proofs
C(n,r) = C(n-1,r-1) + C(n-1,r).
Triangular Numbers:
1 3 6 10 15
Pascal's Triangle
Pascal's Triangle has many properties:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
Tetrahedral Numbers:
1 4 10
Pascal's Triangle
1
1 1
2
1 1 3
5
1 2 1 8
1 3 3 1 1321
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
HOWEVER, ...
Pascal's (?) Triangle
Pascal's (?) Triangle
~1100 Omar Khayyam mentions the triangle and does not claim
credit for it. So he probably obtained it from earlier Chinese or
Indian sources.
One More Counting Proof
2 2 2
2 n = n n ⋯ n
n 0 1 n
Let a set S consist of n red balls and n blue balls. We want to
count how many ways there are to select n balls (regardless of
color) from S. The answer to this problem is clearly C(2n, n). We
now count in a different way.
Each selection of n balls contains a certain number, say x, of red
balls and also n-x blue balls. Clearly, x ranges from 0 to n. For
any particular value of x, we can choose the red balls in C(n,x)
ways and the blue balls in C(n, n-x) ways. So the number of ways
2
to get an n set with x red balls is C(n,x) C(n, n-x) = C(n,x) since
we know that C(n,x) = C(n, n-x). So, counting the n-sets by how
many red balls they contain, gives:
2 2 2
C(2n,n) = C(n,0) + C(n,1) + ... + C(n,n)