An autonomous car must decide at every moment whether to brake, accelerate, swerve left, swerve right, or do nothing. Otherwise the car is not very autonomous. :)
If it senses an unavoidable collusion ahead, it will need to choose from possible reactions that each have different consequences for the various people and property. Someone has to program or train the car what to value when choosing its reaction. The car will be biased, implicitly or explicitly, by the programmer's values.
If you make the car flip a coin (perhaps a weighted coin, on the strength of the belief in its sensor data), you avoid providing a solution to the trolley problem.
Alternatively, you can have the people vote on a self-driving car referendum, which specifies a DMV-enforced policy for the trolley problem.
As a society we vote on such matters all the time. Nothing new here.
Flipping a coin is still a conscious decision by the programmer.
MIT created an online survey called the Moral Machine asking people to choose who a car should hit in various (randomized and user-created) scenarios. Data like that could be used to train a "fair" AI. It's an interesting thought experiment but the survey's scenarios are unrealistic and include information that a car AI would not have available, e.g. person A is homeless and has no children while person B is a wealthy executive in good health.
If it senses an unavoidable collusion ahead, it will need to choose from possible reactions that each have different consequences for the various people and property. Someone has to program or train the car what to value when choosing its reaction. The car will be biased, implicitly or explicitly, by the programmer's values.