MATH 20: PROBABILITY Lecture 3: Permutations Xingru Chen - - PowerPoint PPT Presentation

โ–ถ
math 20 probability
SMART_READER_LITE
LIVE PREVIEW

MATH 20: PROBABILITY Lecture 3: Permutations Xingru Chen - - PowerPoint PPT Presentation

MATH 20: PROBABILITY Lecture 3: Permutations Xingru Chen xingru.chen.gr@dartmouth.edu XC 2020 PINE 2 East Wheelock Street, Hanover, NH XC 2020 SMALL PL SM PLATES ES LAR LARGE P PLA LATES SW SWEET EET BITES ES Buffalo


slide-1
SLIDE 1

MATH 20: PROBABILITY

Lecture 3: Permutations Xingru Chen xingru.chen.gr@dartmouth.edu

XC 2020

slide-2
SLIDE 2

PINE

2 East Wheelock Street, Hanover, NH

XC 2020

slide-3
SLIDE 3

SM SMALL PL PLATES ES LAR LARGE P PLA LATES SW SWEET EET BITES ES

  • Buffalo

Cauliflower

  • Pine

Fries 2 2

  • ptions
  • Crispy

Fish Taco

  • Maine

Lobster Roll

  • Hanover

Inn Burger 3 3

  • ptions
  • Citrus

Vanilla Cheesecake

  • House-Made

Ice Creams 2 2

  • ptions

XC 2020

slide-4
SLIDE 4

SP 1 SP 2 LP 1 LP 2 LP 3 LP 1 LP 2 LP 3

SB 1 SB 2

2 2

  • ptions

3 3

  • ptions

2 2

  • ptions

XC 2020

slide-5
SLIDE 5

SP 1 SP 2 LP 1 LP 2 LP 3 LP 1 LP 2 LP 3

SB 1 SB 2

nu number ๐Ÿ‘ร—๐Ÿ’ร—๐Ÿ‘ = ๐Ÿ๐Ÿ‘

XC 2020

slide-6
SLIDE 6

Le tour du monde en quatre-vingts jours

ยง Airplane ยง Ferry ยง Train

Options

United States Brazil Egypt China Australia

XC 2020

slide-7
SLIDE 7

Le tour du monde en quatre-vingts jours

2 2

  • ptions

2 2

  • ptions

2 2

  • ptions

3 3

  • ptions

1 1

  • ptions

nu number ๐Ÿ’ร—๐Ÿ‘ร—๐Ÿ‘ร—๐Ÿ‘ร—๐Ÿ = ๐Ÿ‘๐Ÿ“

XC 2020

slide-8
SLIDE 8

Lockscreen Password

Forgot your password? Maximum number

  • f

attempts required is โ€ฆ

XC 2020

slide-9
SLIDE 9

Lockscreen Password

Forgot your password? Maximum number

  • f

attempts required is โ€ฆ nu number ๐Ÿ๐Ÿร—๐Ÿ๐Ÿร—๐Ÿ๐Ÿร—๐Ÿ๐Ÿร—๐Ÿ๐Ÿร—๐Ÿ๐Ÿ = ๐Ÿ๐Ÿ๐Ÿ•

XC 2020

slide-10
SLIDE 10

Counting Problems

ยง Experiment is composed

  • f

multiple in independent stages. ยง The numbers

  • f
  • utcomes

may be different for each stage. ยง Examples: restaurant menu, multi-destination travel, password, name initialsโ€ฆ ยง Counting technique: tr tree diagram.

?

What does independent mean here?

XC 2020

slide-11
SLIDE 11

Birthday Problem

How many students do we need to have in

  • ur

