Independent sets in ($P_4+P_4$,Triangle)-free graphs

The Maximum Weight Independent Set Problem (WIS) is a well-known NP-hard problem. A popular way to study WIS is to detect graph classes for which WIS can be solved in polynomial time, with particular reference to hereditary graph classes, i.e., defined by a hereditary graph property or equivalently by forbidding one or more induced subgraphs. Given two graphs $G$ and $H$, $G+H$ denotes the disjoint union of $G$ and $H$. This manuscript shows that (i) WIS can be solved for ($P_4+P_4$, Triangle)-free graphs in polynomial time, where a $P_4$ is an induced path of four vertices and a Triangle is a cycle of three vertices, and that in particular it turns out that (ii) for every ($P_4+P_4$, Triangle)-free graph $G$ there is a family ${\cal S}$ of subsets of $V(G)$ inducing (complete) bipartite subgraphs of $G$, which contains polynomially many members and can be computed in polynomial time, such that every maximal independent set of $G$ is contained in some member of ${\cal S}$. These results seem to be harmonic with respect to other polynomial results for WIS on certain [subclasses of] $S_{i,j,k}$-free graphs and to other structure results on [subclasses of] Triangle-free graphs.


Introduction
For any missing notation or reference let us refer to [6].
For any graph G, let V (G) and E(G) denote respectively the vertex-set and the edge-set of G. Let G be a graph. For any subset U ⊆ V (G), let G[U] denote the subgraph of G induced by U. For any vertex-set U ⊆ V (G), let N(U) = {v ∈ V (G) \ U : v is adjacent to some u ∈ U} be the neighborhood of U in G. In particular: if U = {u 1 , . . . , u k }, then let us simply write N(u 1 , . . . , u k ) instead of N({u 1 , . . . , u k }); for any vertex-set W ⊆ V (G), with U ∩ W = ∅, let us write N W (U) = N(U) ∩ W . For any vertex-set U ⊆ V (G), let us say that A(U) = V (G) \ (U ∪ N(U)) is the anti-neighborhood of U in G. For any vertex v ∈ V (G) and for any subset U ⊂ V (G) (with v ∈ U), let us say that: v contacts U if v is adjacent to some vertex of U; v is partial to U if v contacts U but is non-adjacent to some vertex of U; v is universal to U if v is adjacent to all vertices of U.
A component of G is a maximal connected subgraph of G. A component of G is trivial if it is a singleton, and nontrivial otherwise. A component-set of G is the vertex set of a component of G. A component-set of G is trivial if it is a singleton, and nontrivial otherwise. A clique of G is a set of pairwise adjacent vertices of G. An independent set (or a stable set) of G is a subset of pairwise nonadjacent vertices of G. An independent set of G is maximal if it is not properly contained in another independent set of G.
A graph G is H-free, for a given graph H, if G contains no induced subgraph isomorphic to H; in particular H is called a forbidden induced subgraph of G. A graph class is hereditary if it is defined by a hereditary graph property or equivalently by forbidding a family of induced subgraphs. Given two graphs G and F , G + F denotes the disjoint union of G and F ; in particular lG = G + G + . . . + G denotes the disjoint union of l copies of G.
A graph G is bipartite if V (G) admits a partition {A, B} such that A and B are independent sets of G, i.e., such that The following specific graphs are mentioned later. A P k has vertices v 1 , v 2 , . . . , v k and edges v j v j+1 for 1 ≤ j < k. A C k has vertices v 1 , v 2 , . . . , v k and edges v j v j+1 for 1 ≤ j < k and v k v 1 . A K n is a complete graph of n vertices. A Claw has vertices a, b, c, d, and edges ab, ac, ad. A F ork has vertices a, b, c, d, e, and edges ab, ac, ad, de (then a Fork contains a Claw as an induced subgraph). A S i,j,k is the graph obtained from a Claw by subdividing respectively its edges into i, j, k edges (e.g., S 0,1,2 is P 4 , S 1,1,1 is Claw).
The Maximum Weight Independent Set Problem (WIS) is the following: Given a graph G and a weight function w on V (G), determine an independent set of G of maximum weight, where the weight of an independent set I is given by the sum of w(v) for v ∈ I. Let α w (G) denote the maximum weight of any independent set of G. The WIS problem reduces to the IS problem if all vertices v have the same weight w(v) = 1.
Let us report the following result due to Alekseev [2,5].
Theorem 1 [2] Let X be a class of graphs defined by a finite set M of forbidden induced subgraphs. If M contains no graph every connected component of which is S i,j,k for some indices i, j, k, then the (W)IS problem is NP-hard in the class X.
Theorem 1 implies that (unless P = NP) for any graph F , if WIS can be solved for F -free graphs in polynomial time, then each connected component of F is S i,j,k for some indices i, j, k. Then Lozin [23] conjectured that WIS can be solved in polynomial time for S i,j,k -graphs for any fixed indices i, j, k. The above allows one to focus on possible open problems, i.e., on possible graph classes for which WIS may be solved in polynomial time.
This manuscript shows that (i) WIS can be solved for (P 4 + P 4 , Triangle)-free graphs in polynomial time, and that in particular it turns out that (ii) for every (P 4 + P 4 , Triangle)-free graph G there is a family S of subsets of V (G) inducing (complete) bipartite subgraphs of G, which contains polynomially many members and can be computed in polynomial time, such that every maximal independent set of G is contained in some member of S.
The class of P 4 + P 4 -free graphs has been considered since, according to the above mentioned polynomial results and to possibly forthcoming similar polynomial results, it may be one of the next boundary graph classes for which the complexity of WIS is an open problem.
The class of Triangle-free has been considered in the context of similar previous manuscripts on other subclasses of Triangle-free graphs, namely, on (P 7 ,Triangle)free graphs [7] − see [27] for an extension of this result − and more generally on (S 1,2,4 ,Triangle)-free graphs [9].
However let us observe that Lozin's conjecture is open also for those S i,j,k -graphs for any fixed indices i, j, k which in addition are Triangle-free − recalling that WIS remains NPhard for Triangle-free graphs − that is for restricted and more studied graph classes. Let us mention just a recent strong result due to Pilipczuk et al. [34] stating that graphs containing no Theta [a T heta is a graph made of three internally vertex-disjoint chordless paths P 1 = a...b, P 2 = a...b, P 3 = a...b of length at least 2 and such that no edges exist between the paths except the three edges incident to a and the three edges incident to b], no Triangle, and no S i,j,k as induced subgraphs for any fixed indices i, j, k have bounded treewidht, which implies that a large number of NP-hard problems can be solved in polynomial time for such graphs, in particular the WIS problem.
2 Independent sets in (P 4 +P 4 , Triangle)-free graphs In this section let us show that WIS can be solved for (P 4 + P 4 , Triangle)-free graphs in polynomial time.
First let us introduce two general observations: they are easy to prove and are the basis of the approach − in other contexts called anti-neighborhood approach − which will be used later.
Observation 2 For any graph G and for any order v 1 , v 2 , . . . , v n of the vertices of G, For any induced P 4 of any (P 4 + P 4 , Triangle)-free G, say P , of vertex set V (P ) = {a, b, c, d} and edge set E(P ) = {ab, bc, cd}, one has that N(V (P )) admits the partition Then the following observations can be shown with no difficult. Then let us recall that WIS can be solved for bipartite graphs in polynomial time [1,11,20]. In particular let us formalize as lemma the following fact which can be (independently) shown with no difficult. Proof. The proof is introduced in Subsection 2.1.
✷ Then let us consider the following algorithm.
Output: a maximum weight independent set of G.
For each induced P 4 of G, say P , of vertex set V (P ) = {a, b, c, d} and edge set E(P ) = {ab, bc, cd} do: ( (1.4) select a best weight independent set of G over {Q 1 , Q 2 , Q 3 }: denote it as Q(P ).
Select a best weight independent set of G over {Q(P ) : P is an induced P 4 of G}: denote it as Q black .
(3.1) Remove from G all the vertices of G which belong to an induced P 4 of G: let G ′ be the graph obtained in this way.
(3.2) Compute [by Lemma 1] a maximum weight independent set of G ′ : denote it as Q white .
Select a best weight independent set of G over {Q black , Q white } and output it.

Theorem 2
The WIS problem can be solved for (P 4 + P 4 , T riangle)-free graphs in polynomial time via Algorithm Last.
Proof. First let us show that Algorithm Last can be executed in polynomial time.
As a preliminary let us observe that any (input) graph G contains O(n 4 ) induced P 4 's. Concerning Then let us show that Algorithm Last is correct.
Let U be any maximum (weight) independent set U of G: then let us show that Algorithm Last computes U or an equivalent optimal solution.
Then let us consider the following exhaustive subcases.
Then a maximum weight independent set of G is computed in steps (1.1)-(1.2) with respect to P .
This case can be treated similarly to Case 1.1 by symmetry.
Then a maximum weight independent set of G is a maximum weight independent set , so that vertices d, c, c ′ c ′′ induce a P 4 say P (c) of G, and then a maximum weight independent set of G is computed in step (1.3) with respect to P (c).
Note that every maximum weight (thus maximal) independent set of G[V (G) \ N(a)] not containing vertices of {b, c, d} has to contain some vertex of S c , namely there is a vertex say c ′ ∈ U ∩ S c , so that vertices a, b, c, c ′ induce a P 4 say P ′ of G, and then a maximum weight independent set of G is computed in step (1.3) with respect to P ′ .
Note that every maximum weight (thus maximal) independent set of G[V (G) \ N(b)] not containing vertices of {a, c, d} has to contain some vertex of S d ∪ S ad , namely there is a vertex say d ′ ∈ U ∩(S d ∪S ad ), so that vertices b, c, d, d ′ induce a P 4 say P ′ of G, and then a maximum weight independent set of G is computed in step (1.3) with respect to P ′ .
This case can be treated similarly to Case 1.5 by symmetry.
This case can be treated similarly to Case 1.4 by symmetry.
Then a maximum weight independent set of G is computed in Step 3.
This completes the proof of the theorem. ✷

Proof of Lemma 1
In this subsection let us introduce the proof of Lemma 1.
Let G be a (P 4 + P 4 , Triangle)-free graph, with vertex weight function w, containing an induced P 4 say P of vertex set V (P ) = {a, b, c, d} and edge set E(P ) = {ab, bc, cd}.
Let us show that a maximum weight independent set of G containing {a, c} (containing {b, d}, respectively, by symmetry) can be computed in polynomial time.
A maximum weight independent set of G containing {a, c} can be computed by solving Then, since vertices of {a, c} are isolated in such a graph, the problem can be reduced to graph Then let us show that WIS can be solved for The proof consists of solving a sequence of cases which are more and more difficult/general, each of which is solved by a reduction to the previous solved case, where the basic case is that of complete bipartite graphs. In this sense the proof is not a massive case distinction.
In what follows two main macro-cases are solved, namely, CASE A as the facilitated case and CASE B as the general case. For any maximum (weight) independent set U of G one of the following cases occurs:  Let us define an order ′ < ′ on S: let us say that, for any u, v ∈ S, u < v if v is bi-partial to two non-trivial component-sets of G[T \ N(u)]. Proof. As a preliminary let us introduce the following observation. Let u, v ∈ S and assume u < v, that is, v be bi-partial to two non-trivial component-sets

respectively).
Proof of Fact 1. By contradiction assume that u contacts H 1 and that N H 1 (u) ⊂ N H 1 (v) (i.e., u is adjacent to a vertex of H 1 \ Z 1 non-adjacent to v). Then, by Observation 4 and since v is bi-partial to Z 1 , one has that (considering that u may contact H 1 either in the same side as v or in the other side): from one hand the subgraph induced by u and H 1 contains an induced P 4 not contacted by v, and from the other hand the subgraph induced by v and by Z 2 contains an induced P 4 , i.e., an induced P 4 + P 4 arises (contradiction Then by Fact 1 one that H 3 = H 1 , H 2 and that H 4 = H 1 , H 2 . Then, from one hand the subgraph induced by v and Z 1 contains an induced P 4 , and from the other hand the subgraph induced by u and Z 3 contains an induced P 4 , i.e., an induced P 4 + P 4 arises (contradiction). ✷ Now let v 1 , v 2 , . . . , v p ∈ S, for some natural p ≥ 3, and assume v 1 < v 2 < . . . < v p . Then v j is bi-partial to two non-trivial component-sets, say Z 1 (j), Z 2 (j), of G[T \ N(v j−1 )] for j ∈ {2, . . . , p}. Then let H 1 (j), H 2 (j) be the two members of H such that Z 1 (j) ⊆ H 1 (j) and Z 2 (j) ⊆ H 2 (j) for j ∈ {2, . . . , p}.

without loss of generality by symmetry), then by construction
, since otherwise a P 4 + P 4 arises (one P 4 is contained in the subgraph induced by v p−1 and Z 1 (p − 1), one P 4 is contained in the subgraph induced by v p , Z 1 (p), Z 2 (p)). Then v p contacts Z 1 (p − 1). The same holds for Z 2 (p − 1) by symmetry.

