The replica trick is used in determining ground states of statistical mechanical systems, in the mean-field approximation. Typically, for systems in which the determination of ground state is easy, one can analyze fluctuations near the ground state. Otherwise one uses the replica method. An example is the case of a quenched disorder in a system like a spin glass with different types of magnetic links between spins, leading to many different configurations of spins having the same energy.