Treatment of combinatorial optimization problems using selection equations with cost terms. Part II. NP -hard three-dimensional assignment problems