Back to problems

Detect earliest collision among moving cars

Algorithm · Meta · Hard

Consider a set of $$n$$ vehicles moving in continuous time. A collision occurs when two vehicles occupy the same position at the same instant. Part A: One-Dimensional Motion with Constant Acceleration Each vehicle is a point moving on a line. Vehicle $$i$$ starts at x0[i], has initial velocity v0[i], and keeps a constant acceleration a[i]. Its position at time $$t$$ is $$x_i(t) = x0[i] + v0[i]\,t + \frac{1}{2}\,a[i]\,t^2.$$ Find the earliest time $$t^* \ge 0$$ at which any…

Checking your access…