Fundamental Principle of Counting: Tree Diagrams

Scan QR Code In NoneUsing Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.

Encoding QR Code In NoneUsing Barcode generation for Software Control to generate, create QR Code JIS X 0510 image in Software applications.

If one thing can be accomplished in n1 different ways and after this a second thing can be accomplished in n2 different ways, . . . , and finally a kth thing can be accomplished in nk different ways, then all k things can be accomplished in the specified order in n1n2 c nk different ways.

QR Code 2d Barcode Recognizer In NoneUsing Barcode scanner for Software Control to read, scan read, scan image in Software applications.

QR Code ISO/IEC18004 Creation In C#Using Barcode maker for Visual Studio .NET Control to generate, create QR Code 2d barcode image in VS .NET applications.

EXAMPLE 1.14

Paint QR Code ISO/IEC18004 In VS .NETUsing Barcode creation for ASP.NET Control to generate, create QR image in ASP.NET applications.

Generating Denso QR Bar Code In .NET FrameworkUsing Barcode drawer for .NET framework Control to generate, create QR Code JIS X 0510 image in Visual Studio .NET applications.

If a man has 2 shirts and 4 ties, then he has 2 4

QR-Code Maker In Visual Basic .NETUsing Barcode creation for VS .NET Control to generate, create Denso QR Bar Code image in VS .NET applications.

Bar Code Printer In NoneUsing Barcode drawer for Software Control to generate, create bar code image in Software applications.

8 ways of choosing a shirt and then a tie.

Encode Bar Code In NoneUsing Barcode drawer for Software Control to generate, create bar code image in Software applications.

EAN-13 Creator In NoneUsing Barcode generation for Software Control to generate, create EAN 13 image in Software applications.

A diagram, called a tree diagram because of its appearance (Fig. 1-4), is often used in connection with the above principle.

Generating GS1 128 In NoneUsing Barcode maker for Software Control to generate, create EAN 128 image in Software applications.

Create Code 3 Of 9 In NoneUsing Barcode generator for Software Control to generate, create Code39 image in Software applications.

EXAMPLE 1.15 Letting the shirts be represented by S1, S2 and the ties by T1, T2, T3, T4, the various ways of choosing a shirt and then a tie are indicated in the tree diagram of Fig. 1-4.

MSI Plessey Maker In NoneUsing Barcode creator for Software Control to generate, create MSI Plessey image in Software applications.

Barcode Decoder In .NET FrameworkUsing Barcode Control SDK for ASP.NET Control to generate, create, read, scan barcode image in ASP.NET applications.

Fig. 1-4

EAN-13 Supplement 5 Printer In NoneUsing Barcode encoder for Online Control to generate, create EAN-13 Supplement 5 image in Online applications.

Print Bar Code In VS .NETUsing Barcode creation for VS .NET Control to generate, create bar code image in .NET framework applications.

CHAPTER 1 Basic Probability

Generating Bar Code In Objective-CUsing Barcode generation for iPhone Control to generate, create bar code image in iPhone applications.

UCC.EAN - 128 Generator In JavaUsing Barcode drawer for BIRT reports Control to generate, create EAN128 image in BIRT reports applications.

Permutations

Code 3/9 Generator In VS .NETUsing Barcode generation for .NET Control to generate, create Code-39 image in Visual Studio .NET applications.

Scanning Barcode In Visual Studio .NETUsing Barcode recognizer for .NET Control to read, scan read, scan image in VS .NET applications.

Suppose that we are given n distinct objects and wish to arrange r of these objects in a line. Since there are n ways of choosing the 1st object, and after this is done, n 1 ways of choosing the 2nd object, . . . , and finally n r 1 ways of choosing the rth object, it follows by the fundamental principle of counting that the number of different arrangements, or permutations as they are often called, is given by

n Pr

1)(n

2) c (n

(25)

where it is noted that the product has r factors. We call n Pr the number of permutations of n objects taken r at a time. In the particular case where r n, (25) becomes

n Pn

1)(n

2) c 1

(26)

which is called n factorial. We can write (25) in terms of factorials as

n Pr

n! (n r)!

(27)

If r

n, we see that (27) and (26) agree only if we have 0!

1, and we shall actually take this as the definition of 0!.

EXAMPLE 1.16 The number of different arrangements, or permutations, consisting of 3 letters each that can be formed from the 7 letters A, B, C, D, E, F, G is

7P 3

7! 4!

7 6 5

Suppose that a set consists of n objects of which n1 are of one type (i.e., indistinguishable from each other), n2 are of a second type, . . . , nk are of a kth type. Here, of course, n n1 n2 c nk. Then the number of different permutations of the objects is

n Pn1, n2, c, nk

n! n1!n2! c nk!

(28)

See Problem 1.25.

EXAMPLE 1.17 The number of different permutations of the 11 letters of the word M I S S I S S I P P I, which consists of 1 M, 4 I s, 4 S s, and 2 P s, is

11! 1!4!4!2!

34,650

Combinations

In a permutation we are interested in the order of arrangement of the objects. For example, abc is a different permutation from bca. In many problems, however, we are interested only in selecting or choosing objects without regard to order. Such selections are called combinations. For example, abc and bca are the same combination. The total number of combinations of r objects selected from n (also called the combinations of n things taken n r at a time) is denoted by nCr or a b. We have (see Problem 1.27) r n r

n! r!(n r)!

(29)

It can also be written

It is easy to show that

n r

1) c (n r!

n Pr

(30)

n r

n n r

nC n r

(31)

CHAPTER 1 Basic Probability

The number of ways in which 3 cards can be chosen or selected from a total of 8 different cards is

EXAMPLE 1.18

Binomial Coefficient

(x y)n xn

8 3

8 7 6 3!

The numbers (29) are often called binomial coefficients because they arise in the binomial expansion n x n 1 y 1

4x3 y 4 x3 y 1

They have many interesting properties.

EXAMPLE 1.19

x4 x4

6x2 y2

4 x2 y2 2

n x n 2

4xy3

2 y2

4 xy3 3 y4

4 y4 4

n y n n

(32)

Stirling s Approximation to n!

When n is large, a direct evaluation of n! may be impractical. In such cases use can be made of the approximate formula n! , 22pn n ne

(33)

where e 2.71828 . . . , which is the base of natural logarithms. The symbol , in (33) means that the ratio of the left side to the right side approaches 1 as n S ` . Computing technology has largely eclipsed the value of Stirling s formula for numerical computations, but the approximation remains valuable for theoretical estimates (see Appendix A).