Skip to main content
Log in

A detailed introduction to a minimum-cost perfect matching algorithm based on linear programming

  • Published:
Journal of Combinatorial Optimization Aims and scope Submit manuscript

Abstract

Full technical details for a slightly simplified version of the minimum weight perfect matching via blossom belief propagation by Ahn, Park, Chertkov and Shin (in Advances in neural information processing systems, vol 28, Curran Associates, Inc., 2015) are provided. An example showing the necessity of a certain uniqueness assumption is given. An alternative to perturbing the edge weights to ensure the uniqueness assumption is satisfied is suggested.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Data availability

This work did not generate any data.

References

Download references

Funding

The work was supported by the Dean’s Summer Research Internship at Carleton University and a internal grant from Carleton University.

Author information

Authors and Affiliations

Authors

Contributions

The first author contributed to most of the writing of the manuscript and the second author contributed to most of the research on which the manuscript is based. Both authors read and approved the final manuscript.

Corresponding author

Correspondence to Kyel Governor.

Ethics declarations

Conflict of interest

The authors have no relevant financial or non-financial interests to disclose.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

A Illustrative example for Algorithm 1

A naive implementation of Algorithm 1 solving the example below is publically available at https://github.com/kgovernor/BlossomLP_ex (Figs. 7, 8 and 9).

Fig. 7
figure 7

Iteration 1. Red edges have value 1, blue edges have value \(\frac{1}{2}\), and gray edges have value 0

Fig. 8
figure 8

Iterations 2 and 3

Fig. 9
figure 9

Iterations 4 and 5

B Illustrative examples for Algorithm 2

The following figures illustrate the outcomes of the cases entered through line 5, line 9, or line 14 of Algorithm 2 (Figs. 10, 11 and 12).

Numbers next to the edges denote edge weights. The entries of y are given by the number next to the vertices (for example, in the left-most figure in Fig. 10, we have \(y_{\delta (\{g,h,i\})}=y_{\delta (k)} = y_{\delta (\{l,m,n\})}= y_{\delta (a)}=y_{\delta (b)}=y_{\delta (c)}=1\), \(y_{\delta (j)}=2\), and \(y_{\delta (\{d,e,f\})}= 0\)) as well as \(y_{\delta (d)}=y_{\delta (e)}=y_{\delta (f)}=y_{\delta (g)}=y_{\delta (h)} =y_{\delta (i)}=y_{\delta (l)}=y_{\delta (m)}=y_{\delta (n)}=1.\) Dashed lines denote non-tight edges and all the other edges are tight.

Each shaded circle denotes the root of T. Each blue circle denotes a node in \(V^-(T)\). Each red circle denotes a node in \(V^+(T)\). Each thick black or red double line denotes an edge in T.

Solid blue, red and gray lines correspond to values specified in Appendix A. Thus, red lines denote edges in M and blue lines denote edges in an odd cycle in \(\mathscr {C}\).

Through line 5:

Fig. 10
figure 10

Outcome of line 7 in Algorithm 2

Through line 12:

Fig. 11
figure 11

Outcome of line 12 in Algorithm 2

Through line 13:

Fig. 12
figure 12

Outcome of line 18 in Algorithm 2

C Proofs

We begin with a few intermediate results before giving the proofs for results stated in the main body of the paper.

Proposition C1

If \(S,T\subseteq V(G)\) are disjoint, then \((G/S)/T = (G/T)/S\).

Proof

By definition, \(V(G/S) = (V(G) {\setminus } S) \cup \{S\}\). Since S and T are disjoint, \(T \subseteq V(G) \setminus S\). Hence, \(V((G/S)/T) = \left( V(G) {\setminus } \{S\cup T\}\right) \cup \{S,T\}).\) By symmetry, we also have \(V((G/T)/S) = \left( V(G) {\setminus } \{S\cup T\}\right) \cup \{S,T\}).\) Hence, \(V((G/S)/T) = V((G/T)/S)\).

To complete the proof, it suffices to show that every edge of (G/S)/T is also an edge of (G/T)/S having the same ends. To this end, take an edge e of (G/S)/T. If its ends are S and T, then e is an edge of G with ends \(u \in S\) and \(v \in T\), implying that e is an edge of (G/T)/S with ends S and T as well.

If none of the ends of e is in \(\{S,T\}\), then e is an edge of G with none of the ends in \(S\cup T\), implying that e is an edge of (G/T)/S with the same ends.

