On the NP-Completeness of the Perfect Matching Free Subgraph Problem

Given a bipartite graph G = (U ∪ V,E) such that |U | = |V | and every edge is labelled true or false or both, the perfect matching free subgraph problem is to determine whether or not there exists a subgraph of G containing, for each node u of U , either all the edges labelled true or all the edges labelled false incident to u, and which does not contain a perfect matching. This problem arises in the structural analysis of differential-algebraic systems. The purpose of this paper is to show that this problem is NP-complete. We show that the problem is equivalent to the stable set problem in a restricted case of tripartite graphs. Then we show that the latter remains NP-complete in that case. We also prove the NP-completeness of the related minimum blocker problem in bipartite graphs with perfect matching.


Introduction
Given a graph G = (V, E), a matching of G is a subset of edges such that no two edges share a common node. Matchings have shown to be useful for modeling various discrete structures [2,8]. A graph is called bipartite (tripartite) if its nodes can be partitioned into two (three) disjoint sets such that every edge connects one node in a set to a node in a different set. A bipartite graph is called complete if there exists an edge between every paire of nodes of different sets. A complete bipartite graph is also called a biclique. A matching M in graph G is called perfect if every node of G is incident to some edge of M . Given a bipartite graph G = (U ∪ V, E) such that |U | = |V | = n, a matching M of G is then perfect if and only if |M | = n.
Let G = (U ∪ V, E) be a bipartite graph such that |U | = |V | = n. Let U = {u 1 , ..., u n } and V = {v 1 , ..., v n }. Suppose that every edge of E is labelled true or false, where an edge may have both true and false labels. For a node u i ∈ U , let E t i and E f i denote the sets of edges incident to u i labelled true and false, respectively. The perfect matching free subgraph problem (PMFSP) in G is to determine whether or not there exists a subgraph containing for each node u i ∈ U either E t i or E f i (but not both), and which is perfect matching free. As it will be shown in the next section, this problem arises in the structural analysis of differential-algebraic systems. The purpose of this paper is to show that PMFSP is NP-complete. For this we first show that PMFSP is equivalent to the stable set problem in a restricted case of tripartite graphs. Then we show that the latter remains NP-compete in that case.
Given a graph G = (V, E), a matching in G of maximum cardinality is called a maximum matching. Its size corresponds to the matching number of G which is denoted by ν(G). One of the most attractive and studied problems in combinatorial optimization is the maximum matching problem, which consists, given a graph G, in finding a maximum matching in G [3,8]. This problem can be solved in polynomial time using the algorithm developed by Edmonds [3]. If the graph is bipartite, the problem is much simpler. It reduces to a maximum flow problem. A vertex cover of a graph G is a set T of nodes such that every edge of G has at least one end in T . A well known min-max relation in graph theory and combinatorics is the following. A stable set of a graph is a subset of nodes S such that no two nodes in S are adjacent. Given a graph G = (V, E), the stable set problem in G consists in finding a stable set of maximum cardinality. Theorem 1. (König [8]) For a bipartite graph, the maximum cardinality of a matching is equal to the minimum cardinality of a vertex cover.
As the complementary of a vertex cover in a graph is a stable set, a consequence of Theorem 1 is the following.
Corollary 2. Given a bipartite graph, if M is a maximum cardinality matching and S is a maximum stable set, then |M | + |S| = |V |.
For more details on matching theory, the reader is referred to [8]. The paper is organized as follows. In the next section we discuss the relation between PMFSP and the structural analysis problem in differential-algebraic systems. In Section 3 we show the equivalence between the PMFSP and the stable set problem in a special case of tripartite graphs. In Section 4 we show the NP-completeness of PMFSP. In Section 5 we consider the related minimum blocker problem in bipartite graphs with perfect matching, and in Section 6 we give some concluding remarks.

