Arrangements, Combinations and Permutations

Một phần của tài liệu An excursion through elementary mathematics, volume III discrete mathematics and polynomial algebra (Trang 34 - 44)

1.4 Arrangements, Combinations and Permutations

As an application of the ideas of the previous section, we use recursive arguments to solve three specific, though very important, counting problems, namely, those of counting the number ofarrangements without repetitions, ofpermutationsand of combinations. For what follows, we recall thatIn= {1,2, . . . , n}for everyn∈N.

We start by counting, in the coming result, the number of injective functions between two nonempty finite sets.

Proposition 1.21 Letn, k ∈N. IfAis a set withnelements, then there are exactly n(n−1) . . . (nk+1)injective functionsf :IkA.

Proof LetB be a set withmelements and letakmdenote the number of injective functionsf :IkB.

Evidently,a1n=n(since there are exactlynpossible choices forf (1)A) and, in this case, the formula in the statement of the proposition is true.

From now on, assume thatk >1. For a fixedxA, iff :IkAis an injective function such thatf (k)=x, then the restriction offtoIk−1is an injective function f˜: Ik−1 →A\ {x}. Conversely, given an injective functionf˜:Ik−1→ A\ {x}, we extendf˜to an injective functionf :IkAby lettingf (k)=x.

Since such operations of restriction and extension of injective functions are clearly inverses of each other, we conclude that there are as many injective functions f : IkAwithf (k)= x as there are injective functionsf˜ :Ik−1 → A\ {x}.

Thus, the number of such functions is exactlyak−1,n−1. However, since there aren possible choices forxA(for,|A| =n), we get the recurrence relation

akn=nak−1,n−1, (1.9)

which is valid for every naturaln >1.

Now, observe thatak1 =0 for everyk >1 (for, if|A| = 1, there is no way of choosing distinctf (1)andf (2)inA). By induction, assume thatakn=0 whenever k > nand 1≤n < m, wherem >1 is a natural number. Givenk, m∈Nsuch that k > m, we havek−1 > m−1, so that, by induction hypothesis,ak−1,m−1 =0.

But then, (1.9) givesakm=mak−1,m−1=0. Therefore, it follows by induction that akn=0 for everyk, n∈Nsuch thatk > n. Yet in this case we havenk+1≤0, so thatn(n−1) . . . (nk+1)=0 and the formula of the statement of the proposition is valid.

Suppose, from now on, thatkn. Then, again from (1.9), we have akn =nak−1,n−1=n(n−1)ak−2,n−2

= ã ã ã

=n(n−1) . . . (nk+2)a1,nk+1

=n(n−1) . . . (nk+2)(nk+1).

Since an injective function f : IkAis simply a sequence of k pairwise distinct terms, all chosen from the elements of A, we can rephrase the above proposition according to the following

Corollary 1.22 If|A| =n, then there are exactlyn(n−1) . . . (nk+1)sequences formed bykpairwise distinct elements ofA.

We can apply this corollary to a given combinatorial situation whenever it asks us to count how many are the ordered choices ofkpairwise distinct elementsof a given setA. For this reason, from now on we shall say that the previous corollary counts the number of arrangements without repetitionofkpairwise distinct elements, chosen from a given set ofnelements.

Example 1.23 How many are the natural numbers of three pairwise distinct algarisms?

Solution To choose a natural number with three pairwise distinct algarisms is the same as to choose a sequence (a, b, c) such that a, b, c ∈ {0,1,2, . . . ,9} are pairwise distinct anda =0. Corollary1.4assures that, in order to count the number of possible such sequences, it suffices to count the number of sequences(a, b, c), with pairwise distincta, b, c∈ {0,1,2, . . . ,9}, and then todiscountthe number of such sequences of the form(0, b, c).

By the previous corollary, the number of sequences (a, b, c) with a, b, c ∈ {0,1,2, . . . ,9}pairwise distinct but without the restrictiona =0 is 10×9×8 = 720. On the other hand, the number of such sequences of the form (0, b, c) is 9×8=72. Hence, the desired result is 720−72=648.

The counting of arrangements without repetition has a very important conse- quence, based on the following

Definition 1.24 Apermutationof the elements of a nonempty setAis a bijection f :AA.

IfAis finite and nonempty, it is not difficult to prove (see Problem4, page7) that a functionf : AAis bijective if and only if it is injective. Hence, letting k=nin the formula of Proposition1.21, we immediately get our next result.

