Variable-state multi-label submodular discrete optimization