compute the needed allowed collision matrix