For a number of vehicles moving randomly, would someone suggest a simple algorithm to classify those moving toward the same direction into one group? Which mechanism is suitable to determine the direction of a vehicle with respect to the other? Note that the velocity of all vehicles is given?