Differential-algebraic systems and the PMFSP
Differential-algebraic systems (DAS) are used for modeling complex physical systems as electrical networks and dynamic movements. Such a system can be given as f (x,ẋ, u, p, t) = 0 where x is the variable vector,ẋ denotes the derivative vector of x with respect to time, u is the input vector, p is the parameter vector and t is time. Establishing that a DAS definitely is not solvable can be helpful. A necessary (but not sufficient) condition for solving a DAS is that the number of variables and equations must agree. Simulation is the main tool for solving DASs. Object-oriented modeling langages like Modelica [4] enforce this as simulation is not possible if this is not case. Thus before solving a differentialalgebraic system, one has to verify if there are as many equations as variables, and if there exists a mapping between the equations and the variables in such a way that each equation is related to only one variable and each variable is related to only one equation. If this is satisfied, then we say that the system is well-constrained. The structural analysis problem for a DAS consists in verifying if the system is well-constrained.
In many practical situations, physical systems yield differential-algebraic systems with conditional equations. A conditional equation is an equation whose from depends on the value (true or false) of a condition. A conditional equation can generate several equations. A conditional differential-algebraic system may then have different forms depending on the set of conditions that hold. Here we consider conditional DAS's such that any conditional equation may take two possible values, depending on whether the associated condition is true or false and may generate only one equation. Consider for example the following DAS : if a > 0 then 0 = 4x 2 + 2 .
And if a > 0, b > 0, c ≤ 0 then system (4) is nothing but the system.
x +4y + 2, eq 2 : The structural analysis problem has been considered in the literature for non-conditional DAS's. In [9,10], Murota introduces a formulation of the problem in terms of bipartite graphs and shows that a system of equations is well constrained if and only if there exists a perfect matching in the corresponding bipartite graph. Given a DAS, one can associate a bipartite graph G = (U ∪V, E), called incidence graph, where U corresponds to the equations, V to the variables and there is an edge u i v j ∈ E between a node u i ∈ U and a node v j ∈ V if and only if the variable corresponding to v i appears in the equation corresponding to u i . Checking if the system is well constrained then reduces to calculating a perfect matching in the associated incidence graph, which can then be done in polynomial time.
Given a conditional DAS, the associated structural analysis problem consists in verifying whether or not the system is well constrained for all the possible values. The SAP for a conditional DAS thus reduces to verifying whether or not the incidence bipartite graph, related to any configuration of the system, contains a perfect matching. More precisely, consider a conditional DAS with n equations (eq 1 , ..., eq n ) and n variables ( is associated with the equations (resp. variables). Between a node u i ∈ U and a node v j ∈ V we consider an edge, called true edge (resp. false edge) if the variable x j appears in equation eq i when the condition of eq i is true (resp. false). Note that an edge may be at the same time true and false. Let E t i (resp. E f i ) be the set of true (resp. false) edges incident to u i , for i = 1, ..., n. Then Hence, the SAP reduces to finding whether or not there exists a subgraph of G, containing, for each node u i either E t i or E f i (but not both) and which does not contain a perfect matching. Therefore, the SAP reduces to the PMFSP [6]. In [7], an integer programming formulation is proposed for the problem and some algorithmic and polyhedral issues are discussed.

PMFSP and stable sets
The aim of this section is to show that PMFSP is equivalent to the stable set problem in a special case of tripartite graph. Let We will consider the following problem : does there exist a stable set in H of size n + 1? We will call this problem the tripartite stable set with perfect matching problem (TSSPMP). In what follows we shall show that both problems TSSPMP and PMFSP are equivalent. Proof. Let G = (U ∪ V, E) and H = (V 1 ∪ V 2 ∪ V 3 , F ) be the graphs on which the problems PMFSP and TSSPMS are considered, respectively. We will first show that an instance of TSSPMP can be transformed into an instance of PMFSP. For an edge v 1 .., n}, then we add an edge u i v k in E with label true (resp. false). Figure 1 illustrates this transformation.
Observe In what follows, we will show that there exists a stable set in H of size n + 1 if and only if there exists a subgraph G ′ = (U ∪V, E ′ ) of G such that for each node and G ′ is perfect matching free. In fact, suppose first that there exists a subgraph G ′ of G that satisfies the required properties. Since G ′ is perfect matching free, this implies that a maximum cardinality matching in G ′ contains less than n edges. As |U ∪ V | = 2n by Corollary 2 there exists a stable set in G ′ , say S ′ , of size |S ′ | ≥ n + 1. Now from S ′ , we are going to construct a stable set in H with the same cardinality. Let S be the node subset of H obtained as follows. For every node v j ∈ V ∩ S ′ , add node v 3 j in S. And for every node As |S ′ | ≥ n + 1, we have |S| ≥ n + 1. We now prove that S is indeed a stable set. Since the edges between V 1 and V 2 are only those of the perfect matching M , and since from each edge of M , we have taken exactly one node in S, clearly, the restriction of S on However, this contradicts the fact that S ′ is a stable set. Using the same argument we deduce that S does not contain adjacent nodes v 2 Conversely, Suppose that we have a stable set S in H of size greater or equal to n + 1. Let E ′ be the edge subset of E obtained as follows. For every node We will show that G ′ = (U ∪ V, E ′ ) contains a stable set of size greater than or equal to n + 1 which by Corollary 2 implies that G ′ is perfect matching free. Let S ′ ⊆ U ∪ V be the node set obtained from S as follows. For every node v 3 i of V 3 ∩ S add node v i of V in S ′ . And for every node v 1 i (resp. v 2 i ) of V 1 ∩ S (resp. V 2 ∩ S), add node u i of U in S ′ . Since S does not contain both nodes v 1 i and v 2 i for some i, and |S| ≥ n + 1, we have that |S ′ | ≥ n + 1. Moreover S ′ is a stable set. Indeed, suppose that S ′ contains two nodes, say u i ∈ U and v j ∈ V such that u i v j ∈ E ′ . Without loss of generality, suppose that u i comes from node v 1 i in S (the proof is similar if v 2 i ∈ S). By construction of E ′ , this implies that E t i ⊆ E ′ , and hence u i v j ∈ E t i . From the construction of H, it follows that v 1 i v 3 j ∈ F . As v 1 i , v 3 j ∈ S, this is a contradiction, and the proof is complete.