Corollary 1.25 If|A| = n, then there are exactlyn!permutations of the elements ofA.

Given a finite setAwithnelements and a natural numberksuch that 0≤kn, the coming result uses a recursive argument to compute the number of subsets ofA withkelements each. In order to properly state it, recall (cf. Section 4.2 of [8]) that, for nonnegative integersnandkwith 0≤kn, one defines the binomial number n

k

by letting

n k

= n! k!(nk)!.

1.4 Arrangements, Combinations and Permutations 25 Moreover, for 1≤knsuch numbers satisfy the recurrence relation

n k

= n−1

k

+ n−1

k−1

,

which is known asStifel’s relationand allows us to prove thatn

k

∈ Nfor everyn andkas above.

Proposition 1.26 If A is a finite set with n elements and0 ≤ kn, thenA possesses exactlyn

k

subsets ofkelements.

Proof Ifk=0 there is nothing to do, for∅is the only subset ofAhaving 0 elements andn

0

= 1. Thus, let 1≤ knandCknbe the number of subsets of Awithk elements.

For a fixedxA, there are two kinds of subsets ofAwithk elements: those which do not containxand those which do containx. The former ones are precisely thek-element subsets ofA\ {x}; since|A\ {x}| =n−1, there are exactlyCkn−1of these subsets ofkelements ofA.

On the other hand, ifBAhaskelements andxB, thenB\ {x} ⊂A\ {x} hask−1 elements; conversely, ifBA\{x}hask−1 elements, thenB∪{x} ⊂A haskelements, one of which isx. Since such correspondences are clearly inverses of each other, we conclude that there are as manyk-element subsets ofAcontaining x, as there arek−1 element subsets ofA\ {x}; thus, there are exactlyCkn−−11such k-element subsets ofA.

Taking these two contributions into account, we obtain for 1 ≤ kn the recurrence relation

Cnk =Ckn−1+Cnk−−11,

which is identical to Stifel’s relation for the binomial numbersn

k

. Finally, since C0n =1=n

0

andC1n=n=n

1

(forAhas exactlynsubsets of 1 element each—

the sets{x}, withxA), an easy induction givesCkn=n

k

for 0≤kn.

In words, the previous proposition computes how many are theunordered choices ofkdistinct elements of a set havingnelements; one uses to say that such choices are thecombinations ofnobjects, takingkat a time. Also thanks to the former proposition, one uses to refer to the binomial numbern

k

as“nchoosesk”.

Example 1.27 When all diagonals of a certain convex octagon have been drawn, one noticed that there were no three of them passing through a single interior point of the octagon. How many points in the interior of the octagon are intersection points of two of its diagonals?

Solution Firstly, note that the condition on the diagonals of the octagon guarantees that each one of the points of intersection we wish to count is determined by a single pair of diagonals. Hence, it suffices to count how many pairs of diagonals of the octagon intersect in its interior. To this end, note that each 4-element subset of

the set of vertices of the octagon determines exactly two diagonals which intersect in the interior of it; conversely, if two diagonals of the octagon do intersect in its interior, then the set of their endpoints is a 4-element subset of the set of vertices of the octagon. Therefore, the bijective principle assures that there are as many pairs of diagonals intersecting in the interior of the octagon as there are 4-element subsets of its set of vertices. By Proposition1.26, then, the number of points of intersection we wish to count equals8

4

=70.

Our next example brings a beautiful application of combinations, due to the American mathematician of the twentieth century Irving Kaplansky and known as Kaplansky’s first lemma.6

Example 1.28 (Kaplansky) Givenn, k∈N, withn≥2k−1, show that the number k-element subsets ofInwithout consecutive elements equalsnk+1

k

.

Proof We first note that if AIn has k elements, no two of which being consecutive, thenn ≥2k−1, for between any two elements ofAthere is at least one element ofIn not belonging toA. Hence, the assumptionn ≥ 2k−1 made in the statement is natural and givesnk+1 ≥ k, so that the binomial number nk+1

k

is well defined.

Now, recall that the characteristic function ofAinIn is a sequence ofnterms, with exactlyk of them being equal to 1 and the other nk being equal to 0;

moreover, our assumption onA assures that any two 1’s in such a sequence are nonconsecutive. Since the characteristic function determinesA, it suffices to count the number of such sequences.