without loss of generality by symmetry), then by construction
then v p contacts Z 1 (j − 1), since otherwise a P 4 + P 4 arises (one P 4 is contained in the subgraph induced by v p−1 and Z 1 (j − 1), one P 4 is contained in the subgraph induced by v p , Z 1 (j), Z 2 (j)). Then v p contacts Z 1 (j − 1). The same holds for Z 2 (j − 1) by symmetry.
Then Fact 3 is proved. ✷ Proof of Fact 4. By contradiction assume v p < v 1 . Then v 1 is bi-partial to two non-trivial component-sets, say Z 1 , Z 2 , of G[T \ N(v p )]. Then let H 1 , H 2 be the two members of H such that Z 1 ⊆ H 1 and Z 2 ⊆ H 2 . Let us recall that v p contacts Z 1 (2), Z 2 (2) by Fact 3. If either H 1 = H 1 (2) or H 1 = H 2 (2), say H 1 = H 1 (2) (without loss of generality by symmetry), then by construction , then v p contacts Z 1 (contradiction), since otherwise a P 4 + P 4 arises (one P 4 is contained in the subgraph induced by v 1 and Z 1 , one P 4 is contained in the subgraph induced by v p , Z 1 (2), Z 2 (2)). ✷ Let us conclude the proof of Claim 3. By Facts 2 and 4, there are no vertices u 1 , u 2 , . . . , u k ∈ S (for k ≥ 2) such that u 1 < u 2 < . . . < u k < u 1 , i.e., there is no cycle in the ordered set (S, <). Then (S, <) admits a maximal element, i.e., there exists v * ∈ S such that no vertex of S is bi-partial to two non-trivial component-sets The above fact can be seen (more formally) by defining a directed graph, namely D = (S, E(S)), such that for any u, v ∈ S there is directed edge (u, v) if and only if u < v; then by the above D is acyclic; then it is well-known [and not difficult to check] that D contains at least one vertex with zero out-degree.
In particular, WIS can be solved for This completes the solution for CASE A.

