  It is shown how information contained in the pairwise correlations (in
general, partial) between atoms of a gas can be used to completely convert heat
taken from a thermostat into mechanical work in a process of relaxation of the
system to its thermal equilibrium state. Both classical correlations and
quantum correlations (entanglement) are considered. The amount of heat
converted into work is proportional to the entropy defect of the initial state
of the system. For fully correlated particles, in the case of entanglement the
amount of work obtained per particle is twice as large as in the case of
classical correlations. However, in the case of entanglement, the amount of
work does not depend on the degree of correlation, in contrast to the case of
classical correlations. The results explicitly demonstrate the equivalence
relation between information and work for the case of two-particle
correlations.