To what is left to do, let’s first consider a sequence of 2(nk)+1 terms, in which thenkterms with even indices are equal to 0:

( ,0, ,0, , . . . , ,0,

2(nk)+1

).

If we are to have exactlykterms equal to 1, no two of which being consecutive, it is necessary and sufficient to choose, from the set ofnk+1 positions corresponding to odd indices, thekpositions in which we want to put the 1’s (as we previously pointed out, this is possible becausenk+1≥k). According to Proposition1.26, there are precisely nk+1

k

possible choices for such positions. Finally, once we erase the not chosen positions, we are left with the characteristic sequence of a set satisfying the conditions of the problem. Conversely, it is immediate that every such characteristic sequence can be obtained as above, so that the answer to our problem isnk+1

k

.

Now, we are given natural numberskandnand nonnegative integersn1, . . . ,nk satisfyingn=n1+ã ã ã+nk. We also havekdistinct types of objects, saya1, . . . ,ak,

6There is also aKaplansky’s second lemma, which will be the object of Problem12. Kaplansky devised these two results in order to solve Lucas’ problem—cf. Problem10, page41.

1.4 Arrangements, Combinations and Permutations 27 and would like to count how many sequences ofnterms have exactlyn1terms equal toa1, . . . ,nk terms equal toak. Yet in another way, we say that such a sequence is apermutation with repeated elementsofnobjects, each of which being of one of the typesa1, . . . ,akand withn1objects of typea1, . . . ,nkobjects of typeak. Let’s now look at an equivalent problem.

Iff :In → {a1, . . . , ak}is a sequence satisfying the conditions of the previous paragraph (i.e., withn1terms equal toa1, . . . ,nk terms equal toak), then, taking inverse images, we obtain

In=f−1(a1). . .f−1(ak).

At the right hand side above, the setsf−1(aj), 1≤jk, are pairwise disjoint and such that|f−1(aj)| =njfor 1≤jk; we say that the union at the right hand side is thepartitionofIninducedbyf. Conversely, associated to a partition ofIn of the formIn=A1∪. . .Ak, with|Aj| =nj for 1≤jk, we have the sequence f : In → {a1, . . . , ak}such that f (Aj) = {aj}for 1 ≤ jk. Therefore, the bijective principle guarantees that a problem equivalent to the one of the previous paragraph is that of counting the number of distinct partitions of a set ofnelements intokpairwise disjoint subsetsA1, . . . ,Ak, under the restriction that|A1| =n1, . . . ,

|Ak| =nk.

This being said, the coming result solves both counting problems described above.

Proposition 1.29 Letn, k∈Nandn=n1+ ã ã ã +nkbe a partition ofnin positive integers. IfAis a set withnelements and n

n1,...,nk

denotes the number of partitions ofAinto setsA1, . . . ,Ak, with|Aj| =nj for1≤jk, then

n n1, . . . , nk

= n!

n1!. . . nk!. (1.10) Proof We shall make induction onk ∈ N. Firstly, the casek =1 is trivial, for in this casen1=nand the only subset ofAwithnelements isAitself. As induction hypothesis, letl≥2 be a natural number and assume that (1.10) is true for 1≤k < l and every partition ofninto k positive integers n1, . . . , nk. Then, fix a partition n=n1+ ã ã ã +nlofnin positive integers.

The bijective principle assures that, for each subsetAl of A, with|Al| = nl, there are as many partitions ofAas in the statement of the proposition as there are partitions

A\Al=A1∪. . .Al−1,

ofA\Alintol−1 subsetsA1, . . . , Al−1, with|Aj| =nj for 1≤jl−1.

Since |A\ Al| = nnl, the total number of such partitions of A\Al is, by definition, equal to nnl

n1,...,nl−1

; however, since there are exactly n

nl

ways of

choosing the subset Al of A, the fundamental principle of counting gives the recurrence relation

n n1, . . . , nl

=

nnl n1, . . . , nl−1

n nl

.

Finally, by applying the induction hypothesis to nnl

n1,...,nl−1

, we conclude that n

n1, . . . , nl

= (nnl)! n1!. . . nl−1! ã

n nl

= n! n1!. . . nl−1!nl!.

Remark 1.30 In the notations of the proposition above, it is worth noting that n

k, nk

= n

k

,

where the right hand side denotes the usual binomial number. Such and equality reflects the fact that choosing ak-element subset out of a set withnelements is the same as partitioning such a set into two subsets, one withkelements and the other withnkelements.

