  We investigate the assembly of groups and clusters of galaxies using the
Millennium dark matter simulation and the associated gas simulations and
semi-analytic catalogues of galaxies. In particular, in order to find an
observable quantity that could be used to identify early-formed groups, we
study the development of the difference in magnitude between their brightest
galaxies to assess the use of magnitude gaps as possible indicators. We select
galaxy groups and clusters at redshift z=1 with dark matter halo mass M(R200) >
1E13/h Msun, and trace their properties until the present time (z=0). We
consider only the systems with X-ray luminosity L_X> 0.25E42/h^2 erg/s at z=0.
While it is true that a large magnitude gap between the two brightest galaxies
of a particular group often indicates that a large fraction of its mass was
assembled at an early epoch, it is not a necessary condition. More than 90% of
fossil groups defined on the basis of their magnitude gaps (at any epoch
between 0<z<1) cease to be fossils within 4 Gyr, mostly because other massive
galaxies are assembled within their cores, even though most of the mass in
their haloes might have been assembled at early times. We show that, compared
to the conventional definition of fossil galaxy groups based on the magnitude
gap Delta m(12)> 2 (in the R-band, within 0.5R200 of the centre of the group),
an alternative criterion Delta m(14)>2.5 (within the same radius) finds 50%
more early-formed systems, and those that on average retain their fossil phase
longer. However, the conventional criterion performs marginally better at
finding early-formed groups at the high-mass end of groups. Nevertheless, both
criteria fail to identify a majority of the early-formed systems.
