Dynamics of shock waves in a liquid containing gas bubbles