Project Euler Lab - Problem 724

#724 - Drone Delivery

● AdvancedOfficial difficulty: 49%RandomnessTier C - reduced scale in browser; full scale in notebookNot viewed
↖ Euler Lab

A depot uses \(n\) drones to disperse packages containing essential supplies along a long straight road.
Initially all drones are stationary, loaded with a supply package.
Every second, the depot selects a drone at random and sends it this instruction:

  • If you are stationary, start moving at one centimetre per second along the road.
  • If you are moving, increase your speed by one centimetre per second along the road without changing direction.

The road is wide enough that drones can overtake one another without risk of collision.

Eventually, there will only be one drone left at the depot waiting to receive its first instruction. As soon as that drone has flown one centimetre along the road, all drones drop their packages and return to the depot.

Let \(E(n)\) be the expected distance in centimetres from the depot that the supply packages land.
For example, \(E(2) = \frac{7}{2}\), \(E(5) = \frac{12019}{720}\), and \(E(100) \approx 1427.193470\).

Find \(E(10^8)\). Give your answer rounded to the nearest integer.

This problem is taken from Project Euler, Problem 724.
Problem text © Project Euler, licensed under CC BY-NC-SA 4.0. Original: projecteuler.net/problem=724. Published Saturday, 5th September 2020, 02:00 pm. Solved by 498 members at time of mirroring.

Why this is useful

Probability Statistics. Expectation and state-based probability reasoning underpin pricing, risk, and statistical inference (Phases 7, 11, 13).

We classify relevance honestly - not every Euler problem is a trading application.

Learning mode

Pick how much scaffolding you want. Your choice is remembered per problem.

Scratchpad

Mathematical notes, formulas, pseudocode, hypotheses, complexity notes. Saved automatically with your progress.

Python workbench

Tier C - reduced scale in browser; full scale in notebook
Browser runs a reduced, clearly-labelled educational scale; the original scale is provided in a local notebook.

Real Python (Pyodide) in a sandboxed Web Worker - no network, no filesystem, no DOM access. Ctrl/Cmd+Enter runs. Escape leaves the editor. Stop terminates the worker.

Python runtime not loaded (it boots on first run - a one-time local load).

Check your answer

Answers are checked against a salted hash held in a separate file - not printed in this page. This prevents accidental spoilers; it is not cryptographic protection (see the build notes).

Progressive hints

Confidence

Low confidence schedules this problem for spaced review, even if you solved it.

Reference solution

Spoiler
The complete original explanation (interpretation, naive approach, insight, proof, complexity, Python implementation, tests, common mistakes, alternatives) is hidden and lazy-loaded. Reveal it only after a meaningful attempt - the struggle is where the learning happens.