dealWithLabelSwitching function

Apply label switching algorithms