The NP-completeness of PMFSP
In this section we show the NP-completeness of PMFSP. For this we shall show that TSSPMP is NP-complete. By Theorem 3, the result follows. In [11] it is shown that the stable set problem is NP-complete in tripartite graphs. (Recall that the problem is known to be polynomially solvable in bipartite graphs). What we are going to show in the following is that the more restricted variant TSSPMP is also NP-complete. In other words, the stable set problem in tripartite graphs remains NP-complete even when the sets of the partition of the graph have the same size and that the set of edges between two of the three sets of the partition consists of a perfect matching. In order to show the NP-completeness of TSSPMP, we shall use the one-in-three 3SAT problem. An instance of one-in-three 3SAT (1-in-3 3SAT) consists of n variables l 1 , ..., l n and m clauses C 1 , ..., C m with three literals per clause. Each clause is the disjunction of three literals, where a literal is either a variable or its negation. If x i is a variable which represents either l i or l i , then where a bar stands for negation. The question is whether or not there exists an assignment of truth values ("true" or "false") to the variables such that each clause has exactly one true literal.

Theorem 4. TSSPPM is NP-complete.
Proof. It is clear that TSSPMP is in NP. To prove the theorem, we shall use a reduction from 1-in-3 3SAT. The proof uses ideas from [11]. So suppose we are given an instance of 1-in-3 3SAT with a set of n variables L = {l 1 , ..., l n } and a set of m clauses C = {C 1 , ..., C m }. We shall construct an instance of TSSPMP on a graph H = (V 1 ∪ V 2 ∪ V 3 , F ) where |V 1 | = |V 2 | = |V 3 | = p = 3n + m − 1 and the set of edges between V 1 and V 2 consists of a perfect matching. We will show that H has a stable set of size p + 1 if and only if 1-in-3 3SAT admits a truth assignment. With each variable l i ∈ L, we associate the nodes v These will be called variable nodes. With each clause C j = (x r , x s , x t ), we associate the nodes w 1 jr ∈ V 1 , w 2 js ∈ V 2 , w 3 jt ∈ V 3 . These will be called clause nodes. Finally we add the nodes z 1 q ∈ V 1 , z 2 q ∈ V 2 , z 3 q ∈ V 3 for q = 1, ..., n − 1. These will be called fictitious nodes. Note that |V 1 | = |V 2 | = |V 3 | = p. Now we construct the edge set F . For each variable l i ∈ L, consider the edges v 1 i These will be called variable edges. Note that these edges form a cycle of length 6, which will be denoted by Γ i for i = 1, ..., n. For each clause C j = (x r , x s , x t ) add in F the edges w 1 jr w 2 js , w 2 js w 3 jt , w 3 jt w 1 jr . These are called clause edges. Note that these edges form a triangle, which will be denoted by T j , for j = 1, ..., m. Also add in F the edges z 1 q z 2 q for q = 1, ..., n − 1. Remark that the edges between V 1 and V 2 form a perfect matching given by the edges v 1 .., n, w 1 jr w 2 js , j = 1, ..., m, and z 1 q z 2 q , q = 1, ..., n − 1. Now according to the values of the literals, we add edges in E as follows. For every clause (x r , x s , x t ) • if x r = l r , add the edges w 1 • if x r = l r , add the edges w 1 • if x s = l s , add the edges w 1 • if x s = l s , add the edges w 1 These are called satisfiability edges. For each fictitious node in V 1 ∪ V 2 , add edges to connect all nodes in V 3 , and for each fictitious node in V 3 , add edges to connect all non fictitious nodes in V 1 ∪ V 2 . Thus, from an instance of the 1-in-3 3SAT with n variables and m clauses, we obtain a tripartite graph with 9n + 3m − 3 nodes and 10n 2 + 4nm − 5n + 14m + 1 edges. Figure 2 show an example of graph H when L = {l 1 , l 2 , l 3 } and C = {(l 1 , l 2 , l 3 ), (l 1 , l 2 , l 3 )}. For sake of clarity, only the satisfiability edges are displayed.
Claim 5. Any stable set in H cannot contain more than 3n + m nodes. Moreover, if a stable set contains 3n+m nodes, then it does not contain any fictitious node.
Proof. Let S be a stable set in H. First we show that if S contains a fictitious node, then |S| ≤ 3n + m − 1. Suppose S contains a fictitious node z. If z ∈ V 3 , as z is adjacent to all nodes in V 1 ∪ V 2 , |S| ≤ |V 3 | = 3n + m − 1. Now suppose, without loss of generality, that z ∈ V 1 . As z is adjacent to all the nodes of V 3 , we have S ∩ V 3 = ∅. Consider a cycle Γ i of H corresponding to a variable l i . As Γ i alternates between the sets V 1 , V 2 , V 3 and four of the six edges of Γ i are incident to nodes in V 3 , at most two nodes of Γ i may belong to S. Moreover, S may contain at most one node from each triangle T j , j = 1, ..., m. Consequently, |S| ≤ 2n + m < 3n + m. Now suppose that S does not contain any fictitious node. Then all the nodes of S come from the cycles Γ i , i = 1, ..., n and the triangles T j , j = 1, ..., m. Since S may intersect each Γ i in at most 3 nodes and each triangle in at most one node, it follows that |S| ≤ 3n + m.
In what follows we show that there exists in H a stable set of size 3n + m if and only if 1-in-3 3SAT admits a solution such that each clause has exactly one true literal. (=>) Let S be a stable set in H of size 3n + m. By Claim 5, S does not contain any fictitious node. Thus, as |S| = 3n + m, S intersects each cycle Γ i in exactly three nodes and each triangle T j in exactly one node. Moreover, we have that .., n. Consider the solution I for 1-in-3 3SAT defined as follows. If v k i ∈ S (resp. v k i ∈ S), k = 1, 2, 3, then associate the true (resp. false) value to the variable l i , for i = 1, ..., n. In what follows we will show that for each clause C j = (x r , x s , x t ), we have exactly one literal with value true. For this it suffices to show that a clause node of T j is in S if and only if the corresponding literal is of true value. Indeed, suppose that w 1 jr ∈ S. We may suppose that x r = l r , the case where x r = l r is similar. By construction of H, as the satisfiability edge w 1 jr v 3 r belongs to F , it follows that v 3 r / ∈ S. By the remark above, this implies that v 1 r , v 2 r , v 3 r belong to S. Therefore literal l r has value true in solution I. Thus x r has value true.
Conversely, if x r = true (= l r ), then by definition of I, v 1 r , v 2 r , v 3 r ∈ S. Moreover, the satisfiability edges w 2 js v 3 r , w 3 jt v 2 r belong to F . As |S ∩ T r | = 1, it follows that w 1 jr ∈ S. In consequence, as S contains exactly one clause node from each T i , it follows that each clause has exactly one true literal. (<=) Suppose that there exists a solution I of 1-in-3 3SAT such that each clause has exactly one literal with true value. We will show that the maximum stable set in H is of size 3n + m. Let S be the node set obtained as follows : x r = true, add w 1 jr to S, x s = true, add w 2 js to S, x t = true, add w 3 jt to S.
As each clause has exactly one true literal with respect to the solution I, we have that |S| = 3n + m. Now, it suffices to show that S is a stable set. For this it suffices to show that none of the variable nodes of S is adjacent to a clause node of S. Suppose, without loss of generality, that for some r ∈ {1, ..., n}, l r = true. Hence v 1 r , v 2 r , v 3 r ∈ S. In S these nodes may only be adjacent to nodes coming from clauses containing literal l r or its negation l r . Actually, if C j = (x r , x s , x t ), by the definition of the satisfiability edges, nodes v 1 r , v 2 r , v 3 r may be adjacent to nodes among {w 2 js , w 3 jt } if x r = l r and to node w 1 jr , if x r = l r . If x r = true (that is x r = l r ), then w 1 jr ∈ S. However, in this case none of the nodes v 1 r , v 2 r , v 3 r is adjacent to w 1 jr . Thus, none of the variable nodes is adjacent to a clause node in S. Therefore, S is a stable. Since |S| = 3n + m, by Claim 5, S is of maximum size, and the proof is complete.
From Theorems 3 and 4, we deduce the following corollary.

