For any two adjacent sites i , j ∈ ∈ Λ Λ there is an interaction J i j . Also a site j ∈ ∈ Λ Λ has an external magnetic field h j interacting with it. The energy of a configuration σ σ is given by the Hamiltonian function