  Combinatorial algorithms for minimization of functions of many variables,
which take their values in finite totally ordered sets, are developed. For that
the decomposition of the functions by Boolean polynomials is used. The modified
SFM algorithm for minimization of submodular Boolean polynomials is described.
The representation of some subclass of submodular Boolean polynomials by graphs
is derived in order to make possible use of the graph cut technique.
