  In any valid Monte Carlo sampling that realizes microcanonical property we
can collect statistics for a transition matrix in energy. This matrix is used
to determine the density of states, from which most of the thermodynamical
averages can be calculated, including free energy and entropy. We discuss
single-spin-flip algorithms, such as flat-histogram and equal-hit algorithms,
that can be used for simulations. The flat-histogram algorithm realizes
multicanonical ensemble. We demonstrate the use of the method with applications
to Ising model and show its efficiency of search for spin-glass ground states.
