Loading video...

Video Failed to Load

Go Home

Can you solve this train delivery optimization challenge? It's a practical application of algorithm design that might be trickier than it first appears.

29,741 views • 1 year ago •via X (Twitter)

9 Comments

Google for Developers's profile picture
Google for Developers1 year ago

Here’s a hint:

Google for Developers's profile picture
Google for Developers1 year ago

The minimum distance for delivering all train cars is 12 units. The optimal delivery plan works by minimizing wasted travel. First, take 10 cars directly to Station C (3 units), then return empty to the depot (3 units). Next, load 10 more cars and deliver 5 to Station C and 5 to Station B along the way (3 units), then return to the depot again but only travel back from Station B (2 units). Finally, take the last 10 cars to Station A (1 unit).

Waigoko Kimengemenge's profile picture
Waigoko Kimengemenge1 year ago

Trip 1. 10 cars to C. Distance = 3+3 including return Trip 2. 5 to B and 5 to C Distance= 6 Trip 3 - 10 to A and back to depot Distance = 2 units Total distance= 6+6+2 =14 CS concepts: Greedy algorithms and maybe combinatorial optimization. Open to corrections

Joseph's profile picture
Joseph1 year ago

1) A 10; 2 units 2) B 5, C 5; 6 units 3) C 10; 6 units Total 12

outofcontext's profile picture
outofcontext1 year ago

@grok solve this please

Ruddy🧩's profile picture
Ruddy🧩1 year ago

I'm not sure of the solution but I can say time complexity, space complexity and race conditions are the most relevant CS concepts here. ( I feel I'm boldly saying the wrong thing😪)

SmartLiveGlow LLC's profile picture
SmartLiveGlow LLC1 year ago

Optimization problems are never just about trains, they’re about choices, constraints, and clarity under pressure. The real challenge? Designing algorithms that think like humans without stumbling over complexity. ✨ SmartLiveGlow™ – Empowering your digital light. By Erya 🕊️ | Founder • Dreamer • Fighter • Author of Free Yourself from the Darkness & The AI Starter Manual 🌐 📧 [email protected] 📚 Free Yourself from the Darkness 📘 The AI Starter Manual #GoogleDevelopers #SmartLiveGlow #AlgorithmDesign #ProblemSolving #DigitalBrains #TechWithSoul

Manwey's profile picture
Manwey1 year ago

Minimum total distance 14 units: - 1st: 10 cars from Depot to C and return to Depot (6 units) - 2nd: 10 cars from Depot to B (5 cars) and from B to C (5 cars) and return to Depot (6 units) - 3rd: 10 cars from Depot to A and return to Depot (2 units)

JPB's profile picture
JPB1 year ago

If I understood correctly, you have to do 2 roundtrips to station C to deliver 10 + 5, that's 6 x 2 = 12. Then you're left with station A with 10, so 2 more, that's a total of 14 units

Related Videos