solves the maximum matching problem
minimal vertex cover function yet to be fixed, everything else works fine