Problems: Sect. 1.4

1. Ifn∈NandAis a set withnelements, prove that there are exactlynkn(n− 1) . . . (nk+1)sequences of k terms, all taken out ofAbut not pairwise distinct.

2. * Do the following items:

(a) Use a combinatorial argument to prove the formula for binomial expansion:

(x+y)n= n k=0

n k

xnkyk. (1.11) (b) Generalize item (a), proving combinatorially themultinomial expansion

formula:

(x1+ ã ã ã +xk)n=

n1,...,nk∈Z+ n1+ããã+nk=n

n n1, . . . , nk

x1n1. . . xknk, (1.12)

where, forn1, . . . , nk ∈ Z+ such that n = n1+ ã ã ã +nk, the number n

n1,...,nk

is defined as in (1.10).

1.4 Arrangements, Combinations and Permutations 29 3. Givenn, k∈N, use the result of Proposition1.29, together with item (b) of the previous problem, to compute the number of ordered partitions of a setA, with

|A| =n, intoksubsetsA1, . . . ,Ak(cf. Problem8, page7).

4. Prove that the Stirling number of second kindS(n, k)(cf. Problem8, page20) can be computed with the aid of the following formula:

S(n, k)= 1 k!

n1,...,nk∈N n1+ããã+nk=n

n n1, . . . , nk

.

5. (IMO—shortlist) Given a permutation(a1, a2, . . . , an)ofIn, we say thataj is a local maximumifaj is greater than its neighbors (forj =1, this means that a1> a2; forj =n, thatan > an−1). Compute the number of permutations of Inhaving exactly one local maximum.

6. (OCM) We are givenn≥6 points on a circle, and draw alln

2

chords joining two of them. We further assume that no three of such chords pass through a single point of the corresponding open diskD bounded by . Compute the number of distinct triangles satisfying the two following properties:

i. their vertices belong toD.

ii. their sides lie on three of then

2

drawn chords.

7. * Use combinations to show that a set withnelements has exactly 2n−1subsets with an even number of elements and 2n−1 subsets with an odd number of elements.

8. Compute, in terms ofn∈N, the number of sequences ofnterms, all of which equal to 0, 1, 2 or 3 and having an even number of 0’s.

9. * Givenn, k∈N, show that the equationx1+ ã ã ã +xk =nhas exactlyn+k−1

k−1

nonnegative integer solutions.

10. * Givenn, k ∈N, show that the equationx1+ ã ã ã +xk =nhas exactlyn−1

k−1

positive integer solutions.

11. The purpose of this problem is to give another proof of Kaplansky’s first lemma (cf. Example1.28). To this end, do the following items:

(a) IfA = {a1, . . . , ak} ⊂In is a set without consecutive elements, letx1 = a1−1,xk+1=nak andxj =ajaj−1−2 for 2≤jk. Show that x1, . . . , xk+1solves, in nonnegative integers, equationx1+ ã ã ã +xk+1 = n−2k+1.

(b) Ifx1, . . . , xk+1is a solution of equationx1+ ã ã ã +xk+1=n−2k+1 in nonnegative integers, show how to use it to get a setA= {a1, . . . , ak} ⊂In without consecutive elements.

(c) Obtain Kaplansky’s first lemma from the results of items (a) and (b) and from Problem9.

12. * ProveKaplansky’s second lemma: givenn, k ∈N, withn≥2k, the number ofk-element subsets ofInwithout consecutive elements, and considering 1 and nto be consecutive, is equal to

n nk

nk k

.

For the coming problem, we define amultisetas an ordered pair (A, f ), whereAis a set andf is a function fromAintoN. IfxA, we say thatxis anelementof multiset(A, f ); in such a case,f (x)∈Nis thefrequencyofxas an element of(A, f ). A multiset(A, f )isfiniteifAis a finite set. In this case, thenumber of elementsof the multiset is defined as the sum of the frequencies of the elements ofA, seen as elements of(A, f ); in symbols,

|(A, f )| =

xA

f (x). (1.13)

Informally, we denote a multiset(A, f )simply byAf (or evenA, whenever f is understood and there is no danger of confusion with the setAitself); we declare Af between double curly braces, instead of simple ones (which are reserved for declaring sets), with eachxAbeing repeated exactlyf (x)times;

