A block of mass m moves with a speed v towards the right block in equilibrium with a spring. If the surface is frictionless and collistions are elastic, the frequency of collisions between the masses will be :
2[2Lv+1π√Km]
Time taken to collide on left wall and get back to the mass attached with spring is t1=2Lv
Time to get compressed once and back is, t2=T2=2π2√mK=π√mK
Remember the colliding block will come to rest on exchanging momentum and starts back when the mass connected to spring hits it, on its way back.
So, ν=1t1+t2
And the frequency of collision will be double the frequency of oscillation.
So frequency of collision.2v=2[2Lv+1π√Km]