hours section to make it favorable bet (that is, probability

  • f

success greater than "

#)

that two people in the classroom will have the same birthday?

XC 2020

slide-12
SLIDE 12

Birthday Problem

ยง Ignore leap years in

  • ur

calculation (1๐‘ง = 365 ๐‘’). Assume birthdays are equally likely to fall

  • n

any particular day. ยง Order the students from 1 to ๐‘œ. There are ๐Ÿ’ฎ possibilities for the birthday

  • f

a

  • student. There

are ๐Ÿ’ฎ possibilities altogether.

XC 2020

slide-13
SLIDE 13

Birthday Problem

ยง Ignore leap years in

  • ur

calculation (1๐‘ง = 365 ๐‘’). Assume birthdays are equally likely to fall

  • n

any particular day. ยง Order the students from 1 to ๐‘œ. There are 365 possibilities for the birthday

  • f

a

  • student. There

are 365$ possibilities altogether.

XC 2020

slide-14
SLIDE 14

365 possibilities 365ร—364 possibilities

Birthdays are different

XC 2020

slide-15
SLIDE 15

Birthday Problem

ยง The probability that all birthdays are different for ๐‘œ students:

(&'()! &'(! .

We denote the product ๐‘™ร— ๐‘™ โˆ’ 1 ร— โ‹ฏร— ๐‘™ โˆ’ ๐‘  + 1 by (๐‘™)! (read โ€˜๐‘™ down ๐‘ โ€™ or โ€˜๐‘™ lower ๐‘ โ€™).

XC 2020

slide-16
SLIDE 16

Birthday Problem

How many students do we need to have in

  • ur

hours section to make it favorable bet (that is, probability

  • f

success greater than "

#)

that two people in the classroom will have the same birthday? pr probabili lity ๐‘„ = 1 โˆ’ 365 $ 365$ > 1 2 ๐‘œ = 23, 24, โ‹ฏ

XC 2020

slide-17
SLIDE 17

The waiter serve

  • ne

course at a

  • time. How

many possible serving

  • rders

are there in total? Order Course 1 SP 2 LP 3 SB

Serving Orders

SM SMALL PL PLATES ES LAR LARGE P PLA LATES SW SWEET EET BITES ES

XC 2020

slide-18
SLIDE 18

Order 1 2 3 Course SP LP SB Course SP SB LP Course LP SP SB Course LP SB SP Course SB SP LP Course SB LP SP

Serving Orders

SM SMALL PL PLATES ES LAR LARGE P PLA LATES SW SWEET EET BITES ES

!

6 = 3ร—2ร—1.

XC 2020

slide-19
SLIDE 19

Order 1 2 3 Course 1 2 3 Course 1 3 2 Course 2 1 3 Course 2 3 1 Course 3 1 2 Course 3 2 1

Serving Orders

SM SMALL PL PLATES ES = ๐Ÿ LAR LARGE P PLA LATES = ๐Ÿ‘ SW SWEET EET BITES ES = ๐Ÿ’

!

6 = 3ร—2ร—1.

XC 2020

slide-20
SLIDE 20

Combination Lock 80 90 10 2 30 40 50 60 70

The

  • rder
  • f

these four numbers is unknown.

What is unknown

ยง The password is a combination of four numbers. ยง The four numbers are 12, 25, 33, and 77.

What is known

XC 2020

slide-21
SLIDE 21

Password Number Orders

What's the maximum number

  • f

tries to

  • pen

the lock? For ease

  • f

notation: ยง 12 โ€“ 1st, 25 โ€“ 2nd, 33 โ€“ 3rd, 77 โ€“ 4st. Further: ยง 12 โ€“ 1, 25 โ€“ 2, 33 โ€“ 3, 77 โ€“ 4. 1 2 3 4 1 2 3 4 1 2 4 3 1 3 2 4 1 3 4 2 1 4 2 3 1 4 3 2 โ€ฆ โ€ฆ โ€ฆ โ€ฆ

XC 2020

slide-22
SLIDE 22

3rd

rd

1st

st

2nd

nd

4st

st

!

24 = 4ร—3ร—2ร—1.

3 1 2 4 3 2 4 3 4 4

XC 2020

slide-23
SLIDE 23

Travel orders

Australia

5st stop

China

4st stop

Egypt

3rd stop

Brazil

2nd stop

United States

1st stop

  • Mr. Fogg

visit

  • ne

country at a

  • time. How

many possible travel

  • rders

are there in total?

XC 2020

slide-24
SLIDE 24

Permutations

ยง Let ๐ต be any finite set. ยง A permutation

  • f

๐ต, ๐œ, is a

  • ne-to-one

mapping

  • f

๐ต onto itself. ยง For example, if we have an

  • rdered

list

  • f

elements ๐ต = {๐‘" , ๐‘#, ๐‘&}, a possible permutation (re-arrangment) can be prescribed by ๐œ =

" # & # " & .

2 1 3 1 2 3

XC 2020

slide-25
SLIDE 25

Permutations

!

Th Theorem The total number

  • f

permutations

  • f

a set ๐ต of ๐‘œ elements is given by ๐‘œ! = ๐‘œ ร— (๐‘œ โˆ’ 1) ร— (๐‘œ โˆ’ 2) ร— โ‹ฏร— 1. 3 5 4 2 1 1 2 3 4 5

XC 2020

slide-26
SLIDE 26

๐‘œ factorial ๐‘œ!

!

St Stirlingโ€™s โ€™s Formula The sequence ๐‘œ! is asymptotically equal to ๐‘œ$๐‘“*$ 2๐œŒ๐‘œ.

๐‘œ ๐‘œ fa facto tori rial St Stirli lingโ€™ gโ€™s Formula la ra ratio 1 1 0.9221 1.0844 2 2 1.919 1.0422 3 6 5.8362 1.0281 4 24 23.5062 1.021 5 120 118.0192 1.0168 6 720 710.0782 1.014 โ€ฆ โ€ฆ โ€ฆ โ€ฆ

XC 2020

slide-27
SLIDE 27

St Stirlingโ€™s โ€™s Formula The sequence ๐‘œ! is asymptotically equal to ๐‘œ$๐‘“*$ 2๐œŒ๐‘œ. Birthda day P Problem lem

Apply Stirlingโ€™s formula to estimate the number

  • f

students needed such that ๐‘ž" =

($%&)! $%&! = ( ).

๐‘œ = 23.

XC 2020

slide-28
SLIDE 28

Stirlingโ€™s formula

๐’ ๐’! ๐’๐’๐’‡*๐’ ๐Ÿ‘๐†๐’ ra ratio difference ce 1 1 0.9221 0.9221 0.0779 2 2 1.919 0.9595 0.081 3 6 5.8362 0.9727 0.1638 4 24 23.5062 0.9794 0.4938 5 120 118.0192 0.9835 1.9808 6 720 710.0782 0.9862 9.9218 7 5040 4980.3958 0.9882 59.6042 8 40320 39902.3955 0.9896 417.6045 โ‹ฏ โ‹ฏ โ‹ฏ โ‹ฏ โ‹ฏ

XC 2020

slide-29
SLIDE 29

Stirlingโ€™s formula

XC 2020

slide-30
SLIDE 30

Fixed Points

ยง Since a permutation is a

  • ne-to-one

mapping

  • f

the set

  • nto

itself, it is

  • f

interest to ask how many points (elements) are mapped

  • nto
  • themselves. Such

points are called fi fixed po points of the mapping.

1 2 3 1 2 3 2 1 3 1 2 3 2 3 1 1 2 3

XC 2020

slide-31
SLIDE 31

Fixed Points

ยง Let ๐‘ž,(๐‘œ) denote the probability that a random permutation

  • f

the set {1, 2,ยท ยท ยท , ๐‘œ} has exactly ๐‘™ fixed points. ยง What is the probability

  • f

no fixed points for a permutation

  • f

a set

  • f

๐‘œ elements, ๐‘ž-(๐‘œ)? This is the famous hat ch check ck problem.

1 2 3 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1

?

๐‘ž- 3 = โ‹ฏ.

XC 2020

slide-32
SLIDE 32

Fixed Points

ยง Let ๐‘ž,(๐‘œ) denote the probability that a random permutation

  • f

the set {1, 2,ยท ยท ยท , ๐‘œ} has exactly ๐‘™ fixed points. ยง What is the probability

  • f

no fixed points for a permutation

  • f

a set

  • f

๐‘œ elements, ๐‘ž-(๐‘œ)? This is the famous hat ch check ck problem.

1 2 3 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1

?

๐‘ž- 3 = #

&! = " &.

XC 2020

slide-33
SLIDE 33

Hat Hat Check k Probl

  • blem

m

In a restaurant ๐‘œ hats are checked and they are hopelessly scrambled. What is the probability that no one gets his own hat back?

XC 2020

slide-34
SLIDE 34

Hat Check Problem

ยง Nu Number

  • f

derangements ts ๐‘ฌ๐Ÿ(๐’)

ยง If there is a derangement, then man #1 will not have his correct hat. ยง We begin by looking at the case where man #1 gets hat #2. Note that this case can be broken down into two subcases: a) man #2 gets hat #1,

  • r

b) man #2 does not get hat #1

XC 2020

slide-35
SLIDE 35

Hat Check Problem

ยง Nu Number

  • f

derangements ts ๐‘ฌ๐Ÿ(๐’)

ยง In case (a), for a derangement to

  • ccur,

we need the remaining ๐‘œ โˆ’ 2 men to get the wrong

  • hats. Therefore,

the total number

  • f

derangements in this subcase is simply ๐ธ-(๐‘œ โˆ’ 2). ยง In case (b), for a derangement to

  • ccur,

man #2 cannot get hat #1 (thatโ€™s case a), man #3 cannot get hat #3, man #๐‘— cannot get hat #๐‘—,

  • etc. In

this subcase, the number

  • f

derangements is ๐ธ-(๐‘œ โˆ’ 1).

XC 2020

slide-36
SLIDE 36

Hat Check Problem

ยง Nu Number

  • f

derangements ts ๐‘ฌ๐Ÿ(๐’)

ยง We can treat the cases where man #1 receives hat #3,

  • r

hat #4,

  • r

hat #๐‘—, in exactly the same way. ยง Therefore, to account for all possible derangements, there are ๐‘œ โˆ’ 1 such possibilities for all the different incorrect hats which man #1 can get. ๐ธ-(๐‘œ) = ๐‘œ โˆ’ 1 [๐ธ- ๐‘œ โˆ’ 1 + ๐ธ- ๐‘œ โˆ’ 2 ].

XC 2020

slide-37
SLIDE 37

Hat Check Problem

ยง ๐ธ;(๐‘œ) = ๐‘œ โˆ’ 1 [๐ธ; ๐‘œ โˆ’ 1 + ๐ธ; ๐‘œ โˆ’ 2 ]. ยง ๐‘ž; ๐‘œ = <!(=)

=! .

ยง ๐‘ž; ๐‘œ = ๐‘ž; ๐‘œ โˆ’ 1 โˆ’ ?

= [๐‘ž; ๐‘œ โˆ’ 1 โˆ’ ๐‘ž@(๐‘œ โˆ’ 2)].

XC 2020

slide-38
SLIDE 38

Hat Check Problem

ยง ๐‘ž; ๐‘œ = ๐‘ž; ๐‘œ โˆ’ 1 โˆ’ ?

= [๐‘ž; ๐‘œ โˆ’ 1 โˆ’ ๐‘ž@(๐‘œ โˆ’ 2)].

ยง ๐‘ž- 1 = 0, ๐‘ž- 2 = "

#.

ยง ๐‘ž- 3 = ๐‘ž- 2 โˆ’ "

& ๐‘ž- 2 โˆ’ ๐‘ž/ 1

= "

# โˆ’ " '.

ยง ๐‘ž- 4 = ๐‘ž- 3 โˆ’ "

0 ๐‘ž- 3 โˆ’ ๐‘ž/ 2

= "

# โˆ’ " ' + " #0.

ยง โ‹ฏ

XC 2020

slide-39
SLIDE 39

Hat Hat Check k Probl

  • blem

m

๐‘ž; ๐‘œ = ?

A! โˆ’ ? B! + ? C! โˆ’ ? D! + โ‹ฏ + (E?)" =! .

XC 2020

slide-40
SLIDE 40

Hat Hat Check k Probl

  • blem

m

๐‘ž; ๐‘œ = ?

A! โˆ’ ? B! + ? C! โˆ’ ? D! + โ‹ฏ + (E?)" =! .

๐’‡๐’š

๐‘“1 = 1 + ๐‘ฆ + "

#! ๐‘ฆ# + โ‹ฏ + " $! ๐‘ฆ$ + โ‹ฏ.

Taylor Expansion

XC 2020

slide-41
SLIDE 41

๐’‡๐’š

๐‘“1 = 1 + ๐‘ฆ + "

#! ๐‘ฆ# + โ‹ฏ + " $! ๐‘ฆ$ + โ‹ฏ.

Taylor Expansion ๐’’๐Ÿ(๐’)

๐‘ฆ = โˆ’1 ๐‘“*" = "

#! โˆ’ " &! + " 0! โˆ’ " (! + โ‹ฏ + *" ! $!

+ โ‹ฏ โ‰ˆ .3679.

Hat Check Problem

XC 2020

slide-42
SLIDE 42

XC 2020

slide-43
SLIDE 43

XC 2020