- All packages added
- The package that has traveled the longest
- The average distance all packages has traveled

## Problem 724

**Forum rules**

As your posts will be visible to the general public you

are requested to be thoughtful in not posting anything

that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

See also the topics:

Don't post any spoilers

Comments, questions and clarifications about PE problems.

### Problem 724

Not sure I understand the question. Are you looking for the distance of:

### Re: Problem 724

If this helps, the expected distance means the expected value of the distance. I believe it is also assumed that each drone is equally likely to be chosen each second.

### Re: Problem 724

The problem wants the expectation of the average distance of all drones once the process completes.

### Re: Problem 724

I must be miss-understanding something , and failing the the first test case.

Let's call the two drones (H,T):

Is the following correct for the process:

- at time t=0, a fair coin is flipped to select a drone, let's assume it was H

- at time t=1, another flip is made:

- if T , drone T starts and process completes at t=2,

- flip at time t=2

- if H , drone H increases its speed to 2 cm/sec

- if T, the process terminates at t=3 with

otherwise drone H increases speed to 3,

at next possible termination, t=4 the total distance is ( 1 + 2 + 3 + 3) + 1 = 10

In the other scenario T starts first.

- If the above was correct, the expectation for the distance is then calculated as:

P(completes t=2)*3 + P(completes t=3)*6 + P(t=4)*10 + ...

Here P(completes t=2) = P(HT) + P(TH) = 2/4, and P(t=3) P(HHT) + P(TTH) = 2/8, etc.

Let's call the two drones (H,T):

Is the following correct for the process:

- at time t=0, a fair coin is flipped to select a drone, let's assume it was H

- at time t=1, another flip is made:

- if T , drone T starts and process completes at t=2,

**total distance = 3**, drone H has traveled 2 cm and drone T, 1cm- flip at time t=2

- if H , drone H increases its speed to 2 cm/sec

- if T, the process terminates at t=3 with

**total distance (1 + 2 + 2 ) + (1) = 6,**otherwise drone H increases speed to 3,

at next possible termination, t=4 the total distance is ( 1 + 2 + 3 + 3) + 1 = 10

In the other scenario T starts first.

- If the above was correct, the expectation for the distance is then calculated as:

P(completes t=2)*3 + P(completes t=3)*6 + P(t=4)*10 + ...

Here P(completes t=2) = P(HT) + P(TH) = 2/4, and P(t=3) P(HHT) + P(TTH) = 2/8, etc.

### Re: Problem 724

Actually I think I see my problem,

I am calculating the expectation for the sum of the traveled distance,

but it seems what is asked is the

I am calculating the expectation for the sum of the traveled distance,

but it seems what is asked is the

**expectation for the average distance.**### Re: Problem 724

Are jarpis assumptions about how the drones behave correct?

Given that there are two drones (#0 and #1):

If I expect that drone #1 is contacted at the third try, the following happens:

Time: 0s:

Time: 1s:

Time: 2s:

Time: 3s:

Given that there are two drones (#0 and #1):

If I expect that drone #1 is contacted at the third try, the following happens:

Time: 0s:

- #0, speed 0cm/s, traveled 0cm
- #1, speed 0cm/s, traveled 0cm

Time: 1s:

- #0, speed 1cm/s, traveled 1cm
- #1, speed 0cm/s, traveled 0cm

Time: 2s:

- #0, speed 2cm/s, traveled 3cm
- #1, speed 0cm/s, traveled 0cm

Time: 3s:

- #0, speed 2cm/s, traveled 5cm
- #1, speed 1cm/s, traveled 1cm