  We present observational evidence of the correlation between the high-mass
slope of the stellar initial mass function (IMF) in young star clusters and
their stellar surface density, $\sigma_{*}$. When the high-mass end of the IMF
is described by a power law of the form $dN/d{\rm log}{M_{*}}\propto
M_{*}^{-\Gamma}$, the value of $\Gamma$ is seen to weakly decrease with
increasing $\sigma_{*}$, following a $\Gamma=1.31~\sigma_{*}^{-0.095}$
relation. We also present a model that can explain these observations. The
model is based on the idea that the coalescence of protostellar cores in a
protocluster forming clump is more efficient in high density environments where
cores are more closely packed. The efficiency of the coalescence process is
calculated as a function of the parental clump properties and in particular the
relation between its mass and radius as well as its core formation efficiency.
The main result of this model is that the increased efficiency of the
coalescence process leads to shallower slopes of the IMF in agreement with the
observations of young clusters, and the observations are best reproduced with
compact protocluster forming clumps. These results have significant
implications for the shape of the IMF in different Galactic and extragalactic
environments and have very important consequences for galactic evolution.