If one of the ends of e is S but the other end is \(v \notin T\), then e is an edge of G/T with one end in S and the other end equal to \(v \notin S\cup T\), implying that e is an edge of (G/T)/S with ends S and v.

Finally, if one of the ends of e is T but the other end is \(u \notin S\), then e is an edge of G/T with one end equal to T and the other end equal to \(u \notin S\cup T\), implying that e is an edge of (G/T)/S with ends T and u.

In any case, we have that e is an edge of (G/T)/S with the same ends as in (G/S)/T as desired. \(\square \)

Lemma C1

Let \(e \in E(G)\) having ends u and v.

  1. (i)

    If \(u,v \notin \bigcup \mathscr {L}^\textsf{max}\), then \(e \in E(G/\mathscr {L})\) having ends u and v.

  2. (ii)

    If \(u \in S\) for some \(S\in \mathscr {L}^\textsf{max}\) and \(v \notin \bigcup \mathscr {L}^\textsf{max}\) and \(u \in S\), then \(e \in E(G/\mathscr {L})\) having ends \({\text {con}}_\mathscr {L}(S)\) and v.

  3. (iii)

    If \(u \in S\) and \(v \in T\) for distinct \(S,T \in \mathscr {L}^\textsf{max}\), then \(e \in E(G/\mathscr {L})\) having ends \({\text {con}}_\mathscr {L}(S)\) and \({\text {con}}_\mathscr {L}(T)\).

  4. (iv)

    If \(u,v \in S\) for some \(S \in \mathscr {L}^\textsf{max}\), then \(e \notin E(G/\mathscr {L})\).

Proof

We proceed by induction on \(|\mathscr {L}|\). The statements hold vacuously when \(|\mathscr {L}| = 0\). Assume that \(|\mathscr {L}| \ge 1\).

Suppose that \(u,v \notin \bigcup \mathscr {L}^\textsf{max}\). Take \(S \in \mathscr {L}^\textsf{max}\). Let \(\bar{\mathscr {L}} = \mathscr {L}{\setminus } \{S\}\). Note that \(u,v \notin \bigcup \bar{\mathscr {L}}^\textsf{max}\). It follows from the induction hypothesis that \(e \in E(G/\bar{\mathscr {L}})\) having ends u and v. Since \(G = (G/\bar{\mathscr {L}})/{\text {con}}_\mathscr {L}(S)\) and \(u,v \notin S\), we have that \(e \in E(G/\mathscr {L})\) having ends u and v. This proves (i).

Suppose that \(S \in \mathscr {L}^\textsf{max}\) contains \(u \in S\) and \(v \notin \bigcup \mathscr {L}^\textsf{max}\), Let \(\bar{\mathscr {L}} = \mathscr {L}{\setminus } \{S\}\). By the induction hypothesis, if \(u \notin \bigcup \bar{\mathscr {L}}^\textsf{max}\), then \(e \in E(G/\bar{\mathscr {L}})\) having ends u and v. Otherwise, if \(u \in S' \in \bar{\mathscr {L}}^\textsf{max}\), then \(e \in E(G/\bar{\mathscr {L}})\) having ends \({\text {con}}_{\bar{\mathscr {L}}}(S')\) and v. In either case, e has one end in \({\text {con}}_\mathscr {L}(S)\) the one end equal v which is not in \({\text {con}}_\mathscr {L}(S)\). Since \(G/\mathscr {L}= (G/\bar{\mathscr {L}})/{\text {con}}_\mathscr {L}(S)\), we have that \(e \in E(G/\mathscr {L})\) having ends \({\text {con}}_\mathscr {L}(S)\) and v. This proves (ii). The proof for (iii) is similar and is omitted.

Finally, suppose that \(u,v \in S\) for some \(S \in \mathscr {L}^\textsf{max}\). Let \(\bar{\mathscr {L}} = \mathscr {L}\setminus \{S\}\). If \(u,v \in T\) for some \(T \in \bar{\mathscr {L}}^\textsf{max}\), then e is not an edge in \(G/\bar{\mathscr {L}}\) and therefore not an edge in \(G/\mathscr {L}\). Otherwise, by the induction hypothesis, e is an edge in \(G/\bar{\mathscr {L}}\) having both ends in \({\text {con}}_\mathscr {L}(S)\). Since \(G/\mathscr {L}= (G/\bar{\mathscr {L}})/{\text {con}}_\mathscr {L}(S)\), e is not an edge in \(G/\mathscr {L}\). This proves (iv). \(\square \)

