With two labels:
classical min-cut problem
Solvable
by standard network flow algorithms
polynomial
time in theory, nearly linear in practice
More than 2 labels: NP-hard [Dahlhaus et al., STOC
92]
But
efficient approximation algorithms exist
Within
a factor of 2 of optimal
Computes
local minimum in a strong sense
»even
very large moves will not improve the energy
Basic
idea
reduce
to a series of 2-way-cut sub-problems, using one of:
»swap
move: pixels with label l1 can change
to l2, and vice-versa
»expansion
move: any pixel can change its label
to l1