Problem 724

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
KING-OLE
Posts: 15
Joined: Mon Dec 22, 2014 9:33 pm

Problem 724

Post by KING-OLE »

Not sure I understand the question. Are you looking for the distance of:
  1. All packages added
  2. The package that has traveled the longest
  3. The average distance all packages has traveled
Thanks.
Image
mdean
Posts: 171
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 724

Post by mdean »

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.
Image
User avatar
heteroing
Posts: 3
Joined: Thu Sep 10, 2020 10:23 am

Re: Problem 724

Post by heteroing »

The problem wants the expectation of the average distance of all drones once the process completes.
Image
KING-OLE
Posts: 15
Joined: Mon Dec 22, 2014 9:33 pm

Re: Problem 724

Post by KING-OLE »

heteroing wrote: Thu Sep 10, 2020 10:28 am The problem wants the expectation of the average distance of all drones once the process completes.
Thanks, and I must have been tired last night, as the only way to get to a non-integer is by taking the average. :-)
Image
jarip
Posts: 3
Joined: Sat Dec 18, 2010 7:40 am

Re: Problem 724

Post by jarip »

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,
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.
jarip
Posts: 3
Joined: Sat Dec 18, 2010 7:40 am

Re: Problem 724

Post by jarip »

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 expectation for the average distance.
LangerJan
Posts: 3
Joined: Thu Oct 17, 2019 10:14 am

Re: Problem 724

Post by LangerJan »

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:
  • #0, speed 0cm/s, traveled 0cm
  • #1, speed 0cm/s, traveled 0cm
Depot calls #0, its speed increases to 1cm/s

Time: 1s:
  • #0, speed 1cm/s, traveled 1cm
  • #1, speed 0cm/s, traveled 0cm
Depot calls #0, its speed increases to 2cm/s

Time: 2s:
  • #0, speed 2cm/s, traveled 3cm
  • #1, speed 0cm/s, traveled 0cm
Depot calls #1, its speed increases to 1cm/s

Time: 3s:
  • #0, speed 2cm/s, traveled 5cm
  • #1, speed 1cm/s, traveled 1cm
Both drones drop their package. They traveled 6cm in total, on average 3cm.
Post Reply