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.
To find the expected distance from the depot for a given value of n, we can simulate the scenario using Python code. Here’s the approach we’ll take:
1. We’ll iterate over each second until only one drone is left at the depot.
2. At each second, we’ll randomly select a drone and update its speed or position based on its current state.
3. We’ll keep track of the total distance covered by all the drones so far.
4. Once only one drone is left at the depot, we’ll calculate the average distance covered by each drone by dividing the total distance by n.
Here’s the Python code to solve this problem:
“`python
import random
def expected_distance(n):
total_distance = 0
depot = [0] * n
while len(depot) > 1:
drone = random.choice(depot)
if drone == 0:
depot.append(1) # Start moving at 1 cm/s
else:
depot.append(drone + 1) # Increase speed by 1 cm/s
depot.remove(drone)
total_distance += drone # Add distance covered by the selected drone
return round(total_distance / n)
result = expected_distance(10**8)
print(result)
“`
When we run this code, it will simulate the scenario with 10^8 drones and calculate the rounded average distance covered by each drone. This may take some time to run due to the large number of iterations involved.
Note: The `random.choice` function selects a random element from a list. We use it here to randomly select a drone from the depot at each second.
Please note that the output may vary slightly between runs due to the random nature of the problem.
More Answers:
Unpredictable PermutationsHigh Powers of Irrational Numbers
Slowly Converging Series