Proposition 1. The graph \(G/\mathscr {L}\) is unique and thus well-defined.

Proof

The proof is by induction on \(|\mathscr {L}|\). When \(|\mathscr {L}| = 0\), the graph \(G/\mathscr {L}\) is simply G and is uniquely determined.

Assume that \(|\mathscr {L}| \ge 1\). If there is a unique \(S \in \mathscr {L}^\textsf{max}\), then \(G/\mathscr {L}\) is given by \((G/\left( \mathscr {L}{\setminus } \{S\}\right) ) / {\text {con}}_{\mathscr {L}}(S)\) which is unique since \(G/\left( \mathscr {L}\setminus \{S\}\right) \) is unique by the induction hypothesis.

Suppose that there exist distinct \(S_1, S_2 \in \mathscr {L}^\textsf{max}\). Let \(\mathscr {L}' = \mathscr {L}\setminus \{S_1,S_2\}\). We show that

$$\begin{aligned} (G/(\mathscr {L}'\cup \{S_1\}))/{\text {con}}_{\mathscr {L}}(S_2) = (G/(\mathscr {L}'\cup \{S_2\}))/{\text {con}}_{\mathscr {L}}(S_1). \end{aligned}$$

By the induction hypothesis, \(G/\mathscr {L}'\) is unique. Let \(G' = G/{\mathscr {L}'}\). Since \(S_1\) and \(S_2\) are disjoint, it follows that \({\text {con}}_{\mathscr {L}}(S_i) = {\text {con}}_{\mathscr {L}'\cup \{S_i\}}(S_i)\) for \(i = 1,2\). Hence,

$$\begin{aligned} (G/(\mathscr {L}'\cup \{S_1\}))/{\text {con}}_{\mathscr {L}}(S_2)&= G'/{\text {con}}_{\mathscr {L}'\cup \{S_1\}}(S_1)/{\text {con}}_{\mathscr {L}}(S_2) \\&= G'/{\text {con}}_{\mathscr {L}}(S_1)/{\text {con}}_{\mathscr {L}}(S_2) \end{aligned}$$

and

$$\begin{aligned} (G/(\mathscr {L}'\cup \{S_2\}))/{\text {con}}_{\mathscr {L}}(S_1)&= G'/{\text {con}}_{\mathscr {L}'\cup \{S_2\}}(S_2)/{\text {con}}_{\mathscr {L}}(S_1) \\&= G'/{\text {con}}_{\mathscr {L}}(S_2)/{\text {con}}_{\mathscr {L}}(S_1). \end{aligned}$$

The result now follows since \(G'/{\text {con}}_{\mathscr {L}}(S_1)/{\text {con}}_{\mathscr {L}}(S_2) = G'/{\text {con}}_{\mathscr {L}}(S_2)/{\text {con}}_{\mathscr {L}}(S_1)\) by Proposition C1. \(\square \)

Proposition 2.

$$\begin{aligned} V(G/\mathscr {L}) = \left( V(G) \setminus \bigcup \mathscr {L}^\textsf{max}\right) \cup \{ {\text {con}}_\mathscr {L}(S): S \in \mathscr {L}^\textsf{max}\}. \end{aligned}$$

Proof

The proof is by induction on \(|\mathscr {L}|\).

The statement clearly holds when \(|\mathscr {L}| = 0\).

Suppose that \(|\mathscr {L}| \ge 1\). Let \(S \in \mathscr {L}^\textsf{max}.\) With \(G' = G/(\mathscr {L}{\setminus } \{S\})\), we have \(G/\mathscr {L}= G'/{\text {con}}_\mathscr {L}(S)\). Let \(\bar{\mathscr {L}} = \mathscr {L}\setminus \{S\}\).

By the induction hypothesis,

$$\begin{aligned} V(G') = (V(G)\setminus \bigcup \bar{\mathscr {L}}^\textsf{max})\cup \{ {\text {con}}_{\bar{\mathscr {L}}}(U): U \in \bar{\mathscr {L}}^\textsf{max}\}. \end{aligned}$$

Hence,

$$\begin{aligned} V(G/\mathscr {L})&= V(G'/{\text {con}}_\mathscr {L}(S)) \\&= \left( V(G') \setminus {\text {con}}_\mathscr {L}(S)\right) \cup \{{\text {con}}_\mathscr {L}(S)\} \\&= \left( \left( (V(G)\setminus \bigcup \bar{\mathscr {L}}^\textsf{max})\cup \{ {\text {con}}_{\bar{\mathscr {L}}}(U) : U \in \bar{\mathscr {L}}^\textsf{max}\}\right) \setminus {\text {con}}_\mathscr {L}(S)\right) \cup \{{\text {con}}_\mathscr {L}(S)\} \\&= \left( (V(G)\setminus \bigcup \mathscr {L}^\textsf{max})\cup \{{\text {con}}_{\bar{\mathscr {L}}}(U) : U \in \bar{\mathscr {L}}^\textsf{max} \setminus \mathscr {L}\vert _S^\textsf{max}\}\right) \cup \{{\text {con}}_\mathscr {L}(S)\} \\&= \left( V(G) \setminus \bigcup \mathscr {L}^\textsf{max}\right) \cup \{ {\text {con}}_\mathscr {L}(S) : S \in \mathscr {L}^\textsf{max}\} \end{aligned}$$

as desired. \(\square \)

Proposition 4. Let \(u \in V(G/\mathscr {L})\). Then \(\delta _{G/\mathscr {L}}(u) = \delta _G({\text {fl}}_\mathscr {L}(u))\).

Proof

We proceed by induction on \(|\mathscr {L}|\). The statement clearly holds when \(|\mathscr {L}| = 0\). Assume that \(|\mathscr {L}| \ge 1\).

Suppose that \(u \in V^\textsf{orig}(G/\mathscr {L})\). By Proposition 2, \(u \notin \bigcup \mathscr {L}^\textsf{max}\). By Lemma C1, every edge in \(G/\mathscr {L}\) having u as an end must come from an edge in G with u as an end. Conversely, any edge in G with u as an end does end up being an edge in \(G/\mathscr {L}\) with u as an end. Hence, \(\delta _{G/\mathscr {L}}(u) = \delta _G(u)\).

Suppose that \(u \in V^\textsf{pseudo}(G/\mathscr {L})\). Let \(S = {\text {con}}_\mathscr {L}^{-1}(u)\). Note that \(S = {\text {fl}}_\mathscr {L}(u)\). By Lemma C1, every edge in \(G/\mathscr {L}\) having \({\text {con}}_\mathscr {L}(S)\) as an end must come from an edge in G having an end in S and the other not in S. Conversely, any edge in G having an end in S and the other does end up being an edge in \(G/\mathscr {L}\) with \({\text {con}}_\mathscr {L}(S)\) as an end. Hence, \(\delta _{G/\mathscr {L}}(u) = \delta _G(S)\) as desired. \(\square \)

Proposition 5. Let \(\mathscr {L}\) be a factor-critical family. Suppose that C is an odd cycle in \(G' = G/\mathscr {L}\). Then \(\mathscr {L}' = \mathscr {L}\cup \{{\text {fl}}_\mathscr {L}(V(C))\}\) is also a factor-critical family such that \(G'/V(C) = G/\mathscr {L}'\).

Proof

Let \(U = V(C) \cap V^\textsf{pseudo}(G')\). By Proposition 2, there exist \(S_1,\ldots ,S_k \in \mathscr {L}^\textsf{max}\) such that \(U = \{ {\text {con}}_\mathscr {L}(S_1),\ldots ,{\text {con}}_\mathscr {L}(S_k)\}\). Let \(S = {\text {fl}}_\mathscr {L}(V(C))\). Then,

$$\begin{aligned} |S|&= |V(C) \setminus U| + \sum _{i=1}^k |S_i| \\&\equiv |V(C)| - k + \sum _{i=1}^k 1 \pmod {2} \\&\equiv |V(C)| \pmod {2} \\&\equiv 1 \pmod {2}. \end{aligned}$$

It follows that \(S \in \mathscr {O}\). Clearly, \(S \in {\mathscr {L}'}^\textsf{max}\). Hence, by definition, \(G/\mathscr {L}' = (G/\mathscr {L})/{\text {con}}_{\mathscr {L}'}(S) = G'/V(C).\)

Finally, we show that S is \(\mathscr {L}'\)-factor-critical.

Let \(u \in S\). Suppose that \(u \in S_t\) for some \(t \in \{1,\ldots ,k\}\). Let M be a matching in C missing just the pseudovertex \({\text {con}}_\mathscr {L}(S_t)\). Then M is a matching in G covering exactly one vertex in each \(S_i\) for all \(i \ne t\). Since \(S_i\) is \(\mathscr {L}\)-factor-critical for \(i = 1,\ldots ,k,\) we can extend M to an \((S\setminus \{u\}, \mathscr {L})\)-perfect matching.

Now, suppose that \(u \notin \displaystyle \bigcup _{i=1}^k S_i\). Let M be a matching in C missing just u. Then M is a matching in G covering exactly one vertex in each \(S_i\). Since \(S_i\) is \(\mathscr {L}\)-factor-critical for \(i = 1,\ldots ,k,\) we can again extend M to an \((S\setminus \{u\}, \mathscr {L})\)-perfect matching. \(\square \)

Lemma 1. At line 5in each iteration of Algorithm 1, there exists a factor-critical laminar family \(\mathscr {L}\) such that the following hold:

  1. (i)

    \(G' = G/\mathscr {L}\);

  2. (ii)

    \(\mathscr {F}{\setminus } \mathscr {V}(G) = \{ \delta _G(U): U \in \mathscr {L}{\setminus } \mathscr {L}^\textsf{max}\}\);

  3. (iii)

    \(\mathscr {F}\cap \mathscr {V}(G) = \{\delta _G(u): u \in V(G) \setminus V^\textsf{orig}(G')\}\).

Proof

We prove by induction on the number of iterations.

In the first iteration, we have \(G' = G\) and so we can set \(\mathscr {L}= \emptyset \) which is trivially a factor-critical laminar family. Hence, (i) follows. Since \(\mathscr {F}= \emptyset \), (ii) and (iii) also follow.

Assume that \(G' = G/\mathscr {L}\) at the beginning of a later iteration where \(\mathscr {L}\) is a factor-critical laminar family such that \(\mathscr {F}{\setminus } \mathscr {V}(G) = \{ \delta _G(U): U \in \mathscr {L}{\setminus } \mathscr {L}^\textsf{max}\}\) and that \(\mathscr {F}\cap \mathscr {V}(G) = \{\delta _G(u): u \in V(G) {\setminus } V^\textsf{orig}(G')\}\). We show that if the algorithm does not enter line 26, then at the end of the iteration, (i)–(iii) hold.

Suppose that the condition in line 13 is satisfied. Let \(\bar{\mathscr {L}} = \mathscr {L}\setminus {\text {fl}}_\mathscr {L}(S)\). After \(G'\) is modified by expanding S, we have \(G' = G/\bar{\mathscr {L}}\) and \(\mathscr {F}\cap \mathscr {V}(G) = \{\delta _G(u): u \in \left( V(G){\setminus } V^\textsf{orig}(G')\right) \cup \left( V(G) \cap S\right) \}\). Since \(\delta _{G'}(u)\) is removed from \(\mathscr {F}\) for all \(u \in S\), at the end of the iteration, we have \(\mathscr {F}\cap \mathscr {V}(G) = \{\delta _G(u): u \in V(G)\setminus V^\textsf{orig}(G')\}\), thus proving (iii).

Note that \(\bar{\mathscr {L}}\) is a factor-critical family since \({\text {fl}}_\mathscr {L}(S) \in \mathscr {L}^\textsf{max}\) by Corollary 1. As \({\text {con}}_{\bar{\mathscr {L}}}(U) \in V^\textsf{pseudo}(G')\) for all \(U \in \bar{\mathscr {L}}^\textsf{max}\), we see that

$$\begin{aligned} \{\delta _G(U) : U \in \bar{\mathscr {L}} \setminus \bar{\mathscr {L}}^\textsf{max} \}&= \{\delta _G(U) : U \in \mathscr {L}\setminus \left( \mathscr {L}^\textsf{max} \cup \mathscr {L}\vert _S^\textsf{max} \right) \} \\&=\mathscr {F}\setminus \mathscr {V}(G) \setminus \{\delta _G(U) : U \in \mathscr {L}\vert _S^\textsf{max} \} \\&=\mathscr {F}\setminus \mathscr {V}(G) \setminus \{\delta _G(U) : U \in \bar{\mathscr {L}}^\textsf{max},\ U\subseteq S \} \\&=\mathscr {F}\setminus \mathscr {V}(G) \setminus \{\delta _{G'}(u) : u \in S \cap V^\textsf{pseudo}(G')\} \\&=\mathscr {F}\setminus \mathscr {V}(G) \setminus \{\delta _{G'}(u) : u \in S \} \end{aligned}$$

since \(\{\delta _{G'}(u): u \in S{\setminus } V^\textsf{pseudo}(G')\} \subseteq \mathscr {V}(G)\). Hence, after the completion of line 15, \(\mathscr {F}\) satisfies \(\mathscr {F}{\setminus } \mathscr {V}(G) = \{\delta _G(U): U \in \bar{\mathscr {L}} {\setminus } \bar{\mathscr {L}}^\textsf{max}\}.\) It follows that setting \(\mathscr {L}\) to \(\bar{\mathscr {L}}\), (i) and (ii) hold at the end of the iteration.

Suppose that the condition in line 17 is satisfied. Let \(\bar{\mathscr {L}} = \mathscr {L}\cup \{{\text {fl}}_\mathscr {L}(V(C))\}\). By Proposition 5, \(\bar{\mathscr {L}}\) is a factor-critical family. Now,

$$\begin{aligned} \{\delta _G(U) : U \in \bar{\mathscr {L}} \setminus \bar{\mathscr {L}}^\textsf{max} \}&= \{\delta _G(U) : U \in \left( \mathscr {L}\setminus \mathscr {L}^\textsf{max}\right) \cup \bar{\mathscr {L}}\vert _{V(C)}^\textsf{max}\} \\&=\mathscr {F}\setminus \mathscr {V}(G) \cup \{\delta _G(U) : U \in \bar{\mathscr {L}}\vert _{V(C)}^\textsf{max} \} \\&=\mathscr {F}\setminus \mathscr {V}(G) \cup \{\delta _G(U) : U \in \mathscr {L}^\textsf{max},\ U\subseteq {V(C)} \} \\&=\mathscr {F}\setminus \mathscr {V}(G) \cup \{\delta _{G'}(u) : u \in V(C)\cap V^\textsf{pseudo}(G')\} \end{aligned}$$

Since \(\mathscr {F}\) is modified by adding \(\delta _{G'}(u)\) for each \(u \in V(G)\), after setting \(\mathscr {L}\) to \(\bar{\mathscr {L}}\), we see that at the end of the iteration, (i)–(iii) hold. \(\square \)

Lemma 2. The output at termination of Algorithm 2is correct.

Proof

If the algorithm terminates in line 22, then the condition in line 20 guarantees that \(S = V^-(T) \subseteq V^\textsf{orig}(G')\) and has cardinality is one less than \(|V^+(T)|\). Since each vertex in \(V^+(T)\) is an odd component in \(G'\setminus S\), the output is correct.

Otherwise, the algorithm terminates with a pair \(\bar{x}, \bar{y}\). Clearly, \(\bar{x} \ge 0\). If \(\bar{x}\) is formed in either line 12 or line 18, then \(\bar{x}(\delta (v)) = 1\) for all \(v \in V(G')\) and thus \(\bar{x} \in \Xi _{G'}\). If \(\bar{x}\) is formed in line 7, then \(\bar{x}(\delta (S)) = 2 > 1\) and \(\bar{x}(\delta (v)) = 1\) for all \(v \in V(G')\) with \(v \ne S\). Again, \(\bar{x} \in \Xi _{G'}\) and we also have \(\bar{y}_{\delta (v)} = 0\) because executing line 7 requires that the condition in line 5 be satisfied.

Observe that \(\bar{y}_{\delta (v)} \ge 0\) if \(v \in V^\textsf{pseudo}(G')\) since \(\delta (v) = \delta _G({\text {fl}}(v)) \in \mathscr {D}(G)\) by Proposition 4 and line 24 never allows \(y_F\) to become negative if \(F \in \mathscr {D}\).

Let \(y'\) denote the \(y'\) at termination. For each \(e \in E(G')\), we have

$$\begin{aligned} \sum _{F \in \mathscr {V}(G) \cup \mathscr {D}(G): e \in F} y'_F \le w_e \end{aligned}$$

if and only if

$$\begin{aligned} \sum _{F \in \mathscr {V}(G'):e \in F} y'_F \le w_e - \sum _{F \in \mathscr {V}(G)\cup \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F \end{aligned}$$

since the algorithm does not change \(y_F\) if \(F \notin \mathscr {V}(G')\) according to the observation. Note that one of these inequalities holds with equality if and only if the other does. Because of line 24 guarantees that \(y'\) is feasible to  D(G), we have

$$\begin{aligned} \sum _{F \in \mathscr {V}(G) \cup \mathscr {D}(G): e \in F} y'_F \le w_e \end{aligned}$$

and hence

$$\begin{aligned} \sum _{F \in \mathscr {V}(G'):e \in F} y'_F \le w_e - \sum _{F \in \mathscr {V}(G)\cup \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F, \end{aligned}$$

implying that

$$\begin{aligned} \sum _{F \in \mathscr {V}(G'):e \in F} \bar{y}_F \le w_e - \sum _{F \in \mathscr {V}(G)\cup \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F. \end{aligned}$$

Finally, since the algorithm works with only tight edges when modifying M and \(\mathscr {C}\), if \(\bar{x}_e > 0\), then \(\displaystyle \sum _{F \in \mathscr {V}\cup \mathscr {D}: e \in F} y'_F = w_e\), implying that

$$\begin{aligned} \sum _{F \in \mathscr {V}(G'):e \in F} \bar{y}_F = \sum _{F \in \mathscr {V}(G'):e \in F} y'_F = w_e - \sum _{F \in \mathscr {V}(G)\cup \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F. \end{aligned}$$

\(\square \)

Lemma 3. If \((\mathscr {L}, y, M, \mathscr {C}_{aux}, T)\) is a configuration for Gw compatible with line 32of Algorithm 1, then

$$\begin{aligned} \displaystyle \sum _{F \in \mathscr {F}:e \in F} y_F = \displaystyle \sum _{F \in \mathscr {V}(G)\cup \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F. \end{aligned}$$

Proof

Since y is an \(\mathscr {L}\)-critical dual solution, we have that \(y_F = 0\) for all \(F \in \mathscr {D}(G) {\setminus } \{ \delta (S):S \in \mathscr {L}{\setminus } \mathscr {L}^\textsf{max} \}.\) In particular, \(y_F = 0\) for all \(F \in \{\delta (S):S \in \mathscr {L}^\textsf{max} \}\). Let \(\mathscr {V}_p = \{ \delta (u): u \in V^\textsf{pseudo}(G')\}\). Then \(\mathscr {V}_p=\{\delta (S): S \in \mathscr {L}^\textsf{max}\}\). Hence, \(y_F = 0\) for all \(F \in \mathscr {V}_p\). Since \(\mathscr {D}(G) \setminus \mathscr {V}(G') = \mathscr {D}(G) \setminus \mathscr {V}_p\), we have that

$$\begin{aligned} \sum _{F \in \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F&= \sum _{F \in \mathscr {D}(G) \setminus \mathscr {V}_p:e \in F} y_F+ \sum _{F \in \mathscr {V}_p:e \in F} y_F \\&= \sum _{F \in \mathscr {D}(G) :e \in F} y_F \\&= \sum _{F \in \{ \delta (S) :S \in \mathscr {L}\setminus \mathscr {L}^\textsf{max} \} :e \in F} y_F&= \sum _{F \in \mathscr {F}\setminus \mathscr {V}(G):e \in F} y_F \end{aligned}$$

by property (iii) of the definition of compatibility.

By (iii) of Lemma 1, we have that \(\mathscr {F}\cap \mathscr {V}(G) = \{\delta _G(U): U \in V(G){\setminus } V^\textsf{orig}(G')\} = \mathscr {V}(G) {\setminus } \mathscr {V}(G')\). Thus,

$$\begin{aligned} \sum _{F \in \mathscr {V}(G)\cup \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F&= \sum _{F \in \mathscr {V}(G)\setminus \mathscr {V}(G'):e \in F} y_F + \sum _{F \in \mathscr {D}(G) \setminus \mathscr {V}(G'):e \in F} y_F \\&= \sum _{F \in \mathscr {F}\cap \mathscr {V}(G):e \in F} y_F \sum _{F \in \mathscr {F}\setminus \mathscr {V}(G):e \in F} y_F \\&= \sum _{F \in \mathscr {F}:e \in F} y_F \end{aligned}$$

as desired. \(\square \)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Cheung, K.K.H., Governor, K. A detailed introduction to a minimum-cost perfect matching algorithm based on linear programming. J Comb Optim 45, 85 (2023). https://doi.org/10.1007/s10878-023-00998-8

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10878-023-00998-8

Keywords

Navigation