Transcript Document

Exacting Princess Dr Fedor Duzhin, Nanyang Technological University, School of Physical and Mathematical Sciences

About me

• High School: • 1994, Russian Mathematics Olympiad – 2 nd prize • 1995, Chinese Mathematics Olympiad – 2 nd prize • 1995, Russian Mathematics Olympiad – 3 rd prize • 1994, Russian Informatics Olympiad – 1 st prize • 1995, Russian Informatics Olympiad – 2 nd prize 2

About me

• University Education: • M.S. in mathematics, 2000, Moscow State University • Major: Pure Mathematics (Topology) 3

About me

• Graduate Education: • Ph.D. in mathematics, 2005, Royal Institute of Technology, Stockholm • Major: Pure Mathematics (Topology and Dynamical Systems) 4

Characters

Martin Gardner (b. 1914) Famous American science writer specializing in recreational mathematics He stated the problem in 1960 Sabir Gusein-Zade (b. 1950) Russian mathematician He gave a general solution to the problem in 1966 Boris Berezovsky (b. 1946) One of Russia's first billionaires Once he was an applied mathematician. His doctoral thesis is devoted to optimal stopping of stochastic processes, which is a generalization of the problem. 5

Problem Statement

Once upon a time in the land of Fantasia a princess decided to get married.

100 princes came to seek for her hand; and she intends to choose the best of them.

6

Problem Statement

She can compare princes Once she spoke to any two of them, she can decide which one is better If she could speak with each of the princes, then she would be able to chose the best of them The princes form an ordered set: then A is better than C ?

Therefore, indeed, there is the best 7

Problem Statement

But! Once she’s spoken to a prince, she has either to accept or reject him ♥ If she rejects him, the proud prince leaves the country immediately and never comes back.

Once she accepts the offer, there are two possibilities: a. If the candidate is not the best, she goes into a convent b. If he is the best, they get married and live happily 8

Problem Statement

The procedure is as follows She faces the princes appearing in a random order. On each audience she decides whether to accept the current candidate.

PROBLEM: Find the optimal strategy for the princess: Which prince must be accepted to make the chance of success as high as possible?

9

If she decides to pick up the 1 st one or the 3 rd one, or the 100 th one

Some thoughts

the chance of success is just 1%

QUESTION:

How can she make the chance of success reasonable, for example at least 25%?

10

Some thoughts

Instead, she could do as follows: First, reject half of them, that is, 50 princes And pick up the first one who exceeds these 50

QUESTION:

What is the chance of success under this strategy?

11

Some thoughts

Let S be the chance in % to get the best fiancé If the best prince is among the first half, then she loses automatically

S <50%

But if the best prince is among the second half and the second best is among the first half, then she wins automatically

25%< S <50% QUESTION:

What is the chance of success under this strategy?

12

Idea!

The princess’s strategy can be like: First, reject R% of the candidates And pick up the first one who exceeds all the rejected ones QUESTION: What R should be taken to make the chance of success maximal?

13

General facts

In mathematics, the probability is measured not in % If there is one chance of two, the probability is 1/2=0.5 If there are three chances of eight, the probability is 3/8=0.375 Thus if the chance of success is S%, then the probability is P=S/100.

The chance of success in % lies between 0 and 100 The probability is between 0 and 1 14

Rigorous discussion

Let’s try to think backwards.

If there is only the last prince, the situation is clear.

Assume that the princess knows what to do with (n+1)st prince.

What should she do on the nth audience?

Let us introduce some parameters describing the process Suppose that she already rejected the first n-1 candidates and the nth one is better than any of them (otherwise accepting him does not make sense).

Let A(n) be the probability to win if she accepts him QUESTION: Calculate A(n) 15

Rigorous discussion

Recall that A(n) is the probability to win if she rejects the first n-1 candidates, if the nth prince is better than any of the first n-1, and if she picks the nth prince Obviously, A(100)=1: if she rejected 99 princes the 100 th turned out to be better than all of them then he is the best automatically Further, A(99)=1-0.01=0.99: if she rejected 98 princes the 99 th turned out to be better then all of them then the 100 th can be the best (probability is 0.01) otherwise the 99 th is the best 16

Challenge

Let A(n) be the probability to win if she rejects the first n-1 candidates, if the nth prince is better than any of the first n-1, and if she picks the nth prince Prove (by mathematical induction) that

A

(

n

) 

n

100 17

Rigorous discussion

Assume that she just rejects n candidates and then uses the optimal strategy. Let B(n) be the probability to win in this case.

Now the optimal strategy is obvious: The princess rejects the first, the second etc. candidates while than all the rejected guys.

B(n)>A(n)

Once A(n) becomes larger than B(n), she accepts the first one who is better QUESTION: Calculate B(n) 18

Rigorous discussion

Recall that B(n) is the probability to win if she rejects the first n candidates and uses the optimal strategy starting the (n+1)st prince Let’s think about properties B(n) may have 19

Rigorous discussion

First, B(n) is a decreasing function: B(n)≥B(n+1) for any n Indeed, the earlier the princess starts using the optimal strategy, greater chance of success is.

