  Observations have revealed that most stars are born in clusters. As these
clusters typically contain more mass in gas than in stars, accretion can play
an important role in determining the final stellar masses. Numerical
simulations of gas accretion in stellar clusters have found that the stars
compete for the available reservoir of gas. The accretion rates are highly
nonuniform and are determined primarily by each star's position in the cluster.
Stars in the centre accrete more gas, resulting in initial mass segregation.
This competitive accretion naturally results in a mass spectrum and is
potentially the dominant mechanism for producing the initial mass function.
Furthermore, accretion on to the core of a cluster forces it to shrink, which
may result in formation of massive stars through collisions.
