  Valued constraint satisfaction problems (VCSPs) are discrete optimisation
problems with a $(\mathbb{Q}\cup\{\infty\})$-valued objective function given as
a sum of fixed-arity functions. In Boolean surjective VCSPs, variables take on
labels from $D=\{0,1\}$ and an optimal assignment is required to use both
labels from $D$. Examples include the classical global Min-Cut problem in
graphs and the Minimum Distance problem studied in coding theory.
  We establish a dichotomy theorem and thus give a complete complexity
classification of Boolean surjective VCSPs with respect to exact solvability.
Our work generalises the dichotomy for $\{0,\infty\}$-valued constraint
languages (corresponding to surjective decision CSPs) obtained by Creignou and
H\'ebrard. For the maximisation problem of $\mathbb{Q}_{\geq 0}$-valued
surjective VCSPs, we also establish a dichotomy theorem with respect to
approximability.
  Unlike in the case of Boolean surjective (decision) CSPs, there appears a
novel tractable class of languages that is trivial in the non-surjective
setting. This newly discovered tractable class has an interesting mathematical
structure related to downsets and upsets. Our main contribution is identifying
this class and proving that it lies on the borderline of tractability. A
crucial part of our proof is a polynomial-time algorithm for enumerating all
near-optimal solutions to a generalised Min-Cut problem, which might be of
independent interest.
