The propagation of a shock wave of finite strength due to an explosion into inhomogeneous nongravitating and self-gravitating systems has been considered, using similarity principles, supposing that the density varies as an inverse power of distance from the centre of explosion. A large number of systems, characterised by different density exponents and different adiabatic coefficients of the gas have been considered for different shock strengths. The numerical integration from the shock inward has been continued to the surface of singularity where density tends to infinity and which acts like a piston in the self-gravitating case and to the surface where the velocity gradient tends to infinity in the nongravitating case. The effect of vari...