  We study the classical 1D Heisenberg spin glasses. Based on the Hamilton
equations we obtained the system of recurrence equations which allows to
perform node-by-node calculations of a spin-chain. It is shown that
calculations from first principles of classical mechanics lead to NP hard
problem, that however in the limit of the statistical equilibrium can be
calculated by P algorithm. For the partition function of the ensemble a new
representation is offered in the form of one-dimensional integral of
spin-chains' energy distribution.