the Let’s think about properties B(n) may have 20

Rigorous discussion

Second, B(n) must be constant in the beginning of the process Indeed, in the beginning the princess just skips guys, it doesn’t affect the probability of success.

21

Rigorous discussion

Let’s try to calculate B(n) Recall that B(n) be the probability to win if she rejects the first n candidates uses the optimal strategy starting the (n+1)st prince Obviously, B(100)=0 if she rejected all the 100 princes, she loses automatically Further, B(99)=0.01: if she rejected 99 princes, the only way to deal with the 100 th to accept him.

candidate is 22

Complete Probability Formula

Imagine that a knight came to a crossroads.

To choose the way, he throws a dice But the dice is broken so that the probability to go to the left is 0.2

the probability to go straight is 0.3

the probability to go to the right is 0.5

A warlock lives straight ahead Chance of survival = 0.1

A monster lives on the left Chance of survival = 0.5

0.2

0.5

0.3

A fairy lives on the right Chance of survival = 1 23

Complete Probability Formula

To calculate the knight’s chance to survive, we do as follows =0.63

is the knight’s chance to survive Chance of survival = 0.1

Chance of survival = 0.5

0.2

0.5

0.3

Chance of survival = 1 24

Rigorous discussion

B(100)=0, B(99)=1/100 Assume that 98 princes are rejected.

99 th one is better than all of them Probability of this is 1/99 Chance of success is 99/100 Complete probability to win is 1 99  99 100  98 99  1 100  98  99 99  100 Let’s calculate B(98) There are two possibilities: 99 th one is not better than all of them Probability of this is 98/99 Chance of success is 1/100 25

Rigorous discussion

Let us fill the following table

n A

(

n

) 

B

(

n

) 98 98 100 98  99 99  100

B

(

n

)

A

(

n

) 1 98  1 99 99 99 100 1 100 1 99 100 1 0 0 26

Challenge

Prove by mathematical induction that

B

(

n

) 

A

(

n

) 1 

n n

1  1    1 99 (already known to be true for n=100, 99, 98) Recall that A(n) is the probability to win if she rejects the first n-1 candidates the nth prince is better than any of the first n-1 and she picks the nth prince Recall that B(n) is the probability to win if she rejects the first n candidates uses the optimal strategy starting the (n+1)st prince 27

Rigorous discussion

Now it’s clear what to do We must find n 0

B

(

n A

(

n

0 ) )  1

B

(

n

0

A

(

n

0  1 )  1 )  1 That is

B

(

n

0

A

(

n

0 ) )  1 In other words, 1

n

0 

n

0 1  1    1 99  1 28

Some calculus

Consider the expression

f

(

n

)  1

n

n

1  1    1 99 Obviously, f(n) is the area of the union of the strips on the picture 29

Some calculus

Area does not change if we stretch the figure 100 times vertically and squeeze 100 times horizontally 30

Some calculus

Thus f(n) is approximately the area under the graph

f

(

n

)   1

n

100

dx x

31

Rigorous discussion

Now we have the equation  1

n

100

dx x

 1 Calculating the integral, we see that  log

n

100  1 Multiplying by -1, we have

n

log 100   1 Thus the solution is

n

100  1

e

32

Summary

Thus the optimal strategy for the princess is reject automatically 100/e≈36 candidates and pick up the first one who exceeds all the rejected ones The probability to get the best guy is about 1/e≈0.37

33

Generalization

What to do if there are more applicants? 1000 princes or N princes?

This is easy – in the same way the princess rejects N/e of them and accepts the first one who is better than all the rejected guys.

The probability to win approaches 1/e as N grows.

34

Generalization

Imagine that the princess is not so exacting. She does not want to go into a convent.

Instead, she ranks princes, for example: 500 points is the best 400 points is the second best 350 points is the third best etc (she has her own criteria) QUESTION: How should the princess act to maximize the expected value of her husband?

35

Super-Challenge

V 1 V 2 V 3 Let be the value of the best prince be the value of the second prince be the value of the third prince etc.

P 1 P 2 P 3 Let be the probability to get the best prince be the probability to get the second prince be the probability to get the third prince etc.

DEFINITION: V exp =P 1 V 1 +P 2 V 2 +P 3 V 3 +…+P N V N is the average expected value of the husband QUESTION: How should the princess act to maximize V exp ?

36

Homework

Question 1 (slide 17): Recall that we proved that A(100)=1 and A(99)=0.99.

a) First, try to prove that A(98)=0.98 b) Second, try to show by induction that A(n)=n/100 Question 2 (slide 27): Recall that we found B(100), B(99), B(98). a) First, try to calculate B(97) b) Second, try to show by induction that

B

(

n A

(

n

) )  1

n

n

1  1    1 99 Question 3 (slide 36): Recall that we worked out the optimal strategy for a princess who aims to get only the best possible husband. a) First, try to figure out how the princess should act if she wants to get either the best or the second best one.

b) What should she do if she wants to get any of the first 3 candidates?

c) What if she would be satisfied with any of best k among N princes?

d) What if she ranks the candidates and tries to maximize the expected value?

37

Thanks for your attention!

38