← Complete problem index

PROJECT EULER · #0573

Unfair Race

Statement only · UnsolvedOriginal problem ↗

n runners in very different training states want to compete in a race. Each one of them is given a different starting number k (1kn) according to the runner's (constant) individual racing speed being vk=kn.
In order to give the slower runners a chance to win the race, n different starting positions are chosen randomly (with uniform distribution) and independently from each other within the racing track of length 1. After this, the starting position nearest to the goal is assigned to runner 1, the next nearest starting position to runner 2 and so on, until finally the starting position furthest away from the goal is assigned to runner n. The winner of the race is the runner who reaches the goal first.

Interestingly, the expected running time for the winner is 12, independently of the number of runners. Moreover, while it can be shown that all runners will have the same expected running time of nn+1, the race is still unfair, since the winning chances may differ significantly for different starting numbers:

Let Pn,k be the probability for runner k to win a race with n runners and En=k=1nkPn,k be the expected starting number of the winner in that race. It can be shown that, for example, P3,1=49, P3,2=29, P3,3=13 and E3=179 for a race with 3 runners.
You are given that E4=2.21875, E5=2.5104 and E10=3.66021568.

Find E1000000 rounded to 4 digits after the decimal point.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.