  We present a detailed and homogeneous analysis of the ROSAT PSPC surface
brightness profiles of 36 clusters of galaxies with high X-ray luminosity (L_X
> 10^{45} erg s^{-1}) and redshifts between 0.05 and 0.44. Using recent ASCA
estimates of the temperature of the gas for most of the clusters in the sample,
we apply both the deprojection technique and model fitting to the surface
brightness profiles to constrain the gas and dark matter distributions under
the assumption that the gas is both isothermal and hydrostatic.
  Applying robust estimators, we find that the gas fraction within r_{500} of
the clusters in our sample has a distribution centred on f_gas(r_{500}) = 0.168
h_{50}^{-1.5}. The gas fraction ranges from 0.101 to 0.245 at the 95 per cent
confidence level. The values of f_gas show highly significant variations
between individual clusters, which may be explained if the dark matter has a
significant baryonic component. Within a cluster, the average radial dependence
of the gas mass fraction increases outward as r^s, with s~0.20. Combining these
results with those of primordial nucleosynthesis calculations and the current
estimate of H_0, the above central location implies \Omega_{0, m} < 0.56 at the
95 per cent confidence level. This upper limit decreases to 0.34 if we take the
highest significant estimates for f_gas.
  A significant decrease in cluster gas fraction with redshift from the local
value, f_{gas, 0}, of 0.21, found assuming \Omega_{0, m} =1, is also reduced if
\Omega_{0, m} is low.
