On some Graphs with a Unique Perfect Matching

We show that deciding whether a given graph G of size m has a unique perfect matching as well as finding that matching, if it exists, can be done in time O(m) if G is either a cograph, or a split graph, or an interval graph, or claw-free. Furthermore, we provide a constructive characterization of the claw-free graphs with a unique perfect matching.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

09/22/2017

Planar Perfect Matching is in NC

In this paper we show that the problem of computing perfect matchings in...
04/12/2019

The Perfect Matching Reconfiguration Problem

We study the perfect matching reconfiguration problem: Given two perfect...
01/29/2019

A Pseudo-Deterministic RNC Algorithm for General Graph Perfect Matching

The difficulty of obtaining an NC perfect matching algorithm has led res...
12/31/2019

Constructive Characterization for Bidirected Analogue of Critical Graphs I: Principal Classes of Radials and Semiradials

This paper is the first from serial papers that provide constructive cha...
02/02/2022

Matching Orderable and Separable Hypergraphs

A perfect matching in a hypergraph is a set of edges that partition the ...
12/28/2018

Towards a constructive formalization of Perfect Graph Theorems

Interaction between clique number ω(G) and chromatic number χ(G) of a ...
04/30/2021

Complementation in t-perfect graphs

Inspired by applications of perfect graphs in combinatorial optimization...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Bartha [1] conjectured that a unique perfect matching of a given graph of size , if it exists, can always be found in time. Gabow, Kaplan, and Tarjan [6] describe a algorithm for this problem. Furthermore, they show that, if apart from , some perfect matching is also part of the input, then one can decide the uniqueness of in time. Since maximum matchings can be found in linear time for chordal bipartite graphs [2], cocomparability graphs [11], convex bipartite [13], and cographs [3, 16], also deciding whether these graphs have a unique perfect matching, as well as finding the unique perfect matching, if it exists, is possible in linear time. Also for strongly chordal graphs given a strong elimination order [4], a maximum matching can be found in linear time, and the same conclusion applies. Levit and Mandrescu [9] showed that unique perfect matchings can be found in linear time for König-Egerváry graphs and unicyclic graphs.

We contribute some structural and algorithmic results concerning graphs with a unique perfect matching. First, we extend a result from [5] to cographs and split graphs, which leads to a very simple linear time algorithm deciding the existence of a unique perfect matching, and finding one, if it exists. For interval graphs, we describe a linear time algorithm that determines a perfect matching, if the input graph has a unique perfect matching. Similarly, for connected claw-free graphs of even order, we describe a linear time algorithm that determines a perfect matching. Together with the result from [6] this implies that for such graphs the existence of a unique perfect matching can be decided in linear time. Finally, we give a constructive characterization of claw-free graphs with a unique perfect matching.

2 Results

For a graph , we say that a set forces a unique perfect matching in if , and for every , where , and denotes the closed neighborhood of in . Clearly, if forces a unique perfect matching in , then has a unique perfect matching , where is the only neighbor of in for . As shown by Golumbic, Hirst, and Lewenstein (Theorem 3.1 in [5]), a bipartite graph has a unique perfect matching if and only if some set forces a unique perfect matching in ; their result actually implies that both partite sets of force a unique perfect matching. This equivalence easily extends to cographs and split graphs.

Theorem 2.1.

If is a cograph or a split graph, then has a unique perfect matching if and only if some set forces a unique perfect matching in .

Proof.

Since the sufficiency is obvious, we proceed to the proof of the necessity. Therefore, let be a cograph or a split graph with a unique perfect matching . In view of an inductive argument, and since the classes of cographs and of split graphs are both hereditary, it suffices to consider the case that is a connected graph of order at least , and to show that has a vertex of degree .

First, suppose that is a cograph. Since is connected, it is the join of two graphs and . If and both have order at least , then contains either two edges between and , or one edge of as well as one edge of . In both cases, these two edges are part of an -alternating cycle of length , which is a contradiction. Hence, we may assume that contains exactly one vertex , which is a universal vertex in . Let be such that . If is a neighbor of in , and , then is an -alternating cycle of length , which is a contradiction. Hence, the vertex has degree in .

Next, suppose that is a split graph. Let , where is an independent set, and is a clique that is disjoint from . Since has a unique perfect matching, it follows easily that is either or . Since has order at least , the set is not empty. If no vertex in has degree , then it follows, similarly as for bipartite graphs, that contains an -alternating cycle, which completes the proof. ∎

If is given by neighborhood lists, then it is straightforward to decide the existence of a set that forces a unique perfect matching in in linear time, by iteratively identifying a vertex of degree , and removing this vertex together with its neighbor from . Altogether, for a given cograph or split graph, one can decide in linear time whether it has a unique perfect matching, and also find that matching, if it exists.

Our next results concern interval graphs.

