Basic Probability and Counting

advertisement

SM242 Week 11 (Notes Based on Epp Chapter 6)

VIII. Basic Probability and Counting

3. Permutations

A. Introduction. Consider the problem: MIDN Berrios has four midshipmen who work for him:

MIDN Murdock MIDN Ogden MIDN Vo MIDN Lees

He has four different jobs that need to be done:

Job 1: Hide chalk

Job 2: Find funny YouTube video to consume precious class time

Job 3: Sing Sponge Bob fun song

Job 4: Wake up MIDN Miller

Suppose any midshipman can do any of the four jobs, and he wants to assign one midshipman to each job. One arrangement is:

Job 1: Lees Job 2: Ogden Job 3: Murdock Job 4: Vo

B. Definition. An arrangement or ordering of a set of objects is termed a permutation .

How many different ways can we permute our four midshipmen?

(4)(3)(2)(1) = 24

C. Theorem. The number of permutations of n distinct objects is n !

Example. How many distinct permutations are there using the letters mid ?

3! = 6

Example. Suppose someone randomly scrambles the letters of the word mid . What is the probability that the resulting (scrambled) “word” has an i as the middle letter?

2

1

6 3

Example. Consider the word TUBLIN .

(a) How many ways can these letters be arranged in a row?

6! = 720

(b) How many ways can these letters be arranged in a row if we want to ensure that the word TUB sticks together?

4! = 24

(c) Suppose the letters in the word TUBLIN are randomly arranged in a row.

What is the probability that the word TUB sticks together as a unit?

24

1

720 30

1

D.

Example. Five midshipmen are lining up to get on the bus to go to some exciting fun mandatory event on what would otherwise be a sad liberty day. How many distinct arrangements can the midshipmen line up in?

5! = 120

Permutations of Selected Elements.

Consider again the problem: MIDN MIDN Berrios has four midshipmen who work for him:

MIDN Murdock MIDN Ogden MIDN Vo MIDN Lees

But, now, in this case, he has also offered to help out and take on a job. Additionally, we have abandoned all hope of waking up MIDN Miller, and so now he has only three different jobs that need to be done:

Job 1: Hide chalk

Job 2: Find funny YouTube video to consume precious class time

Job 3: Sing Sponge Bob fun song

Suppose any of the five midshipmen can do any of the three jobs, and we want to assign one midshipman to each job. How many different ways can we assign midshipmen to these three jobs?

(5)(4)(3) = 60

Note that this is also equal to

5 5

  ( ( ) ) 6

Let’s modify the problem again. Suppose we have sore throats, and no one can sing the Sponge

Bob fun song. Now there are only two jobs to do:

Job 1: Hide chalk

Job 2: Find funny YouTube video to consume precious class time

How many different ways can we assign the five midshipmen to these two jobs?

(5)(4) = 20

Note that this is equal to

5

 

5

( ) 0

Let’s modify the problem again. Suppose the YouTube site is down. Now there is only one job to do:

Job 1: Hide chalk

How many different ways can we assign the five midshipmen to this one job?

5

Note that this is equal to

5 5

  5

Theorem.

The number of permutations of n distinct objects taken r at a time, denoted given by

 

is

!

2

Example. How many two letter words can be created by selecting two different letters from the alphabet?

  

( ) )6

Example. How many distinct permutations exist for the 7 letters in the word SCHMIDT taken four letters at a time?

  

