otherwise, when 0 < k < n,
by definition C(n,k) is |C| where C is
{ S : S ⊆ {a1,a2,...,an} and |S| = k }
well,
let C1 := { S : S ⊆ {a1,a2,...,an} and |S| = k and an ∈ S }
and C2 := { S : S ⊆ {a1,a2,...,an} and |S| = k and an ∉ S }
e.g. C(5,3) is |C|
where C := |{ S : S ⊆ {a1,a2,a3,a4,a5} and |S| = 3 }|
in which case
C1 := { {a1,a2,a5}, {a1,a3,a5}, {a3,a4,a5}, {a2,a4,a5},
{a1,a4,a5}, {a2,a3,a5} }
C2 := { {a1,a2,a3}, {a2,a3,a4}, {a1,a3,a4}, {a1,a2,a4} }
then clearly C == C1 ∪ C2 and C1 ∩ C2 == ∅
so |C| := |C1| + |C2| // by inclusion-exclusion or sum rule
further,
the specification for C1 (above) implies
C1 == { S : S = S' ∪ {an} where S' ⊆ {a1,a2,...an-1} and |S'| == k-1 }
e.g. C1 == { {a1,a2}∪{a5}, {a1,a3}∪{a5}, {a3,a4}∪{a5}, {a2,a4}∪{a5},
{a1,a4}∪{a5}, {a2,a3}∪{a5} }
which implies
|C1| := | { S' : S' ⊆ {a1,a2,...an-1} and |S'| == k-1 } |
e.g. |C1| := | { {a1,a2}, {a1,a3}, {a3,a4}, {a2,a4}, {a1,a4}, {a2,a3} } |
but is defined to be precisely that value on the right
e.g. C(4,2)
similarly,
the specification for C2 (above) implies
C2 := { S : S ⊆ {a1,a2,...,an-1} and |S| = k }
which implies
|C2| := |{ S such that S ⊆ {a1,a2,...,an-1} and |S| = k }|
and is defined to be precisely that size on the right
e.g. C(4,3)
summarizing, when 0 < k < n,
C(n,k) := |C| := |C1| + |C2| := C(n-1,k-1) + C(n-1,k)
Q.E.D.
(incidentally, an adjective used to describe explanations like this
is )
using Pascal's Identity,
can make chart of values of C(n,k) as follows:
C(0,0):=1
C(1,0):=1 C(1,1):=1
\ + /
C(2,0):=1 C(2,1) C(2,2):=1
\ + / \ + /
C(3,0):=1 C(3,1) C(3,2) C(3,3):=1
\ + / \ + / \ + /
C(4,0):=1 C(4,1) C(4,2) C(4,3) C(4,4):=1
\ + / \ + / \ + / \ + /
C(5,0):=1 C(5,1) C(5,2) C(5,3) C(5,4) C(5,5):=1
and so on
where each C(n,0):=1, each C(n,n):=1,
and every other C(n,k) is obtained by adding the two entries
to the left and right above C(n,k)
called Pascal's Triangle
incidentally,
people have connected number theory with mysticism for thousands of years
you may know name "Pythagorean" just re property of right-angle triangles
*
|\
b| \c
| \
+---*
a
a2 + b2 == c2
e.g. 52 + 122 == 132
but Pythagoreans were a
similarly intriguing properties of Pascal's triangle:
e.g. add a line of entries for a while
e.g. 1 + 3 + 6 + 10 :=
e.g. 1 + 5 + 15 :=
another e.g. intriguing property: consider any entries that form a hexagon
e.g. as follows:
6* 4
10 (10) 5*
20* 15
the hexagon's perimiter's numbers can be considered as
forming two triangles —
here one triangle comprising the numbers marked with "*",
the other triangle comprising the numbers not marked with "*"
then consider the products of the triangles' numbers:
called the "hexagon identity" in our textbook's Exercise 5.4.20
or called the "star" property by David Logotheti,
the mathematician who showed this property to me
another e.g. property of Pascal's Triangle:
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 :=
another e.g. property of Pascal's Triangle:
/
/
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
(will discuss later in this course)
anyway,
how might one calculate C(17,4)?
if use Pascal's identity straightforwardly:
C(17,4) := C(16,3) + C(16,4)
:= [C(15,2) + C(15,3)] + [C(15,3) + C(15,4)]
:= ([C(14,1) + C(14,2)] + [C(14,2) + C(14,3)]) + ([C(14,2) + C(14,3)] + [C(14,3) + C(14,4)])
/ \
C(13,0) + C(13,1)
1 / \
C(12,0) + C(12,1)
1 . .
. . .
. . .
yes:
n*(n-1)*(n-2)*...*(n-(k-1)) } #factors is k
C(n,k) := ---------------------------
k*(k-1)*(k-2)*...* 1
n!
which also happens to equal ---------
k!*(n-k)!
e.g. according to this formula,
9*8*7 504
C(9,3) := ----- := --- := 84
3*2*1 6
or more 'intelligently' a.k.a. lazily (;-) :
3 4
9*8*7
C(9,3) := ----- := 3*4*7 := 84
3*2*1
another e.g.
4 5 7
17*16*15*14
C(17,4) := ----------- := 17*4*5*7 := ...
4*3*2*1
justification of this formula for C(n,k):
again, what is C(n,k)? the number of ways of making sets of size k
from among n things
well, think about the process of making a set of size k
from among n things {a,b,c,d,e,...,n}:
{ _ , _ , _ , ..., _ }
1st 2nd 3rd k-th
from earlier discussion of permutations (above),
if choose the k things in order and maintain the order,
the number of choices is P(n,k) which is
n*(n-1)*(n-2)*...*(n-(k-3))*(n-(k-2))*(n-(k-1))
but here we'd be counting some sets more than once
e.g. {d,b,e,c,a} and {b,d,e,c,a} and {e,b,c,d,a} and {a,b,c,e,d}
getting same set but with elements in different orders
to handle this issue,
divide P(n,k) by the number of multiples of each k-combination set
which is the number of different orders of k things
which (from earlier earlier discussion above) is k!
// each k-combination set arises k! multiple times
which is k*(k-1)*(k-2)*...*1
thus result is
n*(n-1)*(n-2)*...*(n-(k-1))
---------------------------
k*(k-1)*(k-2)*...* 1
and (as mentioned earlier) that happens to equal n!/(k! * (n-k)!)
shown as follows:
n! n*(n-1)*(n-2)*...*(n-(k-1))*(n-k)*(n-(k+1))*(n-(k+2))*...*3*2*1
--------- := ---------------------------------------------------------------
k!*(n-k)! [k*(k-1)*(k-2)*...* 1] * [(n-k) * (n-k-1) * (n-k-2) *...*3*2*1
n! n*(n-1)*(n-2)*...*(n-(k-1))*(n-k)*(n-(k+1))*(n-(k+2))*...*3*2*1
--------- := ---------------------------------------------------------------
k!*(n-k)! [k*(k-1)*(k-2)*...* 1] * [(n-k) * (n-k-1) * (n-k-2) *...*3*2*1
n*(n-1)*(n-2)*...*(n-(k-1))
:= ---------------------------
k*(k-1)*(k-2)*...* 1
which formula best for calculating actual value e.g. C(17,4)?
e.g. done above
≈applications of the formula n!/(k! * (n-k)!) for C(n,k):
hexagon identity a.k.a. star-property
look again at the example above:
C(4,2):6* C(4,3):4
C(5,2):10 [C(5,3):10] C(5,4):5*
C(6,3):20* C(6,4):15
C(4,2):6 * C(5,4):5 * C(6,3):20 := 600
== C(4,3):4 * C(5,2):10 * C(6,4):15
as stated this should occur with any hexagon of entries
in general if the middle element is C(n,k), then the other relevant entries
are as follows:
C(n-1,k-1)* C(n-1,k)
C(n,k-1) [C(n,k)] C(n,k+1)*
C(n+1,k)* C(n+1,k+1)
so the question is whether the following is true in general?
C(n-1,k-1) * C(n,k+1) * C(n+1,k)
=?= C(n-1,k) * C(n,k-1) * C(n+1,k+1) ?
we can confirm that this is indeed true
by using the formula for C(x,y) that involves factorials:
x!
C(x,y) := -----------
y! * (x-y)!
using that formula for C(n-1,k-1) etc. yields the following:
(n-1)! n! (n+1)!
----------------------- * ------------------- * ---------------
(k-1)! * [(n-1)-(k-1)]! (k+1)! * [n-(k+1)]! k! * [(n+1)-k]!
(n-1)! n! (n+1)!
=?= --------------- * ------------------- * ----------------------- ?
k! * [(n-1)-k]! (k-1)! * [n-(k-1)]! (k+1)! * [(n+1)-(k+1)]!
this equation can be seen to hold because
each side's numerator comprises the same factors (n-1)!, n!, and (n+1)!
and each side's denominator comprise the following:
* clearly (k-1)!, k!, and (k+1)!
* [(n-1)-(k-1)]! which is (n-k)! which is [(n+1)-(k+1)]!
* [n-(k+1)]! which is (n-k-1)! which is [(n-1)-k]!
* [(n+1)-k]! which is (n-k+1)! which is [n-(k-1)]!
another confirmation of Pascal's Identity:
⌈ 1 if k == 0 or k == n
C(n,k) := | or
⌊ C(n-1, k-1) + C(n-1, k) otherwise
well, first consider the value of n!/(k! * (n-k)!) when k = 0 or k = n:
n! n!
----------- := ------- :=
0! * (n-0)! * n!
n! n! n!
----------- := ------- := ------ :=
n! * (n-n)! n! * 0! n! * 1
and otherwise, when 0 < k < n,
want C(n,k) = C(n-1,k-1) + C(n-1,k)
well:
as desired
the binomial theorem
a further important property of values of C(n,k):
(x + y)n := C(n,0)*xn-0y0 + C(n,1)*xn-1y1 + C(n,2)*xn-2y2 + ... + C(n,n)*xn-nyn
e.g. (x+y)² :=
e.g. (x+y)³ :=
e.g. (x+y)4 :=
applications of binomial theorem: