Added greedy algorithm for initializing matching.