CASE B: the general case.
Let us show that WIS can be solved for Let us recall that S b ∪ S bd and S d ∪ S bd are independent sets and that every non-trivial component of G[A(V (P ))] is complete bipartite.
For brevity let us write T = A(V (P )). Let Let us assume that v ′ ∈ S ′ b without loss of generality by symmetry. Let us show that WIS can be solved for Then let us write  Proof of Fact 2. By contradiction assume that a vertex v ∈ S ′′ d has neighbors say h 1 , h 2 , which are non-neighbors of v ′ , in respectively two component-sets say ] contains an induced P 4 , say P * , of vertex-set V (P * ). Then: from one hand |V (P * ) ∩ S ′′ d | ≥ 1, since G[T ′′ ] is P 4 -free; from the other hand |V (P * ) ∩ S ′′ d | ≤ 2, since S ′′ d is an independent set. The occurrence |V (P * ) ∩ S ′′ d | = 1 is not possible by Observation 4 and by Fact 2 with respect to the vertex of V (P * ) ∩ S ′′ d . The occurrence |V (P * ) ∩ S ′′ d | = 2 is not possible as shown in the following suboccurrences.
Assume that V (P * ) = {u, x, v, y}, with u, v ∈ S ′′ d and x, y ∈ T ′′ , with edges ux, xv, vy. Then, since v is adjacent to both x and y, by Fact 2 vertices x, y belong to the same component-set of G[T ′ ]. But this contradicts the assumption of Case 1 with respect to u.
Assume that V (P * ) = {u, x, y, v}, with u, v ∈ S ′′ d and x, y ∈ T ′′ , with edges ux, xy, vy. Then, since vertices x, y are adjacent, vertices x, y belong to the same component-set of one can refer to CASE A. Then, as remarked above, this implies that WIS can be solved for G in polynomial time.
This completes the solution for CASE B.

