implement MIS backtrack with persistent sets