Corollary 6. PMFSP is NP-complete.
Corollary 6 shows that PMFSP is NP-complete in general. To conclude this section let us remark that the PMFSP can be solved in polynomial time if there exists a vertex in V which is incident to no edge with both labels true and false. Indeed, suppose that all the edges incident to a vertex v j ∈ V are either true or false (but not both). In this case, we can consider the subgraph G ′ = (U ∪V, E ′ ) where E ′ contains, for i = 1, 2, . . . , n, the edge set E t i if E f i contains an edge of type u i v j , and E f i otherwise. Observe that, E ′ does not contain any edge incident to v j . Which implies that G ′ does not contain a perfect matching. Consequently, G ′ is a solution of PMFSP. We also remark that, in this case, the instance H of the TSSPMP associated with G is such that vertex v 3 j is adjacent to at most one of the nodes v 1 i and v 2 i , for i = 1, 2, . . . , n. A solution of the TSSPMP is thus obtained by considering the stable set containing v 3 j and, for i = 1, 2, . . . , n,

The minimum blocker perfect matching problem
In this section, we consider a variant of the PMFSP when there is no labels on the edges. This problem can be stated as follows. Given a graph G = (U ∪ V, E) with a perfect matching and |U | = |V |, find a perfect matching free subgraph with a maximum number of edges and covering the vertices of U . As it will turn out, this problem is nothing but a special case of the so-called minimum blocker problem [12] (see also [1]).
Let G = (U ∪V, E) be a bipartite graph with matching number ν(G). In [12], Zenklusen et al. define a blocker as a subset of edges B ⊂ E such that G ′ = (U ∪ V, E \ B) has a matching number smaller than ν(G). They define the minimum blocker problem (MBP) as follows. Given a bipartite graph G = (U ∪ V, E) and a positive integer k, does there exist an edge subset B of E with |B| ≤ k such that B is a blocker? They prove that MBP is NP-complete. Here, we are interested in a special case of the MBP, hereafter called the minimum blocker perfect matching problem (MBPMP), where G contains a perfect matching. In what follows, we show that MBPMP is NP-complete. We also prove that it remains NP-complete in case where G ′ = (U ∪ V, E \ B) must cover U . Which corresponds to the PMFSP with no edge labels.
In what follows we will show that G contains a blocker of cardinality less or equal than k if and only ifG so does. For this we first give the following claim. Claim 8. . Let H = (W 1 ∪ W 2 , F ) be a complete bipartite graph such that |W 1 | = |W 2 | ≥ k + 1 for some k ≥ 0. Then H does not contain a blocker of size ≤ k.
Proof. Suppose that there is a blocker B of size |B| ≤ k. Then the subgrah H ′ = (W 1 ∪ W 2 , F \ B) has no perfect matching. From Hall's theorem (see [8]) there exists i ∈ {1, 2} and W ⊂ W i such that |W | > |Γ(W )| in H ′ where Γ(W ) stands for the neighbor set of W . Since H is a complete bipartite graph, we have |B| ≥ |W | × (|W i | − |Γ(W )|). Now, since for each triplet of nonnegative integers x, y, z with x ≥ y > z we have y(x − z) ≥ x, by considering x = |W i |, y = |W | and z = |Γ(W )|, we conclude that |B| ≥ |W | × (|W i | − |Γ(W )|) ≥ |W i | ≥ k + 1, a contradiction. Now consider a blocker B of G with |B| ≤ k, and suppose that B is not a blocker ofG. Thus there exists a perfect matching ofG, say M , which does not intersect B. Since |M ∩ E| = |U | = ν(G) and B is a blocker of G, we have a contradiction. Thus B is also a blocker ofG.
Conversely, suppose that G has no a blocker B with |B| ≤ k. IfG contains a blocker, sayB with |B| ≤ k, then letB 1 =B ∩ E. Obviously, |B 1 | ≤ k. We claim thatB 1 is a blocker of G. In fact, if this is not the case, then there must exist a matching M ′ in the graph (U ∪ V, E \B 1 ) with |M ′ | = |U | = ν(G). Let V ′ be the subset of nodes of V covered by M ′ . Let H = (W 1 ∪ W 2 , F ) be the biclique with W 1 =Ū =Ũ \ U and W 2 =Ṽ ′ whereṼ ′ =Ṽ \ V ′ . Clearly, |W 1 | = |W 2 | ≥ k + 1. LetB 2 =B ∩ F . As |B 2 | ≤ k, by the claim above, the subgraph (W 1 ∪ W 2 , F \B 2 ) contains a perfect matching say M ′′ . As M ′ ∪ M ′′ is a perfect matching of (Ũ ∪Ṽ ,Ẽ \B), this contradicts the fact thatB is a blocker ofG, and the proof is complete.
In the proof of Theorem 7, graphG is constructed in such a way that deg(u) ≥ k + 1 for all u ∈Ũ . Therefore, any graph obtained fromG by removing the edges of any blocker B with |B| ≤ k covers the vertices ofŨ . This implies that the variant of the PMFSP without label on the edges, considered in this section, is also NP-complete.

Concluding remarks
In this paper we have shown that the perfect matching free subgraph problem is NP-complete. For this, we have first proved that the problem is equivalent to the stable set problem in tripartite graphs when the set of edges between two elements of the partition of the graph is reduced to a perfect matching. Then we have shown that the latter is NP-complete. We have also proved that the related minimum blocker perfect matching problem is NP-complete.
The PMFSP can be easily generalized to the case where the edges incident to each vertex u ∈ U are gathered in more than two (non-disjoint) edge sets (e.g. the true and false edge sets). This problem is clearly NP-complete since it contains PMFSP as a special case. Moreover, this latter more general problem has applications to the structural analysis problem for embedded conditional differential-algebraic systems. These consist of systems which may contain equations whose value may depend on more than one condition [6]. As it has been shown in [6], the latter can be reduced to the former one.