Concluding remarks
Let us list some possible concluding remarks.
1. In [32], it is shown that every connected Paw-free graph is either Triangle-free or complete multipartite [a P aw has vertices a, b, c, d, and edges ab, ac, ad, bc]. This result and Theorem 2 directly imply that the WIS problem can be solved for (P 4 + P 4 , Paw)-free graphs in polynomial time. Furthermore in [33], it is shown that if a prime graph contains a Triangle then it contains a House, or a Bull, or a Double-Gem [a House has vertices a, b, c, d, e, and edges ab, ac, bc, be, cd, de; a Bull has vertices a, b, c, d, e, and edges ab, ac, bc, be, cd; a Double-Gem has vertices a, b, c, d, e, f , and edges ac, ad, ae, bd, be, bf, cd, de, ef ]. This result and Theorem 2, by well known results on prime graphs (see e.g. [24]), imply that the WIS problem can be solved for (P 4 + P 4 , House, Bull, Double-Gem)-free graphs in polynomial time.
2. The proof of Theorem 2 is based on the anti-neighborhood approach by finally reducing the problem to instances of complete bipartite graphs for which the problem can be solved in linear time. Then the time bound of Theorem 2, i.e., of Algorithm Last, may be estimated as O(n 15 ) time.
Then one can derive the following result, which is similar to the corresponding results obtained for (P 7 ,Triangle)-free graphs [7] and for (S 1,2,4 ,Triangle)-free graphs [9], and which seems to be harmonic [together with such results] with respect to the result of Prömel et al. [37] showing that with "high probability" removing a single vertex in a Triangle-free graph leads to a bipartite graph. Open Problem. What is the complexity of (W)IS for P 4 + P 4 -free graphs?