( 6 4 4

Example. How many distinct permutations exist for the 7 letters in the word SCHMIDT taken four letters at a time if the first letter must be a D?

  

( (

Example. All the midshipmen in SM242 have entered a raffle by placing their names in a hat. A name is drawn from the hat for first prize, then a name is drawn from the hat for second prize. How many different winning name selections are possible?

  

( ) )1

Example. How many different ways can the nine starting positions on a baseball team be filled by 11 midshipmen, if any midshipman is able to play any position.

 

0 7

Example. How many different ways can the six midshipmen be assigned to four company leadership positions if no midshipman is assigned to more than one position?

  

( 5 3 6

D. Permutations of a Set with Repeated Elements.

All of the discussion above about permutations involved permutations of distinct objects. What if the objects are not all distinguishable from each other?

For example, the permutations of the letters mid are: mid mdi imd idm dmi dim

What if it is the case, though, that the letters i and d are both equal to x . Them these six permutations become: mxx mxx xmx xxm xmx xxm

How many of these are distinct?

Three: mxx xmx xxm

3

Theorem . The number of distinct permutations of n things, of which n

1

are of one kind, n

2

are of a second kind,..., n k

are of a k

’th kind is: n !

n n

1 2 n k

!

Example. How many distinct arrangements exist for the word hall ?

4!

2!

= 12 hall h1al hlla ahll alhl allh lhal lahl llah llha lhla lalh

Example. How many distinct ways can we arrange the letters in the word midshipman ?

There are 10 letters: 2 m’s, 2 i’s, 1 d, 1 s, 1 h, 1 p, 1 a, 1 n

10!

2!2!

= 907,200.

Example. MIDN Craner is arranging a string of Christmas lights in his room. He has 3 red, 4 orange and 2 green little Christmas-y light bulbs. How many distinct lighting arrangements can he come up with for a string of nine Christmas lights?

9!

3!4!2!

1260

Example. In how many ways can 3 Navy officers, 4 Air Force officers and 2 beat Army officers be arranged on a line if we do not distinguish between officers of the same service.

E.

9!

3!4!2!

1260

Circular Permutations

Consider 4 distinct midshipmen sitting around a circular table. We will not consider two arrangements to be different unless as we go clockwise around the table, we find a midshipman preceded or followed by a different midshipmen. In other words, these two arrangements are the same:

4

Do you want to hear about my latest rugby injury?

No!

No!

No!

No!

Do you want to hear about my latest rugby injury?

No!

No!

Example. How many different ways can 4 midshipmen be seated around a circular table?

All that matters is relative position. We can consider one midshipman fixed (i.e., pick any midshipman and seat him in any position), and then arrange the other ones around him.

3! = 6.

Theorem . The number of permutations of n distinct objects arranged in a circle is

 n

 

Example. In how many distinct ways can six diplomats be seated around a table?

5! = 120

F. Important Application: Partitioning

Suppose we want to partition a set of n objects into r subsets, such that n

1

of the elements are in subset 1, n

2

of the elements are in subset 2, ..., and n r

of the elements are in subset r . The number of different ways of partitioning a set in this manner is n !

n n

1 2 n r

!

Example. In how many ways can seven midshipmen be assigned to one 3-man room and two

2-man rooms?

7!

3!2!2!

210

Example. Eleven midshipmen are going on a trip to Washington DC in three cars. The cars hold 2, 4 and 5 passengers respectively. In how many ways can the midshipmen transport themselves to Washington DC?

11!

2!4!5!

4. Combinations

5

A. Introduction. Suppose we have four midshipmen available to stand a two-man watch. The midshipmen are:

MIDN Murdock MIDN Ogden MIDN Vo MIDN Lees

How many different permutations of two of these midshipmen are there?

Now, suppose that I am just interested in assigning a team of two midshipmen. The order within a team does not matter. In other words, there is now no difference between these two teams:

Murdock, Ogden

Ogden, Murdock

Now…how many different ways can I assign midshipmen to two-person teams when order within the team does not matter?

Murdock, Ogden

Murdock, Vo

Murdock, Lees

Ogden, Vo

Ogden, Lees

Vo, Lees

There are six different ways.

Why? I know that there are 12 permutations, but if I don’t care about the order within a pair of midshipmen, then by considering permutations I am essentially double-counting each pair.

B. Definition. Combinations are ways of selecting objects without regard to order. In the above example, I am interested in teams of two midshipmen. There is no order within a team.

I could rephrase my question above as: “How many different combinations of two midshipmen can

I choose from a set of four midshipmen?”

Notation. Instead of saying “I have a set of n distinct objects and I want to choose r

,” I can use the shorthand notation: n

 

This notation is pronounced “ n choose r .”

Theorem. The number of combinations of n distinct objects taken r at a time is

 

 r !

  

!

C. Examples

Example 1. How many 5 card hands can be chosen from a standard deck of playing cards?

5

5

5 5

6

Example 2. Given a set S with 52 elements, how many subsets of size 5 can be chosen from S ?

5

5

5 5

Example 3. Suppose we have four midshipmen { Murdock, Ogden , Vo, Lees } available to stand a three-man watch. How many three-man watchstanding teams can I come up with?

4

4!

3 3!1!

4

D. Permutations versus Combinations

Suppose we select r objects from a set of n elements.

If the order matters, we are talking permutations. In this case, it is not only the identity of the r chosen elements that matters…we also care about the order in which they r elements are chosen.

If the order does not matter, we are talking combinations. In this case, it is only the identity of the r chosen elements that matters. The order in which the r elements are chosen is not relevant.

Example. How many distinct 2-digit numbers can be formed from the four digits 1, 3, 5 and 7 ?

We are going to select 2 objects from a set of four elements.

Does the order matter?

We are talking…

The answer is…

Yes. permutations

4 4

  2

Example. How many teams of two can be formed from a group of four midshipmen?

We are going to select 2 objects from a set of four elements.

Does the order matter?

No.

We are talking…

The answer is… combinations

6

!

!

5. Examples

Example 1. In how many different ways can 4 different colored marbles be arranged in a row?

7

4! = 24

Example 2. In how many ways can we choose a committee of 4 midshipmen from a group of 6?

6

4

6

4 !

Example 3. In how many distinct ways can 10 midshipmen sit on a bench if only 4 seats are available?

1 !

 

,0 0

Example 4. A set consists of 5 distinct objects. How many possible subsets are there?

5 5 5 5 5



=

!5

!

= 5 + 10 + 10 + 5 + 1 = 31

Did we forget one?

Yes, the empty set! So the answer is 32. (Is this a surprise?)

Example 5. Suppose you own 4 math texts, 6 computer science texts and 2 engineering texts.

(a) How many distinct ways can you arrange these books on your shelf?

12!

(b) How many distinct ways can you arrange these books on your shelf if your only concern is that you keep all books in the same subject together?

(3)(2) = 6

(c) How many distinct ways can you arrange these books on your shelf if you want the math books to be grouped together in the order in which you studied them?

9!

Example 6. You are on a post-graduation 3-day cruise. The cruise offers six sight-seeing excursions on each day. How many fun-filled 3-day sight-seeing extravaganzas can you arrange?

6

3

Example 7. MIDN Cunha has five different style shoes, with each style in one of four colors. How many pairs of shoes does he have?

20

Example 8. You have returned from summer vacation and it is time again for you to select a room in

Bancroft Hall. As you know, the Bancroft Room Assignment Division offers midshipmen a choice of

8

four room designs, three different fireplace configurations, either a hot tub or a Jacuzzi, and either an

LCD or a plasma big screen TV. How many different room design choices are given to midshipmen?

48

Example 9. How many different ways can MIDN Nafis answer a nine question True/False exam?

2

9 

512

Example 10. You are taking a five question multiple choice exam. Each question has four possible answers (of which only one is correct).

(a) How many ways can a midshipman complete the exam?

4

5 

1024

(b) In how many different ways can a midshipman manage to get every single question wrong?

3 5 

243

Example 11. You saw a midshipman hanging a sign saying “Redheads Rule!” from the roof of

Michelson Hall. He got into a car and sped away. You saw that the first part of the license plate was

TINKH followed by two different digits, neither of which were a zero. How many auto registrations will the base police need to check?

(9)(8) = 72

Example 12. The following six midshipmen are lining up to get on a bus to go to the

Pentagon:

MIDN 2/C Avworo

MIDN 2/C Burkardt

MIDN 2/C Craner

MIDN 3/C Bennett

MIDN 3/C Leonard

MIDN 3/C Morales

(a) In how many different ways can these six midshipmen line up?

6! = 720

(b) In how many different ways can the midshipmen line up if the youngsters want to stick together in a specific order?

4! = 24

(c) In how many different ways can the midshipmen line up if the youngsters just want to stick together as a group?

4! 3! = 144

(d) In how many different ways can the midshipmen line up if MIDN Bennett and MIDN

Leonard refuse to stand next to each other?

6! – 5! 2! = 480

Example 13. MIDN 1/C Monroe owns nine computers, each different in design and appearance (it’s true!). In how many ways can he place these nine computers in his room if he has space for six on one side of the room and space for three on the other side of the room?

9! = 362,880

9

Example 14. Suppose you have 4 USMA cadets and five USNA midshipmen to line up for an awards ceremony. In how many ways can these nine individuals sit in a row if the cadets and midshipmen must alternate?

4! 5! = 2880

Example 15. Eight midshipmen are finalists in a programming contest that will award three prize (for first, second and third place). How many possible winning arrangements are there?

8!

 

336

Example 16. Suppose the USNA football team plays 12 games during the season. In how many ways can the team end the season with 7 wins, three losses and 2 ties?

12!

7!3!2!

7920

Example 17. UCLA researchers have discovered seven “rules” which correlate very well with general healthiness and longevity. Since the Computer Science Department is The Caring Department , we would like midshipmen to follow the rules. The seven rules are:

1. Don’t smoke

2. Get at least seven to eight hours of sleep every day

3. Eat breakfast every day 4. Keep your weight down

5. Drink moderately

7. Don’t eat between meals

6. Exercise every day

(a) In how many ways can MIDN Muir adopt 5 of these rules to follow?

7!

 

21

(b) MIDN Miller does not smoke and he definitely gets enough sleep every day (usually during the day). In how many ways can he adopt 5 of these rules to follow?

5!

 

10

Example 18. (Epp Problem 6.2.11(c)(d) )

(c) How many bit strings of length 8 begin and end with a 1?

2 6 

64

(d) How many distinct symbols can be represented using 7-bit ASCII?

2

7 

128

Example 19. (Epp Problem 16(a) ) Consider the ATM keypad below. How many different PINs are represented by the same sequence of keys as 2133? (For example, one is A1F3)

10

(4)(3)(4)(4)= 192

11

Download