the basic of counting discrete mathematics knure, software department, ph. 7021-446, e-mail:...

55
THE BASIC OF COUNTING THE BASIC OF COUNTING D D iscrete mathematics iscrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: [email protected] N.V. Bilous

Upload: marcus-mccarthy

Post on 18-Dec-2015

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

THE BASIC OF COUNTINGTHE BASIC OF COUNTING

DDiscrete mathematicsiscrete mathematics

KNURE, Software department,Ph. 7021-446, e-mail: [email protected]

N.V. Bilous

Page 2: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

2

From Kharkov to Kiev you can go by bus, by train, and by plane. From Kiev to Lvov you can go by bus and by train. How many variants are there to travel from Kharkov to Lvov?

Solution: 3 • 2=6

Choosing each of 3 variants to travel from Kharkov to Kiev you can choose 2 variants to travel from Kiev to Lvov.

Introduction to combinatoricsIntroduction to combinatorics

KharkovKharkov KievKiev LvovLvovby bus

by train

by plane

by bus

by train

Page 3: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

3

The basic counting principleThe basic counting principle

If you have to do k tasks and the first task can be done in ways, n1 the n2 second in ways, …, and nk - in k ways then all k tasks can be done together in

n1·n2·n3·…·nk

ways.

Page 4: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

4

Basic difinitionsBasic difinitions

If М is a finite set, which contains n elements, we shall name it as n-set-set and to write |М| = n.

The subset АМ, which contains k elements, is named k--subsetsubset.

The n-set X is named linearly orderedlinearly ordered, if each element x has its own number i {1,2,.., n}.

Page 5: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

5

The sum ruleThe sum rule

If a first task can be done in n1 ways and a second in n2 ways, and if these tasks cannot be done at the same time, then there are

n1 + n2

to do either task.

Page 6: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

6

ExampleExample Suppose that either a member of the mathematics

faculty or a student who is a mathematics major is chosen as a representative to a university committee. How many different choices are there for this representative if there are 37 members of the mathematics faculty and 83 mathematics majors?

The first task choosing a member of the mathematics faculty can be done in 37 ways.

The second – in 83 ways.So there are 37+83=120 possible ways to pick this

representative.

The sum ruleThe sum rule

Page 7: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

7

We can extend the sum rule to more than two tasks.

Suppose that the tasks T1, T2, …,Tm can be done in n1, n2, …, nm ways, respectively, and no two of this tasks can be done at the same time. Then the number of ways to do one of these tasks is

n1+n2+…+nm

The sum ruleThe sum rule

Page 8: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

8

ExampleExample

A student can choose a computer project from one of three lists. The three lists contain 23, 15, and 19 possible projects, respectively.

Ho many possible projects are there to choose from?

There are

23+15+19=57

projects to choose from.

The sum ruleThe sum rule

Page 9: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

9

The product ruleThe product rule

Suppose that procedure can be broken down into two tasks. If there are n1 ways to do the first task and n2 ways to do the second task after the first task has been done, then there are

n1·n2

ways to do the procedure.

Page 10: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

10

ExampleExample There are 32 microcomputers in a computer center.

Each microcomputer has 24 ports. How many different ports to microcomputer are there in the computer center?

There are two tasks: first picking a microcomputer and then picking a port on this microcomputer. After the

Product rule the quantity of different ports to a microcomputer in the center is:

32·24 = 768

The product ruleThe product rule

Page 11: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

11

An extended version of the Product ruleAn extended version of the Product rule

Suppose that a procedure is carried out by performing the tasks. T1, T2, …,Tm. If task T1 can be done in n1 ways after tasks T1, T2, …,Ti-1, and have been done, then there are

n1·n2·…·nm

ways to carry out the procedure.

The product ruleThe product rule

Page 12: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

12

The product ruleThe product rule

ExampleExample

How many different bit strings are there of length seven?

Each of the seven bits can be chosen in two ways, since beach bit is either zero or one.

So there are:

27=128

different bit strings of length seven.

Page 13: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

13

Counting subsets of a finite setCounting subsets of a finite set

The number of the different subsets of a finite set S is 2|S|

Proof:

Let S be a finite set. List the elements of S in arbitrary order. Recall that there is one-to-one correspondence between subsets of S and bit strings of length |S|. Namely, a subset of S is associated with the bit string with a 1 in the i-th position if the i-th element in the list is in the subset, and a 0 in this position otherwise. By the Product rule, there are 2|S| bit strings of length |S|.

|P(S)|= 2|S|

Page 14: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

14

The product ruleThe product rule

