Create a variable for that.
After the collision assign a random value for this variable. Something like
On collision with object > Set var to int(random(10))
After assigning a value for your variable set a condition activating the group you want for different values.
Variable = 0 > Activate group A
variable = 1 > Activate group B
Variable = 2 > Activate group A and B
Hope this helps