implement MIS backtrack, including connected components