Within the Wang and Landau scheme any previous knowledge of the density of states is required. One proceeds as follows: the cost function (for example the energy) of the system is discretized. Each time the bin i is reached one updates a histogram for the density of states, g ( i ) , by g ( i ) → → g ( i ) + f where f is called the modification factor. As soon as each bin in the histogram is visited a certain number of times (10-15), the modification factor is reduced by some criterion, for instance, f n + 1 → → 1 2 f n where n denotes the n -th update step. The simulation finishes when the modification factor is less than a certain threshold, for instance f n < 10 − − 8 .