physics – Finding velocities of circles after a collision

In my program, I have several balls that are assigned a random speed. I would like that after their collision, they "bounce" on each other.

The balls have a mass, a radius, a position (vector) and a speed (vector). I know how to calculate if they collide, as well as the penetration distance, but I am stuck with the part that calculates the new speeds.