for instance, ifA= {a, b, c}andf :A→Nis given byf (a)=2,f (b)=3 andf (c)=1, we declare the multisetAf by writing

Af = {{a, a, b, b, b, c}}.

13. Letn, k∈Nbe given, withnk, and letAbe a set withkelements. Compute the number of multisets(A, f )ofnelements.

14. For each integern > 1, prove that there are exactly2n

n

subsets ofI2n with equal quantities of even and odd elements.

15. We are given natural numbersmandn, withm > n. If F = {(A1, . . . , An);A1, . . . , AnIm}, compute, in terms ofmandn, the value of the sum

(A1,...,An)F

|A1∪. . .An|.

16. To each permutationσ =(a1, a2, . . . , an)ofIn, let

Sσ =(a1−a2)2+(a2−a3)2+ ã ã ã +(an−1−an)2. Show that

1 n!

σ

Sσ = n+1

3

,

where, in the left hand side above,σ varies over alln!permutations ofIn.

1.4 Arrangements, Combinations and Permutations 31 17. (Saint Petersburg—adapted) We are give 2n+1 points on a circle, such that no two of them are the endpoints of a diameter. Prove that, among all triangles having three of the given points as their vertices, at most

1

6n(n+1)(2n+1) of them are acute.7

18. * The purpose of this problem is to use the material of this section to present another solution to Problem5, page13. To this end, do the following items:

(a) Fixed 1≤in, show thatiis the central element of exactly

j

i−1 j

ni j

= n−1

i−1

setsAIn, where the above sum extends to all indicesj satisfying 0 ≤ j ≤min{i−1, ni}.

(b) Conclude that

AIn

c(A)= n i=1

n−1 i−1

i=(n+1)ã2n−2.

19. (IMO shortlist—adapted) Let8n∈Nandf :InInbe such thatf (f (x))= xfor everyxIn.

(a) Show thatf is a bijection and that, if f has exactlykfixed points, then nkmust be even.

(b) Conversely, given 0 ≤ kn such that nk is even, show that for each choice of elements x1, . . . , xkIn and for each partition {{a1, b1}, . . . ,{al, bl}}of the remaining nk elements ofIn in subsets of two elements each, there exists a singlef :InInhavingx1, . . . , xk as its fixed points and satisfyingf (ai)=bifor 1≤ilandf (f (x))=x for eachxIn.

(c) Conclude that the number of functionsf :InInsuch thatf (f (x))=x for eachxInis given by

0≤kn nkeven

n k

ã

nk 2, . . . ,2

(nk)/2

=

0≤kn nkeven

n! k! ã2n−2k

.

7For another proof to this problem, see Example4.18.

8For a generalization of this problem, see Problem8, page58.

20. * (BMO—adapted)9Letn > 2 be an integer andF be a family of 3-element subsets ofIn, such that, ifA, BFandA=B, then|AB| ≤1. Prove that

|F| ≤1

6(n2−n).

21. (Romania) Letk, m∈Nbe given, withmk, and letAbe a set ofmelements.

Choose pairwise distinct subsetsA1,A2, . . . ,An ofA, such that|Ai| ≥ kfor 1≤inand|AiAj| ≤k−1 for 1≤i < jn. Prove thatnm

k

. 22. LetA= {a1, a2, . . . , an}, and letP1, P2, . . . , Pnbe pairwise distinct 2-element

subsets ofA, such that

PiPj = ∅ ⇔ ∃1≤kn; Pk = {ai, aj}.

Prove that each element ofAbelongs to exactly two of the setsP1,P2, . . . ,Pn.

9For the other half of the original problem, see Example2.29.

Chapter 2

More Counting Techniques

In this chapter we study a few more elaborate counting techniques. We start by discussing theinclusion-exclusion principle, which, roughly speaking, is a formula for counting the number of elements of a finite union of finite sets. The presentation continues with the notion of double counting for, counting a certain number of configurations in two distinct ways, to infer some hidden result. Then, a brief discussion of equivalence relations and their role in counting problems follows.

Among other interesting results, we illustrate it by proving a famous theorem of B. Bollobás, on extremal set theory. The chapter ends with a glimpse on the use of the language ofmetric spacesin certain specific counting problems.

Một phần của tài liệu An excursion through elementary mathematics, volume III discrete mathematics and polynomial algebra (Trang 34 - 44)

Tải bản đầy đủ (PDF)

(647 trang)