Lemma 2.2.

Let be an interval graph with a unique perfect matching , and let be an interval representation of such that all endpoints of the intervals for are distinct.

If is such that , and is such that , then .

Proof.

Suppose, for a contradiction, that for some neighbor of that is distinct from . Let be such that . By the choice of and , and since the intervals and intersect, also the intervals and intersect, that is, . Now, is an -alternating cycle of length , which is a contradiction. ∎

Since, for a given interval graph, an interval representation as in Lemma 2.2 can be found in linear time [7], Lemma 2.2 yields a simple linear time algorithm to determine a perfect matching in a given interval graph , provided that has a unique perfect matching.

We proceed to claw-free graphs.

Let be a graph. Let be a path in , where we consider to be the last vertex of . We consider two operations replacing with a longer path in .

  • arises by applying an end-extension to , if is the path , where is some neighbor of that does not lie on .

  • arises by a swap-extension to , if , and is the path

    where is some neighbor of that does not lie on . Note that and need to be adjacent for this operation.

The following lemma is a simple variation of a folklore proof of Sumner’s result [14] that connected claw-free graphs of even order have a perfect matching.

Lemma 2.3.

If is a connected claw-free graph of even order, and is a path in that does not allow an end-extension or a swap-extension, then the edge belongs to some perfect matching of .

Proof.

In view of an inductive argument, it suffices to show that is connected. Suppose, for a contradiction, that is not connected. Clearly, . If , then has neighbors in two components of while is only adjacent to , which yields a claw centered at . Now, let . The path lies in one component of . Let be a component of that is distinct from . Since allows no end-extension, has no neighbor in . Hence, has a neighbor in . Since and are not adjacent, and is claw-free, is adjacent to , and allows a swap-extension, which is a contradiction. ∎

Lemma 2.3 is the basis for the simple greedy algorithm PMinCF (cf. Algorithm 1) that determines a perfect matching in connected claw-free graphs of even order.

Input: A connected claw-free graph of even order.
Output: A perfect matching of .
1 begin
2       ; ;
3       for all vertices of ;
4       while  do
5             if  then ; ; , where is some edge of ;
6             repeat
7                   ;
8                   if  then
9                         ; ; ;
10                        
11                  else
12                         if  then
13                              ;
14                         end if
15                        if  and  then
16                              ;
17                               if  then
18                                    
19                               end if
20                              ; ;
21                               ; ; ;
22                               ; ;
23                              
24                         end if
25                        
26                   end if
27                  
28            until ;
29            ; ; ;
30            
31       end while
32       return ;
33      
34 end
35
Algorithm 1 PMinCF
Theorem 2.4.

The algorithm PMinCF works correctly and can be implemented to run in time for a given connected claw-free graph of even order.

Proof.

Line 1 initializes the matching as empty and the order of the path as . The while-loop in lines 1 to 1 extends the matching iteratively as long as possible using the last edge of the path . If , which happens in the first execution of the while-loop, and possibly also in later executions, then, in line 1, the path is reinitialized with using any edge of . The repeat-loop in lines 1 to 1 ensures that allows no end-extension and no swap-extension, which, by Lemma 2.3, implies the correctness of PMinCF. The proof of Lemma 2.3 actually implies that stays connected throughout the execution of PMinCF. In line 1 we check for the possibility of an end-extension, which, if possible, is performed in line 1. If no end-extension is possible, we check for the possibility of a swap-extension. The first time that some specific vertex is the last vertex of , and we check for the possibility of a swap-extension, we set to the largest integer such that is adjacent to . Initializing as for every vertex of in line 1 indicates that its correct value has not yet been determined. This happens for the first time in lines 1 and 1. Once has been determined, it is only updated in line 1 for , and, if necessary, in line 1 for . Clearly, is adjacent to if and only if . Therefore, line 1 correctly checks for the possibility of a swap-extension, which, if possible, is performed in lines 1, 1, and 1. Altogether, the correctness follows, and it remains to consider the running time.

We assume that is given by neighborhood lists, that is, for every vertex of , the elements of the neighborhood of in are given as an (arbitrarily) ordered list. Checking for the existence of a suitable vertex within the if-statements in lines 1 and 1 can be implemented in such a way that we traverse the neighborhood list of every vertex at most once throughout the entire execution of PMinCF. Every time we check for the existence of such a neighbor of , we only need to consider the neighbors of that have not been considered before, that is, we start with the first not yet considered neighbor of within its neighborhood list, and continue until we either find a suitable neighbor or reach the end of the list. Since vertices that leave are also removed from in line 1, this is correct, and the overall effort spent on checking for such neighbors is proportional to the sum of all vertex degrees, that is, . The first computation of in line 1 can easily be done in time. After that, every update of only requires constant effort. Since is extended exactly times, the overall effort spent on maintaining is again proportional to the sum of all vertex degrees. Altogether, it follows that the running time is , which completes the proof. ∎

