Finding Dominating Induced Matchings in S 1,1,5 -Free Graphs in Polynomial Time
aa r X i v : . [ c s . D M ] M a r Finding Dominating Induced Matchings in S , , -Free Graphsin Polynomial Time Andreas Brandst¨adt ∗ Raffaele Mosca † March 20, 2020
Abstract
Let G = ( V, E ) be a finite undirected graph. An edge set E ′ ⊆ E is a dominatinginduced matching ( d.i.m. ) in G if every edge in E is intersected by exactly one edgeof E ′ . The Dominating Induced Matching ( DIM ) problem asks for the existence of ad.i.m. in G ; this problem is also known as the Efficient Edge Domination problem; itis the Efficient Domination problem for line graphs.The DIM problem is NP -complete even for very restricted graph classes such asplanar bipartite graphs with maximum degree 3 but is solvable in linear time for P -free graphs, and in polynomial time for S , , -free graphs as well as for S , , -freegraphs and for S , , -free graphs. In this paper, combining two distinct approaches,we solve it in polynomial time for S , , -free graphs. Keywords : dominating induced matching; efficient edge domination; S , , -free graphs; polyno-mial time algorithm; Let G = ( V, E ) be a finite undirected graph. A vertex v ∈ V dominates itself and itsneighbors. A vertex subset D ⊆ V is an efficient dominating set ( e.d.s. for short) of G if every vertex of G is dominated by exactly one vertex in D . The notion of efficientdomination was introduced by Biggs [1] under the name perfect code . The EfficientDomination (ED) problem asks for the existence of an e.d.s. in a given graph G (notethat not every graph has an e.d.s.)A set M of edges in a graph G is an efficient edge dominating set ( e.e.d.s. for short) of G if and only if it is an e.d.s. in its line graph L ( G ). The Efficient Edge Domination (EED) problem asks for the existence of an e.e.d.s. in a given graph G . Thus, the EEDproblem for a graph G corresponds to the ED problem for its line graph L ( G ). Note thatnot every graph has an e.e.d.s. An efficient edge dominating set is also called dominatinginduced matching ( d.i.m. for short), and the EED problem is called the DominatingInduced Matching (DIM) problem in various papers (see e.g. [2, 3, 4, 5, 6, 7, 9, 10]);subsequently, we will use this notation instead of EED. ∗ Institut f¨ur Informatik, Universit¨at Rostock, A.-Einstein-Str. 22, D-18051 Rostock, Germany, a [email protected] † Dipartimento di Economia, Universit´a degli Studi “G. D’Annunzio” Pescara 65121, Italy. r [email protected]
1n [8], it was shown that the DIM problem is NP -complete; see also [2, 7, 11, 12].However, for various graph classes, DIM is solvable in polynomial time. For mentioningsome examples, we need the following notions:Let P k denote the chordless path P with k vertices, say a , . . . , a k , and k − a i a i +1 , 1 ≤ i ≤ k −
1; we also denote it as P = ( a , . . . , a k ).For indices i, j, k ≥
0, let S i,j,k denote the graph H with vertices u, x , . . . , x i , y , . . . , y j , z , . . . , z k such that the subgraph induced by u, x , . . . , x i forms a P i +1 ( u, x , . . . , x i ), thesubgraph induced by u, y , . . . , y j forms a P j +1 ( u, y , . . . , y j ), and the subgraph inducedby u, z , . . . , z k forms a P k +1 ( u, z , . . . , z k ), and there are no other edges in S i,j,k ; u iscalled the center of H . Thus, claw is S , , , and P k is isomorphic to S k − , , .For a set F of graphs, a graph G is called F -free if no induced subgraph of G iscontained in F . If |F | = 1, say F = { H } , then instead of { H } -free, G is called H -free.The following results are known: Theorem 1.
DIM is solvable in polynomial time for ( i ) S , , -free graphs [ ] , ( ii ) S , , -free graphs [ ] , ( iii ) S , , -free graphs [ ] , ( iv ) S , , -free graphs [ ] , ( v ) S , , -free graphs [ ] , ( vi ) P -free graphs [ ] (in this case even in linear time), ( vii ) P -free graphs [ ] . In [9], it is conjectured that for every fixed i, j, k , DIM is solvable in polynomial time for S i,j,k -free graphs (actually, an even stronger conjecture is mentioned in [9]); this includes P k -free graphs for k ≥ S , , -free graphs(generalizing the corresponding result for P -free graphs). The approach is based on thatdescribed in [4], i.e. by fixing an edge in the possible e.d.s. and studying the correspondingdistance levels, and is developed thanks to that described in [9, 10], i.e., by seeing theproblem in terms of “coloring” and defining polynomially many families of feasible partialcolorings. The proposed solution considers a sequence of more and more general instances,with respect to the assumption that distance levels could be empty, until to consider thegeneral case. In particular it seems that in view of a possible extension of the result for S , ,k -free graphs, for k ≥
6, the main obstacle would be that of solving the very firstinstances of the sequence.
Let G be a finite undirected graph without loops and multiple edges. Let V ( G ) or V denote its vertex set and E ( G ) or E its edge set; let n = | V | and m = | E | . For v ∈ V , let2 ( v ) := { u ∈ V : uv ∈ E } denote the open neighborhood of v , and let N [ v ] := N ( v ) ∪ { v } denote the closed neighborhood of v . If xy ∈ E , we also say that x and y see each other ,and if xy E , we say that x and y miss each other . A vertex set S is independent in G if for every pair of vertices x, y ∈ S , xy E . A vertex set Q is a clique in G if for everypair of vertices x, y ∈ Q , x = y , xy ∈ E . For uv ∈ E let N ( uv ) := N ( u ) ∪ N ( v ) \ { u, v } and N [ uv ] := N [ u ] ∪ N [ v ].For U ⊆ V , let G [ U ] denote the subgraph of G induced by vertex set U . Clearly xy ∈ E is an edge in G [ U ] exactly when x ∈ U and y ∈ U ; thus, G [ U ] can simply bedenoted by U (if understandable).For A ⊆ V and B ⊆ V , A ∩ B = ∅ , we say that: A (cid:13) B if each vertex of A misseseach vertex of B ; A (cid:13) B if each vertex of A sees each vertex of B ; A contacts B if somevertex of A sees some vertex of B . For A = { a } , we simply denote A (cid:13) B by a (cid:13) B , andcorrespondingly A (cid:13) B by a (cid:13) B , and correspondingly say that a contacts B . If for A ′ ⊆ A , A ′ (cid:13) ( A \ A ′ ), we say that A ′ is isolated in G [ A ].For graphs H , H with disjoint vertex sets, H + H denotes the disjoint union of H , H , and for k ≥ kH denotes the disjoint union of k copies of H . For example, 2 P isthe disjoint union of two edges.As already mentioned, a chordless path P k , k ≥
2, has k vertices, say v , . . . , v k , and k − v i v i +1 , 1 ≤ i ≤ k −
1; the length of P k is k −
1. We also denote it as P = ( v , . . . , v k ).A chordless cycle C k , k ≥
3, has k vertices, say v , . . . , v k , and k edges v i v i +1 , 1 ≤ i ≤ k −
1, and v k v ; the length of C k is k .Let K i , i ≥
1, denote the clique with i vertices. Let K − e or diamond be the graphwith four vertices, say v , v , v , u , such that ( v , v , v ) forms a P and u (cid:13){ v , v , v } ; its mid-edge is the edge uv .A butterfly has five vertices, say, v , v , v , v , u , such that v , v , v , v induce a 2 P with edges v v and v v (the peripheral edges of the butterfly), and u (cid:13){ v , v , v , v } .We often consider an edge e = uv to be a set of two vertices; then it makes sense tosay, for example, u ∈ e and e ∩ e ′ = ∅ , for an edge e ′ . For two vertices x, y ∈ V , let dist G ( x, y ) denote the distance between x and y in G , i.e., the length of a shortest pathbetween x and y in G . The distance between a vertex z and an edge xy is the lengthof a shortest path between z and x, y , i.e., dist G ( z, xy ) = min { dist G ( z, v ) : v ∈ { x, y }} .The distance between two edges e, e ′ ∈ E is the length of a shortest path between e and e ′ , i.e., dist G ( e, e ′ ) = min { dist G ( u, v ) : u ∈ e, v ∈ e ′ } . In particular, this means that dist G ( e, e ′ ) = 0 if and only if e ∩ e ′ = ∅ .An edge subset M ⊆ E is an induced matching if the pairwise distance between itsmembers is at least 2, that is, M is isomorphic to kP for k = | M | . Obviously, if M is ad.i.m. then M is an induced matching.Clearly, G has a d.i.m. if and only if every connected component of G has a d.i.m.;from now on, connected components are mentioned as components .Note that if G has a d.i.m. M , and V ( M ) denotes the vertex set of M then V \ V ( M )is an independent set, say I , i.e., V has the partition V = V ( M ) ∪ I. (1)From now on, all vertices in I are colored white and all vertices in V ( M ) are coloredblack. According to [9], we also use the following notions: A partial black-white coloring3f V ( G ) is feasible if the set of white vertices is an independent set in G and every blackvertex has at most one black neighbor. A complete black-white coloring of V ( G ) is feasible if the set of white vertices is an independent set in G and every black vertex has exactlyone black neighbor. Clearly, M is a d.i.m. of G if and only if the black vertices V ( M ) andthe white vertices V \ V ( M ) form a complete feasible coloring of V ( G ). Various papers on this topic introduced and applied some forcing rules for reducing thegraph G to a subgraph G ′ such that G has a d.i.m. if and only if G ′ has a d.i.m., basedon the condition that for a d.i.m. M , V has the partition V = V ( M ) ∪ I such that allvertices in V ( M ) are black and all vertices in I are white (recall (1)).A vertex v ∈ V is forced to be black if for every d.i.m. M of G , v ∈ V ( M ). Analogously,a vertex v ∈ V is forced to be white if for every d.i.m. M of G , v / ∈ V ( M ).Clearly, if uv ∈ E and if u, v are forced to be black, then uv is contained in every(possible) d.i.m. of G .An edge e ∈ E is a forced edge of G if for every d.i.m. M of G , e ∈ M . Analogously,an edge e ∈ E is an excluded edge of G if for every d.i.m. M of G , e M .For the correctness of the reduction steps, we have to argue that G has a d.i.m. if andonly if the reduced graph G ′ has one (provided that no contradiction arises in the vertexcoloring, i.e., it is feasible).Then let us introduce two reduction steps which will be applied later. Vertex Reduction.
Let u ∈ V ( G ). If u is forced to be white, then( i ) color black all neighbors of u , and( ii ) remove u from G .Let G ′ be the reduced subgraph. Clearly, Vertex Reduction is correct, i.e., G has ad.i.m. if and only if G ′ has a d.i.m. Edge Reduction.
Let uv ∈ E ( G ). If u and v are forced to be black, then( i ) color white all neighbors of u and of v (other than u and v ), and( ii ) remove u and v from G .Again, clearly, Edge Reduction is correct, i.e., G has a d.i.m. if and only if the reducedsubgraph G ′ has a d.i.m.The subsequent notions and observations lead to some possible reductions (some ofthem are mentioned e.g. in [2, 3, 4]). Observation 1 ([2, 3, 4]) . Let M be a d.i.m. of G . ( i ) M contains at least one edge of every odd cycle C k +1 in G , k ≥ , and exactly oneedge of every odd cycle C , C , C in G . ii ) No edge of any C can be in M . ( iii ) For each C either exactly two or none of its edges are in M . Proof.
See e.g. Observation 2 in [3].In what follows, we will also refer to Observation 1 ( i ) (with respect to C ) as to the triangle-property , and to Observation 1 ( ii ) as to the C -property .Since by Observation 1 ( i ), every triangle contains exactly one M -edge, and the pair-wise distance of M -edges is at least 2, we have: Corollary 1. If G has a d.i.m. then G is K -free. Assumption 1.
From now on, by Corollary 1, we assume that the input graph is K -free (else it has no d.i.m.).Clearly, it can be checked (directly) in polynomial time whether the input graph is K -free.Recall that a d.i.m. M in G is an induced matching, and the distance between everypair of edges in M is at least 2 (which is the distance property ). By Observation 1 ( i ) withrespect to C and the distance property, we have the following: Observation 2.
The mid-edge of any induced diamond in G and the two peripheral edgesof any induced butterfly in G are forced edges of G . Assumption 2.
From now on, by Observation 2, we assume that the input graph is(diamond,butterfly)-free.In particular, we can apply the Edge Reduction to each mid-edge of any induced dia-mond and to each peripheral edge of any induced butterfly; that can be done in polynomialtime. M -edge xy in a P If for xy ∈ E , an edge e ∈ E is contained in every d.i.m. M of G with xy ∈ M , we saythat e is an xy -forced M -edge, and analogously, if an edge e ∈ E is contained in no d.i.m. M of G with xy ∈ M , we say that e is xy -excluded . The Edge Reduction for forced edgescan also be applied for xy -forced edges (then, in the unsuccessful case, G has no d.i.m.containing xy ), and correspondingly for xy -forced white vertices (resulting from the blackcolor of x and y ), the Vertex Reduction can be applied.Based on [4], we first describe some general structure properties for the distance levelsof an edge in a d.i.m. M of G . Since G is ( K , diamond, butterfly)-free, we have: Observation 3.
For every vertex v of G , N ( v ) is the disjoint union of isolated verticesand at most one edge. Moreover, for every edge xy ∈ E , there is at most one commonneighbor of x and y . Since it is trivial to check whether G has a d.i.m. M with exactly one edge, from nowon we can assume that | M | ≥
2. Since G is connected and butterfly-free, we have: Observation 4. If | M | ≥ then there is an edge in M which is contained in a P of G . roof. Let xy ∈ M and assume that xy is not part of an induced P of G . Since G isconnected and | M | ≥
2, ( N ( x ) ∪ N ( y )) \ { x, y } 6 = ∅ , and since we assume that xy is notpart of an induced P of G and G is K - and diamond-free, there is exactly one neighbor of xy , namely a common neighbor, say z of x and y . Again, since | M | ≥ z has a neighbor a / ∈ { x, y } , and since G is K - and diamond-free, a, x, y, z induce a paw. Clearly, the edge za is xy -excluded and has to be dominated by a second M -edge, say ab ∈ M but now,since G is butterfly-free, zb / ∈ E . Thus, z, a, b induce a P in G , and Observation 4 isshown.Recall [4] for Observation 4. Let xy ∈ M be an M -edge for which there is a vertex r such that { r, x, y } induce a P with edge rx ∈ E . By the assumption that xy ∈ M , wehave that x and y are black, and it could lead to a feasible xy -coloring (if no contradictionarises).Let N ( xy ) := { x, y } and for i ≥
1, let N i ( xy ) := { z ∈ V : dist G ( z, xy ) = i } denote the distance levels of xy . We consider a partition of V into N i = N i ( xy ), i ≥ xy (under the assumption that xy ∈ M ).Recall that by (1), V = V ( M ) ∪ I is a partition of V where V ( M ) is the set of blackvertices and I is the set of white vertices which is independent.Since we assume that xy ∈ M (and is an edge in a P ), clearly, N ⊆ I and thus: N is an independent set of white vertices. (2)Moreover, no edge between N and N is in M . Since N ⊆ I and all neighbors ofvertices in I are in V ( M ), we have: N is a set of black vertices and G [ N ] is the disjoint union of edges and isolated vertices.(3)Let M denote the set of edges uv ∈ E with u, v ∈ N and let S = { u , . . . , u k } denotethe set of isolated vertices in N ; N = V ( M ) ∪ S is a partition of N . Obviously: M ⊆ M and S ⊆ V ( M ) . (4)Obviously, by (4), we have:Every edge in M is an xy -forced M -edge . (5)Thus, from now on, after applying the Edge Reduction for M -edges, we can assumethat V ( M ) = ∅ , i.e., N = S = { u , . . . , u k } . For every i ∈ { , . . . , k } , let u ′ i ∈ N denote the M -mate of u i (i.e., u i u ′ i ∈ M ). Let M = { u i u ′ i : 1 ≤ i ≤ k } denote the set of M -edges with one endpoint in S (and the other endpoint in N ). Obviously, by (4) andthe distance condition for a d.i.m. M , the following holds:No edge with both ends in N and no edge between N and N is in M. (6)6s a consequence of (6) and the fact that every triangle contains exactly one M -edge(recall Observation 1 ( i )), we have:For every C abc with a ∈ N , and b, c ∈ N , bc ∈ M is an xy -forced M -edge . (7)This means that for the edge bc , the Edge Reduction can be applied, and from nowon, we can assume that there is no such triangle abc with a ∈ N and b, c ∈ N , i.e., forevery edge uv ∈ E in N : N ( u ) ∩ N ( v ) ∩ N = ∅ . (8)According to (4) and the assumption that V ( M ) = ∅ (recall N = { u , . . . , u k } ), let: T one := { t ∈ N : | N ( t ) ∩ N | = 1 } , T i := T one ∩ N ( u i ), 1 ≤ i ≤ k , and S := N \ T one .By definition, T i is the set of private neighbors of u i ∈ N in N (note that u ′ i ∈ T i ), T ∪ . . . ∪ T k is a partition of T one , and T one ∪ S is a partition of N . Observation 5 ([4]) . The following statements hold: ( i ) For all i ∈ { , . . . , k } , T i ∩ V ( M ) = { u ′ i } . ( ii ) For all i ∈ { , . . . , k } , T i is the disjoint union of vertices and at most one edge. ( iii ) G [ N ] is bipartite. ( iv ) S ⊆ I , i.e., S is an independent subset of white vertices. ( v ) If a vertex t i ∈ T i sees two vertices in T j , i = j , i, j ∈ { , . . . , k } , then u i t i ∈ M isan xy -forced M -edge. Proof. ( i ): Holds by definition of T i and by the distance condition of a d.i.m. M .( ii ): Holds by Observation 3.( iii ): Follows by Observation 1 ( i ) since every odd cycle in G must contain at least one M -edge, and by (6).( iv ): If v ∈ S := N \ T one , i.e., v sees at least two M -vertices then clearly, v ∈ I , andthus, S ⊆ I is an independent subset (recall that I is an independent set).( v ): Suppose that t ∈ T sees a and b in T . If ab ∈ E then u , a, b, t would induce adiamond in G . Thus, ab / ∈ E and now, u , a, b, t induce a C in G ; by Observation 1 ( ii ),no edge in the C is in M , and by (6), the only possible M -edge for dominating t a, t b is u t , i.e., t = u ′ .By Observation 5 ( iv ) and the Vertex Reduction for the white vertices of S , we canassume:(A1) S = ∅ , i.e., N = T ∪ . . . ∪ T k .By Observation 5 ( v ), we can assume: 7A2) For i, j ∈ { , . . . , k } , i = j , every vertex t i ∈ T i has at most one neighbor in T j .In particular, if for some i ∈ { , . . . , k } , T i = ∅ , then there is no d.i.m. M of G with xy ∈ M , and if | T i | = 1, say T i = { t i } , then u i t i is an xy -forced M -edge. Thus, we canassume:(A3) For every i ∈ { , . . . , k } , | T i | ≥ t ∈ T i , 1 ≤ i ≤ k , is an out-vertex of T i if it is adjacent tosome vertex of T j with j = i , or it is adjacent to some vertex of N , and t is an in-vertex of T i otherwise.For finding a d.i.m. M with xy ∈ M , one can remove all but one in-vertices; thatcan be done in polynomial time. In particular, if there is an edge between two in-vertices t t ∈ E , t , t ∈ T i , then either t or t is black, and thus, T i is completely colored. Thus,let us assume:(A4) For every i ∈ { , . . . , k } , T i has at most one in-vertex. Observation 6. If v ∈ N i for i ≥ then v is an endpoint of an induced P , say withvertices v, v , v , v , v , v such that v , v , v , v , v ∈ { x, y } ∪ N ∪ . . . ∪ N i − and withedges vv ∈ E , v v ∈ E , v v ∈ E , v v ∈ E , v v ∈ E . Analogously, if v ∈ N then v isan endpoint of a corresponding induced P . Proof. If i ≥ P . Thus, assume that v ∈ N . Then v ∈ N and v ∈ N . Recall that y, x, r induce a P . If v r ∈ E then v, v , v , r, x, y induce a P . Thus assume that v r / ∈ E . Let v ∈ N be a neighbor of v . Now, if v x ∈ E then v, v , v , v , x, r induce a P , and if v x / ∈ E but v y ∈ E then v, v , v , v , y, x induce a P .Analogously, if v ∈ N then v is an endpoint of an induced P (which could be part of the P above). Thus, Observation 6 is shown. Observation 7.
There is no S , , in G [ N ] with vertices a, b, c, d and center a such that d ∈ T i , ≤ i ≤ k , while no vertex of { a, b, c } belongs to T i . Proof.
Suppose to the contrary that such an S , , exists in G [ N ]. By Observation 6, thevertex d is the endpoint of a P whose vertices are d, u i , v , v , v where u i is a neighbor of d in N and every vertex of { v , v , v } belongs to N ∪ { x, y } . Since no vertex of { a, b, c } is adjacent to a vertex of { u i , v , v , v } , it follows that { a, b, c, d, u i , v , v , v } induces a S , , in G with center a , which is a contradiction.By Observation 7, we have: Observation 8.
Let t i be a vertex of T i . The following statements hold: ( i ) If t i ∈ T i is part of an edge in T i and t i has a neighbor in T j , i = j , then t i has noother neighbor in N \ ( T i ∪ T j ) . ( ii ) If t i ∈ T i is not part of an edge in T i and t i has two neighbors in T j ∪ T s (possibly j = s ), then t i has no other neighbors in N \ ( T j ∪ T s ) . roof. ( i ): Without loss of generality, let t t ′ ∈ E for t , t ′ ∈ T , and suppose to thecontrary that t has two neighbors t i ∈ T i , t j ∈ T j , i = j , i, j ≥
2. Since G is diamond-free, t ′ t i / ∈ E and t ′ t j / ∈ E , and since G is butterfly-free, t i t j / ∈ E . But then t , t ′ , t i , t j (withcenter t ) induce an S , , in N , which is a contradiction.( ii ): Now without loss of generality, t ∈ T is not part of an edge in T . Suppose to thecontrary that t has three neighbors t i ∈ T i , t j ∈ T j , t h ∈ T h (possibly i = j ) and h = i, j ,then clearly, t i , t j , t h is independent (else there would be a triangle and thus, an M -edgein N – recall (6)). But then t , t i , t j , t h (with center t ) induce an S , , in N , which isa contradiction. Observation 9.
Assume that G has a d.i.m. M with xy ∈ M . Then there are no threeedges between T i and T j , i = j , and if there are two edges between T i and T j , say t i t j ∈ E and t ′ i t ′ j ∈ E for t i , t ′ i ∈ T i and t j , t ′ j ∈ T j then any other vertex in T i or T j is white. Proof.
First, suppose to the contrary that there are three edges between T and T , say t t ∈ E , t ′ t ′ ∈ E , and t ′′ t ′′ ∈ E for t i , t ′ i , t ′′ i ∈ T i , i = 1 ,
2. Then t is black if and only if t is white, t ′ is black if and only if t ′ is white, and t ′′ is black if and only if t ′′ is white.Without loss of generality, assume that t is black, and t is white. Then t ′ is white, and t ′ is black, but now, t ′′ and t ′′ are white, which is a contradiction.Now, if there are exactly two such edges between T and T , say t t ∈ E , t ′ t ′ ∈ E ,then again, t or t ′ is black as well as t or t ′ is black, and thus, every other vertex in T or T is white.Thus Observation 9 is shown.By Observation 9, we can assume:(A5) For i, j ∈ { , . . . , k } , i = j , there are at most two edges between T i and T j .Then let us introduce the following forcing rules (which are correct). Since no edge in N is in M (recall (6)), we have:(R1) All N -neighbors of a black vertex in N must be colored white, and all N -neighborsof a white vertex in N must be colored black.Moreover, we have:(R2) Every T i , i ∈ { , . . . , k } , should contain exactly one vertex which is black. Thus, if t ∈ T i is black then all the remaining vertices in T i \ { t } must be colored white.(R3) If all but one vertices of T i , 1 ≤ i ≤ k , are white and the final vertex t ∈ T i is notyet colored, then t must be colored black.Since no edge between N and N is in M (recall (6)), we have:(R4) For every edge st ∈ E with t ∈ N and s ∈ N , s is white if and only if t is blackand vice versa.Subsequently, for checking if G has a d.i.m. M with xy ∈ M , we consider the cases N = ∅ and N = ∅ . 9 The Case N = ∅ Let A xy := { x, y } ∪ N ∪ N ∪ N and B xy := V \ A xy . In this section we show thatfor the case N = ∅ (i.e., B xy = ∅ ), one can check in polynomial time whether G has ad.i.m. M with xy ∈ M ; we consider the feasible xy -colorings for G [ A xy ]. Recall that forevery edge uv ∈ M , u and v are black, for I = V ( G ) \ V ( M ), every vertex in I is white, N = S = { u , . . . , u k } and all u i , 1 ≤ i ≤ k , are black, T i = N ( u i ) ∩ N , and recallassumptions (A1)-(A5) and rules (R1)-(R4). In particular, S = ∅ , i.e., N = T ∪ . . . ∪ T k .Clearly, in the case N = ∅ , all the components of G [ S ∪ N ] can be independentlycolored. G [ { u i } ∪ T i ] is a trivial component in G [ S ∪ N ] if T i (cid:13) T j for every j = i . Obvi-ously, checking a possible d.i.m. M with xy ∈ M can be done easily (and independently)for trivial components; for a vertex u ′ i ∈ T i let u i u ′ i ∈ M .From now on we can assume that every component K in G [ S ∪ N ] is nontrivial, i.e., K contains at least two T i , T j , i = j which contact to each other. Every component withat most four S -vertices has a polynomial number of feasible xy -colorings. Thus, we canfocus on components with at least five S -vertices. Lemma 1.
There is no P ( t , t , t , t , t ) in G [ N ] with vertices t i ∈ T i , ≤ i ≤ . Proof.
Suppose to the contrary that there is a P ( t , t , t , t , t ) in G [ N ] with vertices t i ∈ T i , 1 ≤ i ≤
5. Let q ∈ N be an N -neighbor of u , and without loss of generality,assume that q x ∈ E .Since q , x, u , u , t , t , t , t (with center q ) do not induce an S , , in G , we have q u / ∈ E .Since q , x, u , u , t , t , t , u (with center q ) do not induce an S , , in G , we have q u / ∈ E .Since t , t , u , t , t , t , u , q (with center t ) do not induce an S , , in G , we have q u ∈ E .But then q , x, u , u , t , t , t , u (with center q ) induce an S , , in G , which is acontradiction.Thus, Lemma 1 is shown. Lemma 2.
If there is a P ( t , t , t ) , t i ∈ T i , ≤ i ≤ , in a nontrivial component of G [ S ∪ N ] then there is no other edge t i t j ∈ E , t i ∈ T i , t j ∈ T j , i, j / ∈ { , , } . Proof.
Suppose to the contrary that there is another edge, say t t ∈ E for t ∈ T and t ∈ T . Let u ∈ S with u t ∈ E . Let u ∈ S with u t ∈ E and let q ∈ N bea neighbor of u . Clearly, u t i / ∈ E for i ∈ { , , , } and u t j / ∈ E for j ∈ { , , , } .If u and u do not have any common neighbor in N then there would be an S , , in G [ { x, y }∪ N ∪{ u , u } ] with center t . Thus, assume that q u ∈ E . If { t , t , t } (cid:13){ t , t } then t , t , t , u , q , u , t , t (with center t ) would induce an S , , . Thus, { t , t } contacts { t , t , t } . Assume without loss of generality that t is black. Then t is white. Case 1. t is black.Then t , t are white, and the only possible edges between { t , t , t } and { t , t } are t t , t t , or t t . 10f t t ∈ E then t , t , t , t (with center t ) would induce an S , , . Thus, by Observa-tion 7, t t / ∈ E .If t t ∈ E and t t ∈ E then t , t , t , t (with center t ) would induce an S , , .Thus, by Observation 7, either t t / ∈ E or t t / ∈ E ; without loss of generality, assumethat t t ∈ E and t t / ∈ E . But then ( t , t , t , t , t ) induce a P in G [ N ], which is acontradiction to Lemma 1. Case 2. t is white.Then t , t are black, and the only possible edges between { t , t , t } and { t , t } are t t , t t , or t t .If t t ∈ E then t , t , t , t (with center t ) would induce an S , , . Thus, by Observa-tion 7, t t / ∈ E .If t t ∈ E and t t ∈ E then t , t , t , t (with center t ) would induce an S , , .Thus, by Observation 7, either t t / ∈ E or t t / ∈ E ; without loss of generality, assumethat t t ∈ E and t t / ∈ E . But then ( t , t , t , t , t ) induce a P in G [ N ], which is acontradiction to Lemma 1.Thus, Lemma 2 is shown. Lemma 3.
If there is a P ( t , t , t ) , t i ∈ T i , ≤ i ≤ , in a nontrivial component K of G [ S ∪ N ] then there are at most polynomially many feasible xy -colorings of K . Proof.
Let K = G [ { u , . . . , u p } ∪ T ∪ . . . ∪ T p ] be a nontrivial component in G [ S ∪ N ],and without loss of generality, assume that ( t , t , t ) is a P with t i ∈ T i , 1 ≤ i ≤ T i , i ≥
4, contacts T ∪ T ∪ T . If T i contacts a white vertex t ∈ T ∪ T ∪ T , say t i t ∈ E for t i ∈ T i , then t i is forced to be black, and thus, T i iscompletely colored. Now we consider T i which only contacts a black vertex in T ∪ T ∪ T . Case 1. t is black.Then let t ′ ∈ T and t ′ ∈ T be black vertices. By Observations 7 and 8, each of t ′ , t , t ′ contacts at most two T i , i ≥
4. Thus, there are at most n feasible xy -coloringsof K . In this case, it can be shown even more, namely t ′ as well as t ′ have at mostone such neighbor: Suppose to the contrary that t ′ has two neighbors t i , t j . Then t i , t j are white. Clearly, t i t j / ∈ E , and t t i / ∈ E , t t j / ∈ E (else there is an S , , in N withcenter t ). Clearly, t t ′ / ∈ E (else there is an S , , in N with center t ′ ). But now, t ′ , t i , t j , u , t , t , t , u (with center t ′ ) induce an S , , , which is a contradiction. Thus,there are at most n feasible xy -colorings of K . Case 2. t is white.Then t , t are black, and let t ′ ∈ T be a black vertex. Clearly, t and t have at mostone neighbor in some T i , and t ′ has at most two such neighbors. Thus, there are at most n feasible xy -colorings of K .Thus, Lemma 3 is shown.From now on we can assume:(A6) There is no P ( t i , t j , t h ), t i ∈ T i , t j ∈ T j , t h ∈ T h , in any nontrivial component K of G [ S ∪ N ].We first consider cycles in K : Let ( t , ( u ) , t ′ , t , ( u ) , t ′ , . . . , t h , ( u h ) , t ′ h ) with h ≥ G [ S ∪ N ]; if t i t ′ i ∈ E then u i is not part of the cycle.11 emma 4. Assume that G has a d.i.m. M with xy ∈ M . Then for any cycle ( t , ( u ) ,t ′ , t , ( u ) , t ′ , . . . , t h , ( u h ) , t ′ h ) with h ≥ and t i , t ′ i ∈ T i such that t ′ i t i +1 ∈ E ( i + 1 modulo h ) , either t i or t ′ i is black, and thus, any other vertex in T i is white. Proof.
Recall Observation 9 for h = 2. Now assume that h ≥ t and t ′ are white. Then t is black, t ′ is white, t is black and so on untilfinally, t h is black, t ′ h is white and the edge t ′ h t consists of two white vertices, which is acontradiction. Thus, either t i or t ′ i is black, and thus, any other vertex in T i is white.Thus, Lemma 4 is shown.Every such cycle in K has at most two feasible xy -colorings. Now, for coloring K ,we start with a cycle C in K and one of the two feasible xy -colorings of C . Then everyout-vertex t ′′ i ∈ T i having a neighbor in some T j which is not part of C is forced to bewhite since either t i or t ′ i (which are part of the cycle C ) are black (and by (A6), the blackvertex of t i , t ′ i has no other neighbor in some T j ). This leads to a black-forced neighbor t j ∈ T j , h + 1 ≤ j ≤ p , of t ′′ i , and it continues in the same way with every other contact in K . For the second feasible xy -coloring of C , it will be done in the same way.Thus, the DIM problem for K (i.e., there is either a d.i.m. for K or there is a contra-diction) is solved in polynomial time.If K has no chordless cycle then DIM for K can be solved in polynomial time sincein this case, K is K -free chordal and thus, the treewidth and the clique-width of K isbounded. In [7], it was mentioned that DIM is solvable in polynomial time for graphclasses with bounded clique-width.Summarizing, in the case N = ∅ , the previous results show that DIM for K has apolynomial time solution since all the components of G [ S ∪ N ] can be independentlycolored. This leads to: Theorem 2. If N = ∅ then one can check in polynomial time whether G has a d.i.m.containing xy . N = ∅ Recall A xy := { x, y } ∪ N ∪ N ∪ N and B xy := V \ A xy .Next we show: Lemma 5. G [ B xy \ N ] is S , , -free. Proof.
Suppose to the contrary that there is an S , , in G [ B xy \ N ], say with vertices a, b, c, d and edges ab, ac, ad ∈ E (i.e., center a ). Assume that the minimum distance levelcontaining a vertex of a, b, c, d is N p , p ≥
5, and let z ∈ N p − be a neighbor of the S , , and ( z, z , . . . , z ) be a P in G [ { x, y } ∪ N ∪ . . . ∪ N p − ] as in Observation 6.First assume that za ∈ E . Since z, a, b, c do not induce a diamond, we have zb / ∈ E or zc / ∈ E , and analogously, z, a, b, d as well as z, a, c, d do not induce a diamond. Then z is adjacent to at most one of b, c, d , say without loss of generality, zb ∈ E , zc / ∈ E ,and zd / ∈ E . But then a, c, d, z, z , . . . , z (with center a ) induce an S , , , which is acontradiction. Thus, za / ∈ E . 12ow, without loss of generality, assume that zb ∈ E . Since z, b, c, z , . . . , z (withcenter z ) do not induce an S , , , we have zc / ∈ E , and analogously, since z, b, d, z , . . . , z (with center z ) do not induce an S , , , we have zd / ∈ E . But now, a, c, d, b, z, z , z , z (with center a ) induce an S , , , which is a contradiction.Thus, Lemma 5 is shown. | N | ≤ Lemma 6. If | N | ≤ , then G [ A xy ] has at most O ( n ) feasible xy -colorings. Proof.
This directly follows by the above structure properties since | N | ≤ N = T ∪ T ∪ T ∪ T . In particular, for each ( t , t , t , t ) ∈ T × T × T × T , one can assign thecolor black to vertices t , t , t , t (and then assign the color white to the remaining verticesof T ∪ T ∪ T ∪ T ), and check if { xy, u t , u t , u t , u t } is a d.i.m. of G [ A xy ]. Lemma 7.
If the colors of all vertices in G [ A xy ] are fixed then the colors of all verticesin N are forced. Proof.
Let v ∈ N and let w ∈ N be a neighbor of v . Since by (6), every edge between N and N is xy -excluded, we have: If w is white then v is black, and if w is black then v is white. Theorem 3. If | N | ≤ then one can check in polynomial time whether G has a d.i.m.containing xy . Proof.
The proof is given by the following procedure:
Procedure 4.1.Input:
A connected ( S , , ) -free graph G = ( V, E ) , andan edge xy ∈ E , which is part of a P in G . Task:
Return either a d.i.m. M with xy ∈ M or a proof that G has no d.i.m. containing xy . ( a ) if N = ∅ then apply the approach described in Section . Then return either ad.i.m. M with xy ∈ M or “ G has no d.i.m. containing xy ”. ( b ) if N = ∅ then for A xy := { x, y } ∪ N ∪ N ∪ N and B xy := V \ A xy do ( b. Compute all black-white xy -colorings of G [ A xy ] by Lemma . If no such xy -coloring without contradiction exists, then return “ G has no d.i.m. containing xy ” ( b. for each xy -coloring of G [ A xy ] do Derive a partial xy -coloring of G [ B xy ] by the forcing rules; in particular allvertices of N will be colored by Lemma according to the xy -coloring of G [ A xy ] ; if a contradiction arises in vertex coloring then proceed to the next xy -coloring of G [ A xy ] else apply the algorithm of Cardoso et al. in [ ] ( see Theorem i )) todetermine if G [ B xy \ N ] (which is claw-free by Lemma ) has a d.i.m. f G [ B xy \ N ] has a d.i.m. then STOP and return the xy -coloring of G derived by the xy -coloring of G [ X ] and by such a d.i.m. of G [ B xy ] . ( b. STOP and return “ G has no d.i.m. containing xy ”. The correctness of Procedure 4.1 follows from the structural analysis of S , , -freegraphs with a d.i.m. and by the results in the present section.The polynomial time bound of Procedure 4.1 follows from the fact that Step (a) canbe done in polynomial time by the results in Section 3, and Step (b) can be done inpolynomial time by Lemma 6, since the forcing rules can be executed in polynomial time,and since the solution algorithm of Cardoso et al. (see Theorem 1 ( i )) can be executed inpolynomial time. Thus, Theorem 3 is shown. | N | ≥ Lemma 8. If | N | ≥ and there is an end-vertex u i ∈ N of a P ( u i , t i , z , z ) with t i ∈ T i , z ∈ N , and z ∈ N ∪ N then there exists a vertex q i ∈ N such that q i u i ∈ E and q i has a second neighbor u j ∈ N , i = j , i.e., u i and u j have a common N -neighbor. Proof.
Without loss of generality, assume that ( u , t , z , z ) is a P with u ∈ S , t ∈ T , z ∈ N , and z ∈ N ∪ N . Let q ∈ N be a neighbor of u . Recall that by Observation 3, x and y have at most one common neighbor in N , and recall that | N | ≥ q is a common neighbor of x and y . Then there are at least twovertices u , u ∈ N with N -neighbors q , q which see either the same x or y (but notboth of them); without loss of generality, assume that q u ∈ E and q u ∈ E for q x ∈ E and q x ∈ E . Suppose to the contrary that u , u do not see q (else u has a common N -neighbor with u or u ).If u q ∈ E then, since ( q , u , u , x, q , u , t , z ) do not induce an S , , with center q , we have u q ∈ E , i.e., u and u have a common N -neighbor q .If u q / ∈ E and u q ∈ E , q u ∈ E , u q / ∈ E with q x ∈ E and q x ∈ E then,since ( x, q , q , q , u , t , z , z ) do not induce an S , , with center x , we have u q ∈ E or u q ∈ E , i.e., u and u have a common N -neighbor q or u and u have a common N -neighbor q .Next assume that q is no common neighbor of x and y , say without loss of generality, q x ∈ E and q y / ∈ E . Suppose to the contrary that u does not see q (else u has acommon N -neighbor with u ). Let q ∈ N with q u ∈ E . If q x ∈ E and q y / ∈ E then,since ( x, q , y, q , u , t , z , z ) do not induce an S , , with center q , we have u q ∈ E ,i.e., u and u have a common N -neighbor q .Now assume that q y ∈ E . First assume that q x ∈ E and q y ∈ E . If there are twoneighbors u , u ∈ N of q which do not see q then, since ( q , u , u , x, q , u , t , z ) donot induce an S , , with center q , we have u q ∈ E , i.e., u and u have a common N -neighbor q . Now assume that q has only one N -neighbor u . Clearly, every othervertex u i , i ≥
3, in N has an N -neighbor which sees only y .Assume that q u ∈ E and q u ∈ E as well as q y ∈ E , and suppose to the contrarythat u , u do not see q . Then, since ( q , u , u , y, x, q , u , t ) do not induce an S , , with center q , we have u q ∈ E , i.e., u and u have a common N -neighbor q .14inally assume that q u ∈ E and q u / ∈ E , q u ∈ E and q u / ∈ E , as well as q y ∈ E and q y ∈ E . Then, since ( y, q , q , x, q , u , t , z ) do not induce an S , , withcenter q , we have u q ∈ E or u q ∈ E , i.e., u and u have a common N -neighbor q ,or u and u have a common N -neighbor q .Thus, Lemma 8 is shown. Lemma 9. If | N | ≥ then there is no P ( u i , t i , z , z , z ) with u i ∈ N , t i ∈ T i , z ∈ N , z ∈ N ∪ N , and z ∈ N ∪ N ∪ N . Proof.
Suppose to the contrary that there is such a P ( u , t , z , z , z ) with u ∈ N , t ∈ T , z ∈ N , z ∈ N ∪ N , and z ∈ N ∪ N ∪ N . Let q ∈ N with q u ∈ E , andwithout loss of generality, let q x ∈ E . By Lemma 8, there is a second vertex u ′ ∈ N with q u ′ ∈ E . But then q , x, u ′ , u , t , z , z , z (with center q ) induce an S , , , whichis a contradiction.Thus, Lemma 9 is shown.Since N = ∅ would lead to such a P as in Lemma 9, we have: Lemma 10. If | N | ≥ then N = ∅ . Thus, from now on, we can assume that B xy = N ∪ N . N = ∅ In this case, we show that one can check in polynomial time whether G has a d.i.m. M with xy ∈ M . Recall Lemma 7.Let K be a nontrivial component of G [ S ∪ N ∪ N ]. Clearly, K can have severalcomponents in G [ S ∪ N ] which are connected by some N -vertices. K can be colored bystarting with a component in G [ S ∪ N ] which is part of K .For every i ∈ { , . . . , k } , let Ext ( T i ) := N ( T i ) ∩ N . Since N = ∅ and by (6), every edge between N and N is xy -excluded, we have:If v ∈ N with N ( v ) ∩ N = ∅ then v is white . (9)Thus, from now on, by the Vertex Reduction, we can assume that every vertex in N has a neighbor in N . Recall that G is (diamond,butterfly)-free and therefore triangles aredisjoint. We first claim: Lemma 11. G [ N ] is P -free. Proof.
Suppose to the contrary that there is a P ( a, b, c ) in G [ N ], and let t ∈ T be aneighbor of b in N . Recall that by (8), t a / ∈ E and t c / ∈ E (and recall Observation 6where t is the endpoint of a P ). But then, b, a, c, t , u , q , x, y (with center b ) induce an S , , if for the N -neighbor q of u , q x ∈ E and q y / ∈ E , and correspondingly for theother cases of q -neighbors (since y, x, r induce a P ).15hus, Lemma 11 is shown.Now let us consider an edge vw ∈ E , with v, w ∈ N , which is isolated in G [ N ]. Again,since N = ∅ and by (6), every edge between N and N is xy -excluded, we have: If v iswhite then w is black but there exists no vertex w ′ such that ww ′ ∈ M , i.e., there is nod.i.m. M with xy ∈ M . Thus:If for v, w ∈ N , N ( v ) ∩ N = { w } and N ( w ) ∩ N = { v } then v, w are black . (10)Next we show: Lemma 12.
At most one
Ext ( T i ) has a C in G [ N ] . Proof.
Suppose to the contrary that there are two such cases. Without loss of generality,suppose that there is a C z z z in Ext ( T ), and there is a C z z z in Ext ( T ). Withoutloss of generality, assume that z , z are black and thus, z is white as well as z , z areblack and thus, z is white. Let t , t ′ , t ′′ ∈ T be the neighbors of z , z , z , i.e., t z ∈ E , t ′ z ∈ E , and t ′′ z ∈ E as well as t z ∈ E , t ′ z ∈ E , and t ′′ z ∈ E for t , t ′ , t ′′ ∈ T .Recall that by (8), t , t ′ , t ′′ ∈ T are distinct, and t , t ′ , t ′′ ∈ T are distinct. By the colorsof z , . . . , z , we have that t , t ′ , t , t ′ are white and t ′′ , t ′′ are black.First assume that u and u do not have a common neighbor in N ; for q , q ∈ N ,let q u ∈ E and q u ∈ E but q u / ∈ E and q u / ∈ E . Recall that t , t ′ , t are white. If q x ∈ E and q x ∈ E then u , t , t ′ , q , x, q , u , t (with center u ) would induce an S , , ,and analogously, for q y ∈ E and q y ∈ E . If q and q do not have a common neighbor x or y then without loss of generality, let q x ∈ E , q y / ∈ E , and q y ∈ E , q x / ∈ E . Butthen u , t , t ′ , q , x, y, q , u (with center u ) induce an S , , , which is a contradiction.Thus, we can assume that there is a common neighbor q ∈ N , q u ∈ E , q u ∈ E .By the colors (recall that t , t ′ , t , z are white), and since t , t ′ , u , q , u , t , z , z (withcenter u ) do not induce an S , , , we have t z ∈ E or t ′ z ∈ E ; without loss of generality,assume that t z ∈ E . Recall Observation 6 where t is the endpoint of a P .But then z , t , z , t and the P with endpoint t induce an S , , (with center z ),which is a contradiction.Thus, Lemma 12 is shown.If there is no C in any Ext ( T i ) then clearly, by Lemma 11, (9) and (10), the colorsof all vertices in K are forced. If there is a C in exactly one of the Ext ( T i ), then forthe three possible M -edges in the C , one can color all the other vertices accordingly inpolynomial time. This leads to: Theorem 4. If | N | ≥ and N = ∅ then one can check in polynomial time whether G has a d.i.m. containing xy . N = ∅ Lemma 13.
Let z ∈ N . Then the following statements hold: ( i ) If z has a neighbor z ′ ∈ N and z ′ has a neighbor z ′′ ∈ N then zz ′′ ∈ E . ( ii ) If z has a neighbor in N then N ( z ) ∩ N is an edge or a single vertex. iii ) If z contacts T i and T j for i = j then N ( z ) ∩ N = ∅ . Proof. ( i ): Let t i ∈ T i be a neighbor of z . By Lemma 9, ( u i , t i , z, z ′ , z ′′ ) is no P . Thus,we have zz ′′ ∈ E .( ii ): If z has two independent neighbors w , w ∈ N ( z ) ∩ N , i.e., w w / ∈ E then byObservation 6, z is an endpoint of a P in { x, y } ∪ N ∪ . . . ∪ N , and it leads to an S , , with the P and w , w (with center z ), which is a contradiction. Thus, N ( z ) ∩ N is anedge or a single vertex.( iii ): Let z contact T i and T j for i = j , say zt i ∈ E and zt j ∈ E for t i ∈ T i and t j ∈ T j . By(6), t i t j / ∈ E (else, z, t i , t j induce a triangle, and then, there is no d.i.m. M with xy ∈ M ).Suppose to the contrary that z contacts N , say zz ′ ∈ E for some z ′ ∈ N . But then,by Observation 6, it leads to an S , , with the P along t i , and with t j , z ′ (with center z ).Thus, Lemma 13 is shown. Lemma 14. G [ N ] is P - and C -free. Proof.
First suppose to the contrary that there is a P ( a, b, c ) in G [ N ]. Let z a ∈ N bea neighbor of a . Then, by Lemma 13 ( ii ), z a c / ∈ E . Let t i ∈ T i be a neighbor of z a . ByLemma 9, ( b, a, z a , t i , u i ) do not induce a P . Thus, z a b ∈ E but now ( c, b, z a , t i , u i ) inducea P , which is a contradiction. Thus, G [ N ] is P -free.Now suppose to the contrary that there is a C ( a, b, c ) in G [ N ]. Let again z a ∈ N bea neighbor of a . Since G is ( K ,diamond)-free, z a is nonadjacent to b and c , and let again t i ∈ T i be a neighbor of z a but now, ( b, a, z a , t i , u i ) induce a P , which is a contradiction.Thus, G [ N ] is C -free.Thus, Lemma 14 is shown. Lemma 15.
There is no P in G [ N ∪ N ] with at least one N -end-vertex. Proof.
By Lemma 14, there is no P ( a, b, c ) with a, b, c ∈ N . By Lemma 13 ( i ), there isno P ( a, b, c ) with a ∈ N and b, c ∈ N . By Lemma 13 ( ii ), there is no P ( a, b, c ) with b ∈ N and a, c ∈ N .Finally, let ( a, b, c ) be a P with a, b ∈ N and c ∈ N . Since for a neighbor t i ∈ N ofvertex a , ( u i , t i , a, b, c ) would induce a P , we have t i b ∈ E , i.e., t i , a, b induce a C , butby (8), after the Edge Reduction, there is no such triangle.Thus, Lemma 15 is shown.Recall that by (6), every edge between N and N is xy -excluded (and recall (9)).Thus we have:If v ∈ N is isolated in N ∪ N then v is white . (11)Now, by the Vertex Reduction, we can assume that every vertex in N has a neighborin N ∪ N . Lemma 16. If z ∈ N is isolated in G [ N ] and z has at least two nonadjacent neighborsin N then z is xy -forced to be white. roof. Let z , z ∈ N be neighbors of z ∈ N , z z / ∈ E , and let t i ∈ N be a neighborof z . By Lemma 9, ( u i , t i , z , z, z ) do not induce a P . Thus, t i is a common neighborof z and z . Suppose to the contrary that z is black. Then, since t i , z , z , z induce a C , t i is black. Since z ∈ N is isolated in G [ N ], there is a black neighbor z ′ ∈ N of z (ifthere is such a d.i.m. M in G with xy ∈ M ). Since G is diamond-free, z ′ does not see bothof z , z , say z ′ z / ∈ E . But then ( u i , t i , z , z, z ′ ) induce a P , which is a contradiction toLemma 9.Thus, Lemma 16 is shown.Now, by the Vertex Reduction, we can assume that every vertex which is isolated in G [ N ] has either exactly one neighbor or exactly two adjacent neighbors in N .A component of G [ N ∪ N ] with at least one vertex in N is trivial if it has exactlytwo vertices, namely a ∈ N and b ∈ N with ab ∈ E . Lemma 17.
Each nontrivial component of G [ N ∪ N ] with at least one vertex in N , isa triangle abc with one of the following two types: ( i ) a, b ∈ N , and c ∈ N , or ( ii ) a ∈ N , and b, c ∈ N . Proof.
Let K be a nontrivial component of G [ N ∪ N ] with at least one vertex in N .First assume that K has a triangle abc with a, b ∈ N , and c ∈ N . By Lemma 15,there is no P with at least one end-vertex in N .If c has a neighbor d ∈ N then, since ( a, c, d ) do not induce a P , we have ad ∈ E ,and since ( b, c, d ) do not induce a P , we have bd ∈ E , but then a, b, c, d induce a K in G , which is a contradiction. Thus, vertex c is isolated in N .If one of a, b has another neighbor in N , say bd ∈ E for a vertex d ∈ N then,since ( d, b, c ) do not induce a P , we have cd ∈ E , which is a contradiction since G is(diamond, K )-free.Next assume that K has a triangle abc with a ∈ N , and b, c ∈ N . By the same argu-ments, since there is no P with at least one end-vertex in N , and since G is (diamond, K )-free, there is no other neighbor of abc in N ∪ N .Thus, Lemma 17 is shown. Lemma 18.
If the colors of all vertices in N are fixed then it implies the colors of allvertices in N . Proof.
Let K be a component in G [ N ∪ N ]. First assume that K is trivial with ab ∈ E for a ∈ N and b ∈ N . If a is white then G has no d.i.m. M with xy ∈ M . If a isblack then, since the edges between N and N are xy -excluded, and K is trivial (i.e., a is nonadjacent to any black vertex in N ), b is black.Now assume that K is nontrivial of type ( i ) in Lemma 17. If a or b is white then c isblack, else c is white.Finally, assume that K is nontrivial of type ( ii ) in Lemma 17. If a is white then b and c are black. If a is black then by Lemma 17 ( ii ), a is nonadjacent to any black vertex in N , and then the M -mate of a is b or c , i.e., b is black if and only if c is white.18hus, Lemma 18 is shown.This finally leads to a polynomial number of feasible xy -colorings for each componentin G [ N ∪ N ∪ N ∪ N ] (recall that all these components can be independently colored).This leads to: Theorem 5. If | N | ≥ and N = ∅ then one can check in polynomial time whether G has a d.i.m. containing xy . This completes the proof that DIM can be solved for S , , -free graphs in polynomialtime. Acknowledgment.
We are grateful to the anonymous referees for their helpful comments.The second author would like to witness that he just tries to pray a lot and is not able todo anything without that - ad laudem Domini.
References [1] N. Biggs, Perfect codes in graphs,
Journal of Combinatorial Theory, Series B
15 (1973), 289-296.[2] A. Brandst¨adt, C. Hundt, and R. Nevries, Efficient Edge Domination on Hole-Free graphs in Poly-nomial Time, Conference Proceedings LATIN 2010,
Lecture Notes in Computer Science P -Free Graphs in Linear Time, Algorithmica
68 (2014), 998-1018.[4] A. Brandst¨adt and R. Mosca, Finding Dominating Induced Matchings in P -Free Graphs in Polyno-mial Time, Algorithmica
77 (2017), 1283-1302.[5] A. Brandst¨adt and R. Mosca, Dominating Induced Matchings in S , , -Free Graphs, CoRRarXiv:1706.09301, 2017. Available online in Discrete Applied Math. [6] A. Brandst¨adt and R. Mosca, Finding Dominating Induced Matchings in S , , -Free Graphs, CoRRarXiv:1706.04894, 2017. Available online in Discrete Applied Math. [7] D.M. Cardoso, N. Korpelainen, and V.V. Lozin, On the complexity of the dominating induced match-ing problem in hereditary classes of graphs,
Discrete Applied Math.
159 (2011), 521-531.[8] D.L. Grinstead, P.L. Slater, N.A. Sherwani, and N.D. Holmes, Efficient edge domination problems ingraphs,
Information Processing Letters
48 (1993), 221-228.[9] A. Hertz, V.V. Lozin, B. Ries, V. Zamaraev, and D. de Werra, Dominating induced matchings ingraphs containing no long claw,
Journal of Graph Theory
88 (2018), no. 1, 18-39.[10] N. Korpelainen, V.V. Lozin, and C. Purcell, Dominating induced matchings in graphs without a skewstar,
J. Discrete Algorithms
26 (2014), 45-55.[11] C.L. Lu, M.-T. Ko, and C.Y. Tang, Perfect edge domination and efficient edge domination in graphs,
Discrete Applied Math.
Vol. 119 (3) (2002), 227-250.[12] C.L. Lu and C.Y. Tang, Solving the weighted efficient edge domination problem on bipartite permu-tation graphs,
Discrete Applied Math.
87 (1998), 203-211.87 (1998), 203-211.