Consistent-labeling problems and their algorithms: Expected complexities and theory-based heuristics