Again, it follows using [6] that one can decide in linear time whether a given claw-free graph has a unique perfect matching.

Our final goal is a constructive characterization of the claw-free graphs that have a unique perfect matching Let be the class of graphs obtained by starting with equal to , and iteratively applying the following two operations:

  • Operation 1
    Add to two new vertices and , and the three new edges , , and , where is a simplicial vertex of .

  • Operation 2
    Add to two new vertices and , the new edge , and new edges between and all vertices in a set , where is a non-empty clique in such that is a clique for every vertex in .

Theorem 2.5.

A connected claw-free graph has a unique perfect matching if and only if .

Proof.

It is easy to prove inductively that all graphs in are connected, claw-free, and have a unique perfect matching. Note that requiring to be simplicial in Operation 1 ensures that no induced claw is created by this operation. Similarly, the conditions imposed on in Operation 2 ensure that no induced claw is created.

Now, let be a connected claw-free graph with a unique perfect matching . If has order , then, trivially, is , which lies in . Now, let have order at least . By Kotzig’s theorem [8, 12], has a bridge that belongs to . In particular, is not -connected. Let be an endblock of . If , then is or , and the claw-freeness of easily implies that arises from a proper induced subgraph of by applying Operation 1 or 2. Hence, we may assume that . If is even, then, by Kotzig’s theorem, , and hence also , has two distinct perfect matchings, which is a contradiction. Hence,

is odd, that is

. If is the cutvertex of in , then, since is claw-free, is a clique of order at least . This implies that is -connected. Again, by Kotzig’s theorem, , and hence also , has two distinct perfect matchings, which is a contradiction, and completes the proof. ∎

Note that Theorem 3.4 in [15], and also Theorem 3.2 in [15] restricted to claw-free graphs, follow very easily from Theorem 2.5 by an inductive argument.

Acknowledgment We thank Vadim Levit for drawing our attention to the problem studied in this paper.

References

  • [1] M. Bartha, Efficient unique perfect matching algorithms, 8th Joint Conference on Mathematics and Computer Science, July 14-17, 2010, Komárno, Slovakia.
  • [2] M. Chang, Algorithms for maximum matching and minimum fill-in on chordal bipartite graphs, Lecture Notes in Computer Science 1178 (1996) 146-155.
  • [3] D.G. Corneil, Y. Perl, L.K. Stewart, A linear recognition algorithm for cographs, SIAM Journal on Computing 14 (1985) 926-934.
  • [4] E. Dahlhaus, M. Karpinski, Matching and multidimensional matching in chordal and strongly chordal graphs, Discrete Applied Mathematics 84 (1998) 79-91.
  • [5] M.C. Golumbic, T. Hirst, M. Lewenstein, Uniquely Restricted Matchings, Algorithmica 31 (2001) 139-154.
  • [6] H.N. Gabow, H. Kaplan, R.E. Tarjan, Unique Maximum Matching Algorithms, Journal of Algorithms 40 (2001) 159-183.
  • [7] M. Habib, R. McConnell, C. Paul, L. Viennot, Lex-bfs and partition refinement, with applications to transitive orientation, interval graph recognition and consecutive ones testing, Theoretical Computer Science 234 (2000) 59-84.
  • [8] A. Kotzig. On the theory of finite graphs with a linear factor II, Matematicko-Fyzikálny Časopis, Slovenskej Akadémie Vied 9 (1959) 136-159.
  • [9] V.E. Levit, E. Mandrescu, Computing unique maximum matchings in

    time for König-Egerváry graphs and unicyclic graphs, Journal of Combinatorial Optimization 32 (2016) 267-277.

  • [10] L. Lovász, M.D. Plummer, Matching theory, Annals of Discrete Mathematics, 29, 1986, North-Holland Publishing Co., Amsterdam.
  • [11] G.B. Mertzios, A. Nichterlein, R. Niedermeier, Linear-Time Algorithm for Maximum-Cardinality Matching on Cocomparability Graphs, arXiv:1703.05598.
  • [12] G. Nenashev, A short proof of Kotzig’s theorem, arXiv:1402.0949
  • [13] G. Steiner and J.S. Yeomans, A linear time algorithm for maximum matchings in convex, bipartite graphs, Computers & Mathematics with Applications 31 (1996) 91-96.
  • [14] D.P. Sumner, Graphs with -factors, Proceedings of the American Mathematical Society 42 (1974) 8-12.
  • [15] X. Wang, W. Shang, J. Yuan, On Graphs with a Unique Perfect Matching, Graphs and Combinatorics 31 (2015) 1765-1777.
  • [16] M. Yu, C. Yang, An time algorithm for maximum matching on cographs, Information Processing Letters 47 (1993) 89-93.