A complementary pivoting approach to graph matching