Proofs: Randomized parallel perfect matching
These are the human proofs of Randomized parallel perfect matching, at full length.
The MVV algorithm returns only perfect matchings and finds one with probability at least 1/2 per trial full
This proof shows: correctness, termination.
Let be a general graph with and . For weights , let be the skew-symmetric matrix with and for each edge with , and 0 elsewhere. For a perfect matching write . For a nonzero integer , is the exponent of 2 in .
Termination. Line L1 runs at most trials, and each trial does a bounded amount of exact arithmetic. So the algorithm stops.
Lemma 1 (only checked output). If the algorithm returns a set , then is a perfect matching of . If has no perfect matching, the algorithm returns "none".
Proof. Line L8 returns only after it checks that and that every vertex is on exactly one edge of . If has no perfect matching, no set passes this check, so line L9 is reached.
Lemma 2 (isolation lemma). Let be a nonempty family of subsets of a finite set with . Choose uniformly and independently from for each . Then the probability that two different sets of both have the least weight is at most .
Proof. Call ambiguous if some set of least weight contains and some set of least weight does not. If two different sets of least weight exist, some element is in one and not in the other, and it is ambiguous. So it is enough to show for each , and then take the union over the elements.
Fix and fix the weights of all other elements. Let be the least weight of a set of that does not contain ( if there is none), and let be the least value of over sets that contain ( if there is none). Neither nor depends on . The least weight of a set containing is . If , every set of least weight contains ; if , none does. So is ambiguous only if , which has probability at most over the choice of . Averaging over the other weights gives the bound.
Lemma 3 (Pfaffian). For a skew-symmetric matrix of even order , , where
the sum over all perfect matchings of the complete graph on , with a sign that depends only on . For odd , . Also, for the cofactor of at is , where is with rows and columns and removed. Finally, the expansion of the Pfaffian along row gives .
These are standard facts about Pfaffians (see Lovász and Plummer, Matching Theory, Chapter 8, and Motwani and Raghavan, Randomized Algorithms, Chapter 12). For odd , .
In our , a product is nonzero only when every pair of is an edge of , so
In the same way, over perfect matchings of . For an edge , the sets are exactly the perfect matchings of that contain , so
Lemma 4 (one isolated matching is read correctly). Suppose has a perfect matching and exactly one perfect matching has the least weight . Then the trial does not stop at lines L4 and L5, , and line L7 computes .
Proof. Every term of (1) other than the term of is with , so it is divisible by . So for an integer , which is times an odd number and is not 0. By Lemma 3, , so and , which is even. Lines L4 and L5 pass, with .
The adjugate entry is the cofactor of at , so by Lemma 3 and (2),
If , the sum contains the term of and all other terms are divisible by , so the sum is , and the whole product is . Divided by , it is an odd integer, and line L7 puts in . If , every perfect matching that contains has weight at least , so the sum is divisible by (it may be 0). The product is divisible by , and divided by it is an even integer, so line L7 does not put in . So .
Theorem. A set returned by the algorithm is a perfect matching of , and "none" is returned whenever has no perfect matching. If has a perfect matching, each trial returns one with probability at least , so the algorithm returns "none" with probability at most .
Proof. The first two claims are Lemma 1. Suppose has a perfect matching, so or . If , the empty matching passes line L8 in the first trial, as of the empty matrix is 1 and . Otherwise apply Lemma 2 to , the perfect matchings of , and : with probability at least the least-weight perfect matching is unique. Then by Lemma 4 line L7 computes , which passes line L8. The trials use independent weights, so all fail with probability at most .