ExampleExampleEach user on a computer system has a password, which

is six to eight characters long, where each character is an uppercase letter or a digit. Each password must contain at least one digit. How many possible passwords are there? Let P be he total number of possible passwords.

By the Sum rule: P=P6+P7+P8 By the Product rule: 36n the number of strings of n

characters, 26n the number of strings with no digits. Hence,P6=366-266=1867866560P7=367-267=70332353920P8=368-268=2612282842880Consequently, P=P6+P7+P8=2684483063360.

Page 15: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

15

The pigeonhole principleThe pigeonhole principle

If k+1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects.

There are more Pigeons than Pigeonholes.

Page 16: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

16

The generalized pigeonhole principleThe generalized pigeonhole principle

If n objects are placed into k boxes, then there is at least one box containing at least n/k objects.

Proof: Suppose that none of the boxes contains more

than [N/k]–1 objects. The total number of objects is at most

k([n/k]-1)<k(((n/k)+1)-1)=n

where the inequality [n/k]<(n/k)+1 has been used.

Page 17: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

17

The pigeonhole principleThe pigeonhole principle

ExampleExample

Among 100 people there are at least

[100/12] =9

who were born in the same month.

Page 18: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

18

ExampleExample

What is the minimum number of students required in a discrete mathematics class to be sure that at least six will receive the same grade, if there are five possible grades A, B, C, D, and F?

The minimum number of students needed to guarantee that at least six students receive the same grade is the smallest integer N such that [N/5]=6.

The smallest such integer is N=5·5+1=26.

26 is the minimum number of students needed to be sure that at least six students receive the same grade.

The pigeonhole principleThe pigeonhole principle

Page 19: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

19

PermutationPermutation

A permutation of a set of n distinct elements is an ordered arrangement of these elements. We also are interested in ordered arrangements by length r from a set with n elements. An ordered arrangement by length r of a set is called an rr-permutation-permutation.

Example Example М = {1, 2, 3}. 2––permutationpermutation (1,2);(2,1);(1,3);(3,1);(2,3);(3,2);3––permutationpermutation(1,2,3);(1,3,2);(2,1,3);(2,3,1);(3,1,2);(3,2,1).

Page 20: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

20

PermutationPermutation

The number of rr-permutations-permutations of a set with n distinct elements is

