Reduction of the maximum cut problem in a flow problem for a class of graphs