Proof: The first element of the permutation can be chosen in n ways, since there are n elements in the set, there are (n-1) ways to choose the second element (n-2)-choosing the third, …, and until there exactly n-r+1 ways to choose the r-th element. Using Product rule, there are n (n-1)·(n-2)·…·(n-r+1) r-permutations of the set.

)!(

!1)r -(n . . . 1)-(nn,

rnn

rnP

Page 21: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

21

Factorial notationFactorial notation

A compact representation for the multiplication of consecutive integers.

We use n! to represent the product

n·(n-1)·(n-2)·...·(2)·(1)

where n is some positive integer.

0!=1

Page 22: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

22

PermutationPermutation

Example Example Almost every morning or evening on the news I

hear about the State of Illinois DCFS, the Department of Children and Family Services. I'm confused! How many different 4-letter ordered arrangements, or permutations, exist for the set of letters {D, F, S, C}?

Thinking of four positions to fill, __ __ __ __ , we have 4 letters to choose from for the first position, 3 for the next, 2 letters for the next position, and 1 choice for the last position. Using the multiplication principle, there are 4·3·2·1=24 different 4-letter ordered arrangements for the set of letters {D, F, S, C}.

Page 23: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

23

PermutationPermutation

Example Example

How many different ways are there to select 4 different players from 10 players on a team to play four tennis matches, where the matches are ordered?

The number of 4-permutations of a set with 10 elements is

P(10,4)=10·9·8·7=5040.

Page 24: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

24

Example Example A saleswomen has to visit seven different cities. She

must begin her trip in a specified city, but she can visit the other seven cities in any order she wishes. How many possible orders can she use when visiting these cities?

The number of possible paths between the cities is the number of permutations of seven elements.

Consequently, there are7!=7·6·5·4·3·2·1= 5040

ways for saleswomen to choose her tour.

PermutationPermutation

If r = n then => P(n,n) = n!

Page 25: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

25

Circular permutationCircular permutation

How many ways are there to arrange 5 children at a square and at a round table?

If we consider the case when children sit at a square table:

After the formula of the n-permutation we have P(5,5) = 5! arrangements.

A C

Page 26: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

26

Circular permutationCircular permutation

Now imagine that these children sit at a circular table :

In each of these cases, the same people are sitting next to each other. Although there has been a change— a rotation – about the table, the five children are still in the same positions relative to each other.

A

B

CD

Page 27: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

27

Thus we have 5! unique linear arrangements of the children, but we can group those so each group has 5 arrangements that show the children in the same position relative to each other. Therefore, we have 5!/5=4! circular permutations of the five children.

Circular permutationCircular permutation

A

B

CD

Page 28: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

28

A circular permutation is a circular arrangement of elements for which the order of the elements must be taken into account.

In general:

For n elements, there are (n-1)! circular permutations.

The number of circular permutations of r-elements taken from an n-element set is P(n,r)/r.

Circular permutationCircular permutation

Page 29: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

29

CombinationsCombinations

An r-combinationr-combination of elements of a set is an unordered selection of r elements from the set. Thus, an r-r-combinationcombination is simply a subset of the set with r elements.

ExampleExample

Let S be the set {1,2,3,4}.

Then {1,3,4} is a 3-combination3-combination from S

Page 30: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

30

CombinationsCombinations

The number of r-combinationsr-combinations of a set with n distinct elements is denoted by C(n,r)

P(n,r) = C(n,r) • P(r,r)

)!(!

!)(!

rrr

rnn),( rnC ),(

),(

rrP

rnP!)!(

!

rrn

n

Page 31: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

31

CombinationsCombinations

Example Example

Let C be the set {a, b, c, d}

The number of 2-combinations from C is

Six subsets: {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}.

6!2)!24(

1234)2,4(

C

Page 32: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

32

CombinationsCombinations

Example Example The committee which develops a discrete mathematics

course is to consist of 3 faculty members from the mathematics department and 4 from the computer science department. There are 9 faculty members from the mathematics department and 11 from the computer science department.

How many ways are there to select it?

After the Product rule:

2772033084

!7!4

!11

!6!3

!9C(11,4))3,9(C

Page 33: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

33

CombinationsCombinations

The number of k-combinationsk-combinations of elements 1,2..., n, which contains an element 1or does not contain an element 1(after the sum rule):

C (n, r) = C (n-1, r) + C (n-1, r-1)

Recurrence relationRecurrence relation.

Page 34: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

34

Binomial coefficientBinomial coefficient

Let n and r be nonnegative integers with rn. Then

C(n,r) = C(n, n-r)This number is also called a binomial coefficient.binomial coefficient.

!)!(!

!)()!(!

),(rrn

nrnnrn

nrnnC

Page 35: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

35

The binomial theoremThe binomial theorem

Let x and y be variables, and let n be a positive integer

n1n

22n1nn

n

0j

jjnn

yn,nCyx1n,nC

yx2,nCyx1,nCx0,nC

yx)j,n(C)yx(

Page 36: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

36

The binomial theoremThe binomial theorem

Example Example

4

0

44 ),4()(j

jj yxjCyx

432234 )4,4()3,4()2,4()1,4()0,4( yCxyCyxCyxCxC

432234 464 yxyyxyxx

Page 37: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

37

ExampleExample

What is the coefficient of x12y13 in the expansion of (x+y)25?

From the Binomial theorem it follows that this coefficient is

)13,25(C

The binomial theoremThe binomial theorem

!12!13

!255200300

Page 38: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

38

Pascal`s trianglePascal`s triangle

Pascal`s identity: Let n and k be positive integers then

C(n+1,k)=C(n,k-1)+C(n,k)Pascal`s triangle geometric arrangement of the binomial

coefficients

2+1=3

3

3

2

3

1

3

0

3

2

2

1

2

0

2

1

1

0

1

0

0

1331

121

11

1

2

3

2

2

1

2

Page 39: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

39

Pascal’s identityPascal’s identity

Combinations of 8 out of 20 that do not include 20 are simply the combinations of 8 out of 19, so there are C(19,8). Consider the combinations of 8 in 20 that include 20. Since all these combinations include 20, the only variation comes from the 7 other objects chosen, so there are C(19,7). Therefore C(20,8)=C(19,8)+C(19,7) and, in general

C(n, r) = C(n-1, r) + C(n-1, r-1)

which is known as Pascal's identity.

Page 40: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

40

Let n be a possible integer. Then

A set with n elements has a total of different subsets. Each subset has either zero elements, one element, …, or n elements in it. There are C(n,0) subsets with zero elements, C(n,1) subsets with one element, …, and С(n,n) subsets with n elements. Hence,

n

r

nrnC0

2),(

n

r

nrnC0

2),(

CombinationsCombinations

Page 41: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

41

Permutations with repetitionPermutations with repetition

The number of different permutations of n objects, where there n1 indistinguishable objects of type 1, n2

indistinguishable objects of type 2, ..., and nk indistinguishable objects of type k, is

!n...!n!n

!nn,nC

nn,nCn,nC)n,...,n,n;n(Pn...nn

n

r21rr

121r21r21

Page 42: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

42

Permutations with repetitionPermutations with repetition

Example Example

How many different strings can be made by reordering the letters of the word SUCCESS ?

Solution

420!1!1!2!3

!7

Page 43: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

43

Permutations with repetitionPermutations with repetition

ExampleExample

How many strings of length n can be formed from the English alphabet?

By the Product rule:

26n

stings of length n.

Page 44: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

44

Permutations with repetitionPermutations with repetition

The number of r-permutationsr-permutations of a set with n objects with repetition allowed is

(n,r)=P((n),r)=nrP

Page 45: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

45

Combinations with repetitionCombinations with repetition

There are C(n+r–1, r) r-combinationsr-combinations from a set with n elements when repetition of elements is allowed.

C(n, r)=C(n+r-1, r)

!1n!r

!1rn

Page 46: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

46

Example Example

A cookie shop has four different kinds of cookies. How many different ways can six cookies be chosen?

Combinations with repetitionCombinations with repetition

)6,9(C )3,9(C 321

78984

Page 47: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

47

Combinations with repetitionCombinations with repetition

The recurrence formula for

r,1nC1r,nCr,nC

),( rnC

Page 48: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

48

Combinations and permutations with and Combinations and permutations with and without repetitionwithout repetition

Type Repetition Allowed?

Formula

R-permutationsR-permutations

R-combinationsR-combinations

R-permutationsR-permutations

R-combinationsR-combinations

No

NO

Yes

Yes

nr

)!rn(

!n

!r)!rn(

!n

!1n!r

!1rn

Page 49: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

49

ExampleExampleThere are 10 spectators at a ball game and 4 are wearing

caps. How many spectators are not wearing caps?

Straightforward subtraction yields the result: 10-4=6. There are 6 spectators not wearing caps

We have:|T|=10 – the number of all spectators |C|=4 – the property "wearing a cap" So ~C is the property "not wearing a cap." This gives us

|~C|=|T|-|C|=10-4=6.

The principle of inclusion-exclusionThe principle of inclusion-exclusion

Page 50: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

50

The principle of inclusion-exclusionThe principle of inclusion-exclusion

How many positive integers not exceeding 1000 are divisible by 7 or 11?

A

BA

B

142A 12BA 90B

BABABA

divisible by 7 divisible by 11

117

1000

11

1000

7

1000

220 1290142

Page 51: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

51

The principle of inclusion-exclusionThe principle of inclusion-exclusion

Let A1, A2, …, An be finite sets.

n211n

nkji1kji

nji1ji

ni1in21

AAA1AAA

AAAAAA

Page 52: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

52

The principle of inclusion-exclusionThe principle of inclusion-exclusion

A total of 1232 students have taken a course in Spanish, 879-in French, and 114-in Russian. Further, 103 have taken courses in both Spanish and French, 23-in both Spanish and Russian and 14-in both French and Russian.

If 2092 students have taken at least one of Spanish, French, Russian how many students have taken a course in all three languages?

Solution

There are seven students who have taken courses in Spanish, French, and Russian.

1232S

879F

114R

103FS

23RS

14RF

2092RFS

RFSFRRS

FSRFSRFS

RFS142310311487912322092

7RFS

Page 53: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

53

Discrete probabilityDiscrete probability

The probability of an event E, which is a subset of a finite sample space S of equally likely outcomes, is

P(E)=|E|/|S|

Page 54: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

54

Example Example

An urn contains four blue balls and five red balls. What is the probability that a ball chosen from the urn is blue?

9 - possible outcomes

4 - possible outcomes produce blue ball

The probability that blue ball is chosen is 4/9.

Discrete probabilityDiscrete probability

Page 55: THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph. 7021-446, e-mail: belous@kture.Kharkov.ua N.V. Bilous

55

There are many lotteries now that award enormous prizes to people who correctly choose a set of six numbers out of the first n positive integers, where n is usually between 30 and 50. What is the probability that a person picks the correct six numbers out of 40?

There is only one winning combination. The total number of ways to choose six numbers out of 40 is

So the probability of picking the winning ombination is

3838380!6!34

!406,40C

00000026.03838380/1

Discrete probabilityDiscrete probability

.