New Results on Independent Sets in Extensions of 2 K 2 -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 is solvable in polynomial time, with particular reference to hereditary graph classes, i. e., de ﬁ ned by a hereditary graph property or equivalently by forbidding one or more induced subgraphs. For any two graphs G and H , G þ H denotes the disjoint union of G and H . A lK 2 is the disjoint union of l edges. A Y m ; m is the disjoint union of two stars of m þ 1 vertices plus one vertex that is adjacent only to the centers of such stars. For any graph family Y , the class of Y -free graphs is formed by graphs which are Y -free for every Y 2 Y , and the class of lK 2 þ Y -free graphs is formed by graph which are lK 2 þ Y -free for every Y 2 Y . The main result of this manuscript is the following: For any constant m and for any graph family Y which contains an induced subgraph of Y m ; m , if WIS is solvable in polynomial time for Y -free graphs, then WIS is solvable in polynomial time for lK 2 þ Y -free graphs for any constant l . That extends some known polynomial results, namely, when Y ¼ f Y g and Y is a fork or is a P 5 . The proof of the main result is based on Farber ’ s approach to prove that every 2 K 2 -free graph has O ð n 2 Þ maximal independent sets (Farber in Discrete Math 73:249 – 260, 1989), which directly leads to a polynomial time algorithm to solve WIS for 2 K 2 -free graphs through a dynamic programming approach, and on some extensions of Farber ’ s approach.


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 vertex-set U V ðGÞ, let N G ðU Þ ¼ fv 2 V ðGÞ n U : v is adjacent to some u 2 U g be the neighborhood of U in G, and A G ðU Þ ¼ V ðGÞ n ðU [ N ðU ÞÞ be the anti-neighborhood of U in G. If U ¼ fu 1 ; . . .; u k g, then let us simply write N G ðu 1 ; . . .; u k Þ instead of N G ðU Þ, and A G ðu 1 ; . . .; u k Þ instead of A G ðU Þ. For any subset U V ðGÞ let G[U] be the subgraph of G induced by U. For any vertex v 2 V ðGÞ and for any subset U & V ðGÞ, with v 6 2 U , let us say that: v contacts U if v is adjacent to some vertex of U; v dominates U if v is adjacent to each vertex of U. For any vertex-sets U ; W V ðGÞ, let us say that U has a co-join to W (or generally that U and W have mutually a co-join) if U \ W ¼ ; and if each vertex of U is non-adjacent to each vertex of W. A component of G is the vertex set of a maximal connected subgraph of G. A component 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 a graph 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.
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 K 1;n -which is also called a star of n þ 1 vertices-is a complete bipartite graph whose sides respectively have one vertex, called the center of the star, and n vertices, called the leaves of the star (if n ¼ 1 then there are two trivial centers). A claw has vertices a, b, c, d, and edges ab, ac, ad; then a claw is a K 1;3 . A fork has vertices a, b, c, d, e, and edges ab, ac, ad, de; then a fork contains both a P 4 and a claw as induced subgraphs. A Y m 0 ;m 00 , for some constants m 0 ; m 00 , is the graph formed by two disjoint stars K 1;m 0 and K 1;m 00 plus one vertex which is adjacent only to the centers of such stars; a Y m;m , for some constant m, is decipted in Fig. 1.
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. Given two graphs G and H, G þ H denotes the disjoint union of G and H; in particular, lG ¼ G þ G þ Á Á Á þ G denotes the disjoint union of l copies of G. For any graph family Y, the class of Y-free graphs is formed by graphs which are Y-free for every Y 2 Y, and the class of lK 2 þ Y-free graphs is formed by graph which are lK 2 þ Yfree for every Y 2 Y. 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 2 I. Let a w ðGÞ denote the maximum weight of any independent set of G. WIS reduces to the Maximum Independent Set Problem (MIS) if all vertices v have the same weight wðvÞ ¼ 1.
As one can easily check, for any graph G one has a w ðGÞ ¼ maxfwðvÞ þ a w ðG½AðvÞÞ : v 2 V g Then WIS for any graph G can be reduced to the same problem for the antineighborhoods of all vertices of G. Then one has: Proposition 1 For any graph F, if WIS can be solved for F-free graphs in polynomial time, then WIS can be solved for lK 1 þ F-free graphs in polynomial time for any constant l. h Let us report the following result due to Alekseev [1,4]. Let us say that a graph is of type T if it is the graph S i;j;k depicted in Fig. 1 for some indices i, j, k (e.g., S 0;1;2 is a P 4 , S 1;1;1 is a claw).  Alekseev's result implies that WIS is NP-hard for K 1;4 -free graphs-the fact that WIS is NP-hard for K 1;4 -free graphs is already mentioned in [32].
Alekseev's result implies that (unless P = NP) for any graph F, if WIS is polynomial for F-free graphs, then each connected component of F is of type T. By Proposition 1, for any graph F, if WIS can be solved for F-free graphs in polynomial time, then WIS can be solved for lK 1 þ F-free graphs for any constant l in polynomial time. It follows that, since WIS can be solved in polynomial time for fork-free graphs [4,27], for P 6 -free graphs [22,24], and for lclaw-free graphs for any constant l [9], the minimal graphs F of type T for which the complexity of WIS for Ffree graphs is open are: P 7 , S 1;1;3 , S 1;2;2 , K 2 þ P 4 . Then the minimal graph classes, defined by forbidding one induced subgraph, for which the complexity of WIS is open are: P 7 -free graphs, S 1;1;3 -free graphs, S 1;2;2 -free graphs, K 2 þ P 4 -free graphs.
The main result of this manuscript is the following: Theorem 2 For any constant m and for any graph family Y containing an induced subgraph of Y m;m , if WIS can be solved for Y-free graphs in polynomial time, then WIS can be solved for lK 2 þ Y-free graphs in polynomial time for any constant l. h The proof of the main result is based on Farber's approach to prove that every 2K 2 -free graph has Oðn 2 Þ maximal independent sets [14], which directly leads to a polynomial time algorithm to solve WIS for 2K 2 -free graphs through a dynamic programming approach, and on some extensions of Farber's approach [28,29].
In details Sect. 2 reports Farber's approach, together with related results, and preliminaries; Sect. 3 reports the preliminary step from [29]; Sect. 4 provides the main step for the case of K 2 þ Y m;m -free graphs; Sect. 5 provides the further step for the case of lK 2 þ Y m;m -free graphs for any constant l by iterating the main step.
Then by Theorem 2 one obtains two corollaries for the case in which Y is defined by a single graph say Y, that is Y ¼ fY g, where Y is an induced subgraph of Y m;m . They provide an extension of some polynomial results [and of some possibly forthcoming polynomial results] and which may be useful in view of a possible classification, according to Alekseev's result [1,4], of the complexity of WIS for graph classes defined by forbidding one induced subgraph.
Corollary 1 WIS can be solved for lK 2 ?fork-free graphs and for lK 2 þ P 5 -free graphs, for any constant l, in polynomial time. h In particular Corollary 1: (i) addresses the open case concerning WIS for K 2 þ P 4free graphs; (ii) extends the known polynomial results concerning WIS for fork-free graphs and for P 5 -free graphs; (iii) implies that the new minimal graph classes, defined by forbidding one induced subgraph, for which the complexity of (W)IS is open are: P 7 -free graphs, S 1;1;3 -free graphs, S 1;2;2 -free graphs, K 2 þ P 6 -free graphs, P 3 þ P 4 -free graphs.
The second corollary concerns those Y-free graphs for which the complexity of WIS is known to be open. According to the aforementioned known results and to Alekseev's result [1,4], such Y-free graphs are S 1;1;3 -free graphs [i.e. Y 1;2 -free graphs].
Corollary 2 If WIS can be solved for S 1;1;3 -free graphs in polynomial time, then WIS can be solved for lK 2 þ S 1;1;3 -free graphs for any constant l in polynomial time. h Remark 1 Concerning Corollary 1, let us recall that MIS can be solved for fork-free graphs in polynomial time with a not specified time bound [3]. By [27] WIS can be solved for fork-free in nT time where T is the time bound to solve WIS for claw-free graphs. Different references on polynomial time algorithm to solve WIS for claw-free graphs [32,36,43] were known, however as recently shown WIS can be solved for claw-free graphs in Oðn 3 Þ time by [13], and even in Oðn 2 log nÞ time by [37] which is the best known time bound. Then by [27] WIS can be solved for fork-free graphs in Oðn 3 log nÞ time. On the other hand, WIS can be solved for P 5 -free graphs G in OðjEðGÞjjV ðGÞj 12 Þ time [25]. h Remark 2 Concerning Corollary 2, let us recall that MIS can be solved for (S 1;1;3 ,K p;p )-free graphs (for any constant p) in polynomial time [12]; then, by Theorem 2, MIS can be solved for lK 2 þ(S 1;1;3 ,K p;p )-free graphs (for any constants l and p) in polynomial time. h Remark 3 Let us observe that (a) the results of this manuscript are not implied by Corollary 6 of [29], since Corollary 6 of [29] concerns subclasses of Y m;m -free graphs, and (b) the results of this manuscript do not imply and should not be implied by the results of [34], since those results concern the class of m-plausible graphs for a constant m; in particular, m-plausible graphs (e.g., chordal graphs) are not necessarily Y m;m -free graphs, and it seems to be difficult to directly show that Y m;m -free graphs are m-plausible graphs as remarked in [34]. h Let us conclude this section by formalizing two possible open problems. Open Problem 1 The complexity of WIS (of MIS) for the new minimal graph classes, defined by forbidding one induced subgraph, for which it is open: P 7 -free graphs, S 1;1;3 -free graphs, S 1;2;2 -free graphs, K 2 þ P 6 -free graphs, P 3 þ P 4 -free graphs.
Open Problem 2 New sufficient conditions to extend Proposition 1 to the case of lK 2 -free graphs for any constant l, or more generally, new extensions of lK 2 -free graphs for any constant l for which WIS (for which MIS) can be solved in polynomial time.

Independent Sets in 2K -free Graphs
In this section, let us report from [29] an algorithm, namely Algorithm Alpha, which formalizes the aforementioned Farber's approach [14] and which is the basis of what follows.
For a graph G, with vertex set fv 1 ; v 2 ; . . .; v n g, let us write G i :¼G½fv 1 ; v 2 ; . . .; v i g. At each iteration i, 1 i n, Algorithm Alpha provides a family S i of subsets of fv 1 ; v 2 ; . . .; v i g such that each maximal independent set of G i is contained in some member of S i .

Algorithm Alpha
Input: A 2K 2 -free graph G with vertex set fv 1 ; v 2 ; . . .; v n g. Step 2 [Addition of some members to S] end Then let us consider the following algorithm to solve WIS for 2K 2 -free graphs.

Algorithm WIS
Input: A 2K 2 -free graph G.
Output: A maximum weight independent set of G. It is clear from the description of Algorithm Alpha that, since G is 2K 2 -free, every member of the family S produced by the algorithm is an independent set of G. Moreover, according to Farber's argumentation, S contains all maximal independent sets of G, which can be proven by induction on i. Then one obtains the following result: Theorem 3 [14] WIS can be solved for 2K 2 -free graphs in Oðn 4 Þ time via Algorithm WIS. h Then let us report an extension of Farber's approach for lK 2 -free graphs for any constant l; that is split (according to the literature) into a structure result shown by different authors [2,15,42] and a computational result shown by combining such a structure result and an algorithm generating all maximal independent sets of a graph [44].
Theorem 4 [2,15,42] For any constant l and for any lK 2 -free graph G, the family of all maximal independent sets of G contains Oðn 2lÀ2 Þ members. h Theorem 5 [2,15,42,44] For any constant l and for any lK 2 -free graph G one has: (i) the family of all maximal independent sets of G can be computed in polynomial time, (ii) WIS can be solved for G in polynomial time. h Farber's approach seems to admit further possibilities of extension, e.g. [9, 15, 29-31, 33, 34], one of which is reported in Sect. 3.
Finally let us introduce a definition which will be useful later. Notation: For convenience let us denote the star K 1;t , for any constant t, by the pair (c, L), where c is the center of the star and L is the set of leaves of the star with jLj ¼ t.
Definition 1 Let G be a graph and let p be a natural. A p-star set of G is a set H & V ðGÞ such that (i) G contains p induced stars, namely ðc 1 ; L 1 Þ; . . .; ðc p ; L p Þ, called the stars of H, which have mutually a co-join, Furthermore let us say that, for any natural m, a p-star set of G, say The following observation can be proved by the above definition.
Observation 1 Let G be a graph and let H be a p-star set of G for a natural p. Then all non-trivial components of G[H] are contained in the anti-neighborhood of an (easily detectable) induced pK 2 of G. h

Independent Sets in Y m,m -free Graphs
In this section, let us present an algorithm, namely Algorithm Beta(0,m) where m is any fixed natural, which is just a slightly modified version of Algorithm BðmÞ of [29], which is an extension of Algorithm Alpha. That allows a very similar description between this algorithm and its extensions presented in the next sections, namely Algorithm Beta(l, m), for l ! 1; in this sense the description of Algorithm Beta(0,m) may look redundant with respect to that of Algorithm BðmÞ of [29] but it already prepares the description of its extensions presented in the next sections. The subsequent Algorithm Beta(0, m) computes a family S of subsets of V(G), for any input Y m;m -free graph G, which fulfills properties analogous to Lemma 3, Lemma 4, and Theorem 5 of [29].
Let us introduce some preliminaries for Algorithm Beta(0,m).
For a graph G, with vertex set fv 1 ; v 2 ; . . .; v n g, let us write G i :¼G½fv 1 ; v 2 ; . . .; v i g. At each iteration i, 1 i n, Algorithm Beta(0,m) provides a family S i of subsets of fv 1 ; v 2 ; . . .; v i g such that each maximal independent set of G i is contained in some member of S i .
The members of S are of two kinds: 1-marked and unmarked. Each 1-marked member is created and marked [or derives from a 1-marked member which has been created and marked] in Step 2 of some loop. Then it is possibly extended in Step 1 of the successive loops. Each 1-marked member H is a 1-star set of G whose star is of a center vertex u 1 ðHÞ 6 2 H called the marker of H. Each 1-marked member H keeps its marker u 1 ðHÞ along its possible extensions.
Each unmarked member (in particular the family S produced by Algorithm Beta (0,m) contains exactly one unmarked member) is created in the initialization step as the empty set. Then it is possibly extended in Step 1 of the successive loops. Each unmarked member is an independent set of G.
For any subset H of V(G), let us denote as: For any subset H of V(G) and for any vertex v 2 V ðGÞ n H, let us say that with respect to H: Output: A family S of subsets of V(G). S 0 :¼f;g (and say that ; is unmarked) Step 1 [Extension of some members of The following lemmas can be proved by arguments similar to that of Lemma 3, Lemma 4, and Theorem 5 of [29]; for the sake of completeness let us describe such arguments.
Lemma 1 Referring to Algorithm Beta(0,m): . . .; n, is a 1-star set whose star is of center u 1 ðHÞ and of leaves a subset of H 0 ; (ii) every unmarked member of S i , for i ¼ 1; . . .; n, is an independent set (in particular S i contains exactly one unmarked member); (iii) the family S produced by Algorithm Beta(0,m) can be partitioned into fS one ; S two ; S three g, where: S one ¼ fI 2 S : I is an independent setg, S two ¼ fI 2 S : I is a 1-star m-full set, I is not an independent setg, S three ¼ fI 2 S : I is a 1-star set, I is not an independent set, I is not a 1-star m-full setg.
Proof Proof of (i). Each 1-marked member is created in Step 2 of some loop and then it is possibly extended in Step (1.2) of the successive loops. Then, by definition of Step 2 and by definition of u 1 ðHÞ, each 1-marked member H satisfies Statement (i) at the moment of its creation. Furthermore each 1-marked member satisfies Statement (i) after its possible extensions by definition of a vertex of Type 1 and Type 3 (let us observe that each 1-marked member H keeps its marker u 1 ðHÞ along its possible extensions). Proof of (ii). If an unmarked member has been created as an independent set, then it will remain an independent set after its possible extensions in Step (1.1) by definition of a vertex of Type 1. Then, to complete the proof, note that exactly one unmarked member is created, i.e., the empty set in the initialization step, and the empty set is trivially an independent set.
Prof of (iii). It follows by Statements (i)- (ii) and by definition of Algorithm Beta (0,m). h Lemma 2 Let S be the family of subsets of V(G) produced by Algorithm Beta(0,m). Then for any maximal independent set I of G there is a member H 2 S such that I H.
Proof As above let S i denote the content of the family S after i loops of the algorithm, for i ¼ 1; . . .; n. Then to prove the lemma, let us show that for any maximal independent set I of G i , there is a member H 2 S i such that I H. The proof is by induction on i, for i ¼ 1; . . .; n. For i ¼ 1, S 1 ¼ ffv 1 gg, and fv 1 g is obviously the only maximal independent set in the graph G 1 . Then let us assume that the assertion holds for i À 1 and prove that it holds for i.
Let I be a maximal independent set of G i . Assume that v i 6 2 I. Then by the inductive hypothesis I is contained in some member of S iÀ1 and thus of S i , since each member of S iÀ1 is contained (properly or not) in some member of S i .
Assume that v i 2 I. Then by the inductive hypothesis let H be a member of S iÀ1 containing Infv i g.
Case 1. H is unmarked. By Lemma 1 (ii) H is an independent set, i.e., H ¼ H 0 , and thus v i can be just of Type 1 or 2 with respect to H.
Finally let us consider the case in which v i is of Type 4 with respect to H.
Since v i is of Type 4, v i is adjacent to u 1 ðHÞ and to a vertex say h of H Ã . Let us write U ¼ N ðu 1 ðHÞÞ \ ðInfv i gÞ and T ¼ N ðhÞ \ ðInfv i gÞ. Note that, by Lemma 1 (i), fu 1 ðHÞg [ U has a co-join to fhg [ T . Furthermore, by construction, U 6 ¼ ;.
Step 2). Assume that T 6 ¼ ;. Therefore, either jU j\m, or jT j\m, else vertices of h Lemma 3 Algorithm Beta(0,m) runs in time Oðn mþ5 Þ and computes a family S of size Oðn mþ2 Þ.
Proof Concerning 1-marked members of S. The total number of new 1-marked members added to S by each Step 2 of each loop of Algorithm Beta(0, m) is at most n mþ2 (that is at most n mþ1 for each loop). In particular, since each 1-marked member can be created/extended in Oðn 2 Þ time (in particular in order to determine the connected components) and since the loops are n, all 1-marked members can be computed in Oðn mþ5 Þ time.
Concerning unmarked members of S. Exactly one unmarked member is contained in S. Such an unmarked member is created as the empty set in the initialization step and then it is possibly extended in Step 1 of the successive loops of Algorithm Beta (0, m) in O(n) time; therefore, since the loops are n, it can be computed in Oðn 2 Þ time.
Therefore maxfOðn mþ5 Þ; Oðn 2 Þg (= Oðn mþ5 Þ) is the time bound of Algorithm Beta(0, m). h Then, let us consider the following algorithm to solve WIS for Y-free graphs, where Y is any graph family containing an induced subgraph of Y m;m .
Output: A maximum weight independent set of G. The subsequent Algorithm Beta(1, m) computes a family S of subsets of V(G), for any input K 2 þ Y m;m -free graph G, which fulfills properties analogous to Lemmas 1, 2, 3.
The preliminaries for Algorithm Beta(1, m) are exactly those for Algorithm Beta (0, m) except for the following points.
The members of S are of three kinds: 1-marked, 2-marked, unmarked. Each 1-marked member is created and marked [or derives from a 1-marked member which has been created and marked] in Step 3 of some loop. Then it is possibly extended in Step 1 of the successive loops. Each 1-marked member H is a 1-star set of G whose star is of a center vertex u 1 ðHÞ 6 2 H called the marker of H. Each 1-marked member H keeps its marker u 1 ðHÞ along its possible extensions.
Each 2-marked member is created with respect to some 1-marked member in Step 2 of some loop. Then it is possibly extended in Step 1 of the successive loops. Each 2-marked member H is a 2-star m-full set of G whose stars are respectively of center two vertices u 1 ðHÞ; u 2 ðHÞ 6 2 H called the markers of H. Each 2-marked member H keeps its markers u 1 ðHÞ; u 2 ðHÞ along its possible extensions.
Each unmarked member is created either in the initialization step, i.e., the empty set, or in Step 2 of some loop with respect to some p-marked member for some p 2 f1; 2g. Then it is possibly extended in Step 1 of the successive loops. Each unmarked member is an independent set of G.
For any subset H of V(G) and for any vertex v 2 V ðGÞnH, let us say that with respect to H: Algorithm Beta(1, m) . . .; v n g.
Output: A family S of subsets of V(G).
S 0 :¼f;g (and say that ; is unmarked) Step  G½H Ã nN ðv i Þ is K 2 -free, i.e., H Ã nN ðv i Þ is an independent set; (v) every unmarked member of S i , for i ¼ 1; . . .; n, is an independent set; (vi) the family S produced by Algorithm Beta(1,m) can be partitioned into fS one ; S two ; S three g, where: : S one ¼ fI 2 S : I is an independent setg, S two ¼ fI 2 S : I is a p-star m-full set for some p 2 f1; 2g, I is not an independent setg, S three ¼ fI 2 S : I is a p-star set for some p 2 f1; 2g, I is not an independent set, I is not a p-star m-full set for p 2 f1; 2gg.
Proof Proof of (i). The proof is similar to that of Lemma 1 (i), with Step 3 instead of Step 2. Proof of (ii). Each 2-marked member is created in Step (2.1) of some loop and then it is possibly extended in Step (1.2) of the successive loops. Then, by definition of Step (2.1) and by definition of u 1 ðHÞ and u 2 ðHÞ, each 2-marked member satisfies Statement (ii) at the moment of its creation. Furthermore each 2-marked member satisfies Statement (ii) after its possible extensions by definition of a vertex of Type 1 being adjacent to at most one marker of H and of Type 3 (let us observe that each 2marked member H keeps its markers u 1 ðHÞ; u 2 ðHÞ along its possible extensions).
Proof of (i'). At Step ( Proof of (ii'). At Step (2.2) of Loop i of Algorithm Beta(1, m), for i ¼ 1; . . .; n, H is 2-marked and v i is either of Type 1 being adjacent to at least two markers of H or of Type 5. Therefore, by Statement (ii), v i and the two stars of H induce a subgraph of G i that contains an induced Y m;m . Then Statement (ii') follows since G is K 2 þ Y m;mfree.
Proof of (iii). If an unmarked member has been created as an independent set, then it will remain an independent set after its possible extensions in Step (1.1) by definition of a vertex of Type 1. Then, to complete the proof, note that unmarked members are created either in the initialization step, i.e., the empty set, or in Step 2 of each loop, which is well defined by Statement (i'). Concerning the empty set, it is trivially an independent set. Concerning Step 2 of each loop: in Step (2.1) unmarked members (i.e., the members of Qði; HÞ) are independent sets by definition of H 0 , of H Ã , and of S 0 one ; in Step (2.2) unmarked members (i.e., the members of Rði; HÞ) are independent sets by definition.
Proof of (iv). It follows by Statements (i)- (iii) and by definition of Algorithm Beta (1,m). h Lemma 5 Let S be the family of subsets of V(G) produced by Algorithm Beta(1,m). Then for any maximal independent set I of G, there is a member H 2 S such that I H.
Proof The first part of this proof is similar to the first part of the proof of Lemma 2. Case 1. H is unmarked. This case is similar to Case 1 of Lemma 2, with Lemma 4 instead of Lemma 1, and with Step 3 instead of Step 2.
Case 2. H is p-marked for some p 2 f1; 2g. Case 2.1. p ¼ 1. By Lemma 4 (i) H is a 1-star set of G whose star is of center u 1 ðHÞ and of leaves a subset of H 0 . In particular v i can be just of Type 1 or 2 or 3 or 4 with respect to H. If v i is of Type 1 with respect to H being adjacent to at most one marker of H or of Type 3 with respect to H, then I H [ fv i g 2 S i (Step 1). If v i is of Type 2 with respect to H, then there exists a vertex u 2 N G i ðv i Þ that has no neighbors in Infv i g, that is, I is Let us consider the case in which v i is of Type 1 with respect to H being adjacent to at least two markers of H.
Then I is contained in some member of the family Rði; HÞ generated by Step (2.2) of Loop i of Algorithm Beta(1,m).
Let us consider the case in which v i is of Type 4 with respect to H. Since I is a maximal independent set of G i , I is a maximal independent set of G½H [ fv i g as well, i.e., Infv i g is a maximal independent set of G½HnN ðv i Þ. In particular, since v is of Type 4, one has that v i is adjacent to u 1 ðHÞ and that H 0 & Infv i g.
If Assume that M 0 2 S 0 three . Therefore, M 0 is a 1-star set of G½H Ã nN ðv i Þ, whose star say ðc 0 ; L 0 Þ is such that jL 0 j\m and is clearly a star of G i as well. Then I is contained in the set L 0 [ A G i ðc 0 ; L 0 Þ 2 S i (Step 3).
Case 2.2. p ¼ 2. By Lemma 4 (ii) H is a 2-star m-full set of G whose stars respectively are of centers u 1 ðHÞ; u 2 ðHÞ and of leaves a subset of H 0 . If v i is of Type 1 with respect to H being adjacent to at most one marker of H or of Type 3 with respect to H, then I H [ fv i g 2 S i (Step 1). If v i is of Type 2 with respect to H, then there exists a vertex u 2 N G i ðv i Þ that has no neighbors in Infv i g, that is, I is contained in the set Let us consider the case in which v i is either of Type 1 with respect to H being adjacent to at least two markers of H or of Type 5 with respect to H.
Then I is contained in some member of the family Rði; HÞ generated by Step (2.2) of Loop i of Algorithm Beta(1,m).
Let us consider the case in which v i is of Type 4 with respect to H. Without loss of generality by symmetry let us assume that v i is adjacent to u 1 ðHÞ and is non-adjacent to u 2 ðHÞ.
Let U j , for j ¼ 1; 2, denote the set of neighbors of u j ðHÞ in H 0 ; then by the above jU j j ! m.
Since v i is of Type 4, v i is adjacent to a vertex say h of H Ã . Let us write T ¼ N ðhÞ \ ðInfv i gÞ. Note that, by Lemma 4 (ii), fu 1 ðHÞg [ U 1 has a co-join to fhg [ T .
Assume that T ¼ ;. Then I is contained in the set Step 3). Assume that T 6 ¼ ;. Therefore jT j\m, else vertices of T would induce a Y m;m , that is, any edge of the remaining star of H of center u 2 ðHÞ and such an induced Y m;m would induce a K 2 þ Y m;m , which is not possible Proof of (iii): Concerning 1-marked members of S. The total number of new 1-marked members added to S by each Step 3 of each loop of Algorithm Beta(1, m) is at most n mþ2 (that is at most n mþ1 for each loop); in particular, since each 1-marked member can be created/extended in Oðn 2 Þ time (in particular in order to determine the connected components) and since the loops are n, all 1-marked members can be computed in Oðn mþ5 Þ time.
Concerning 2-marked members of S. Each 2-marked member is created with respect to some 1-marked member in Step (2.1) and then it is possibly extended in Step 1 of the successive loops. By statement (i), for i ¼ 1; . . .; n, and for any 1marked member H, the family T ði; HÞ of 2-marked members contains Oðn mþ1 Þ members and can be computed in Oðn mþ4 Þ time. Therefore, since i ¼ 1; . . .; n and since the total number of 1-marked members is Oðn mþ2 Þ, the total number of 2marked members from families T ði; HÞ (for i ¼ 1; . . .; n, and for any 1-marked member H) is Oðn 2mþ4 Þ, and all such members can be computed in Oðn 2mþ7 Þ time; in particular, since each 2-marked member can be extended in O(n) time and since the loops are n, all 2-marked members can be computed in Oðn 2mþ9 Þ time.
Concerning unmarked members of S. Each unmarked member (except for the unmarked member which is created as the empty set in the initialization step and then is possibly extended in Step 1 of the successive loops) is created with respect to some 1-marked member in Step (2.1) or with respect to some 2-marked member in Step (2.2), and then it is possibly extended in Step 1 of the successive loops.
By statement (i), for i ¼ 1; . . .; n, and for any 1-marked member H, the family Qði; HÞ of unmarked members contains Oðn mþ1 Þ members and can be computed in Oðn mþ4 Þ time. Therefore, since i ¼ 1; . . .; n and since the total number of 1-marked members is Oðn mþ2 Þ, the total number of unmarked numbers from families Qði; HÞ (for i ¼ 1; . . .; n, and for any 1-marked member H) is Oðn 2mþ4 Þ, and all such members can be computed in Oðn 2mþ7 Þ time; in particular, since each unmarked member can be extended in O(n) time and since the loops are n, all such unmarked members can be computed in Oðn 2mþ9 Þ time.
By statement (ii), for i ¼ 1; . . .; n, and for any 2-marked member H, the family Rði; HÞ of unmarked members contains 1 member and can be computed in O(n) time. Therefore, since i ¼ 1; . . .; n and since the total number of 2-marked members is Oðn 2mþ4 Þ by the above, the total numbers of unmarked members from families Rði; HÞ (for i ¼ 1; . . .; n, and for any 2-marked member H) is Oðn 2mþ5 Þ, and all such members can be computed in Oðn 2mþ6 Þ time; in particular, since each unmarked member can be extended in O(n) time and since the loops are n, all such unmarked members can be computed in Oðn 2mþ8 Þ time.
Summarizing: the total number of members of the family S produced by Algorithm Beta(1, m) is Oðn 2mþ5 Þ, and all such members can be computed in Oðn 2mþ9 Þ time, which is also the time bound of Algorithm Beta(1, m). h Then, let us consider the following algorithm to solve WIS for K 2 þ Y-free graphs, where Y is any graph family containing an induced subgraph of Y m;m .
Algorithm WIS(1, m) Output: A maximum weight independent set of G. Beta(1, m) for G. Let S be the family of subsets of G produced in this way.  On the other hand, by Lemma 4 (iv) and by Observation 1, for each H 2 S only two cases may occur: either H is an independent set (and then the problem is trivial), or each non-trivial component K of G[H] is contained in the anti-neighborhood of one edge of G (easily detectable), i.e., K is Y-free since G is K 2 þ Y-free. Therefore PHASE 2 can be executed in Oðn 2mþ5þt Þ time whenever WIS can be solved for Y-free graphs in Oðn t Þ time for some constant t.

PHASE 1. Execute Algorithm
Then Algorithm WIS(1, m) can be executed in Oðn 2mþmaxf9;5þtg Þ time whenever WIS can be solved for Y-free graphs in Oðn t Þ time for some constant t. h Then one obtains the following result.
Theorem 8 For any constant m and for any graph family Y containing an induced subgraph of Y m;m , if WIS can be solved for Y-free graphs in polynomial time, then WIS can be solved for K 2 þ Y-free graphs in polynomial time. h 5 Independent Sets in lK 2 + Y m,m -free Graphs In this section, let us introduce a class of algorithms which generalize/iterate Algorithm Beta(1, m) of the previous section. The subsequent recursive Algorithm Beta(l, m), for any l ! 1, computes a family S of subsets of V(G), for any input lK 2 þ Y m;m -free graph G, which fulfills properties analogous to that of Lemmas 4, 5, 6. In particular Algorithm Beta(l, m), for l ¼ 1, is exactly Algorithm Beta(1, m) of the previous section.
The preliminaries for Algorithm Beta(l, m) are exactly those for Algorithm Beta (1, m) except for the following points.
The members of S are of l þ 2 kinds: p-marked, for p 2 f1; . . .; l þ 1g, unmarked. Each 1-marked member is created and marked [or derives from a 1-marked member which has been created and marked] in Step 3 of some loop. Then it is possibly extended in Step 1 of the successive loops. Each 1-marked member H is a 1-star set of G whose star is of a center vertex u 1 ðHÞ 6 2 H called the marker of H. Each 1-marked member H keeps its marker u 1 ðHÞ along its possible extensions.
Each p-marked member for p 2 f2; . . .; l þ 1g is created with respect to some p 0marked member, with p 0 \p, in Step 2 of some loop. Then it is possibly extended in Step 1 of the successive loops. Each p-marked member H is a p-star m-full set of G whose stars are respectively of center p vertices u 1 ðHÞ; . . .; u p ðHÞ 6 2 H called the markers of H. Each p-marked member H keeps its markers u 1 ðHÞ; . . .; u p ðHÞ along its possible extensions.
Each unmarked member is created either in the initialization step, i.e., the empty set, or in Step 2 of some loop with respect to some p-marked member for some p 2 f1; . . .; pg. Then it is possibly extended in Step 1 of the successive loops. Each unmarked member is an independent set of G.
Output: A family S of subsets of V(G). S 0 :¼f;g (and say that ; is unmarked) Step 1 [Extension of some members of . . .; lg, which is a collection of p 0 stars of centers u 1 ðHÞ; . . .; u p 0 ðHÞ having mutually a co-join (thus containing an induced p 0 K 2 ) by Statements (i)- (ii) and since v i is of Type 4. Then Statement (i') follows since G is lK 2 þ Y m;m -free.
Proof of (ii'). At Step (2.2) of Loop i of Algorithm Beta(l, m), for i ¼ 1; . . .; n, H is p-marked for some p 2 f2; . . .; l þ 1g and v i is either of Type 1 being adjacent to at least two markers of H or of Type 5, say without loss of generality, v i is adjacent to u 1 ðHÞ and u 2 ðHÞ. Therefore, by Statement (ii), v i and the two stars of H of center u 1 ðHÞ and u 2 ðHÞ induce a subgraph of G i that contains an induced Y m;m . Then Statement (ii') follows since G is lK 2 þ Y m;m -free.
Proof of (iii). The proof is similar to that of Lemma 4 (iii). Proof of (iv). It follows by Statements (i)- (iii) and by definition of Algorithm Beta (l,m). h Lemma 8 Let S be the family of subsets of V(G) produced by Algorithm Beta(l,m) for any l ! 1. Then for any maximal independent set I of G, there is a member H 2 S such that I H.
Proof The proof is by induction on l. For l ¼ 1 the proof is that of Lemma 5. Then let us assume that the lemma holds for l À 1 and let us show that it holds for l.
The first part of this proof is similar to the first part of the proof of Lemma 2. If v i is of Type 2 with respect to H, then there exists a vertex u 2 N G i ðv i Þ that has no neighbors in Infv i g, that is, I is contained in the set Let us consider the case in which v i is either of Type 1 with respect to H being adjacent to at least two markers of H or of Type 5 with respect to H (so that p ! 2).
Then I is contained in some member of the family Rði; HÞ generated by Step (2.2) of Loop i of Algorithm Beta(l,m).
Let us consider the case in which v i is of Type 4 with respect to H. Since I is a maximal independent set of G i , I is a maximal independent set of G½H [ fv i g as well, i.e., Infv i g is a maximal independent set of G½HnN ðv i Þ. In particular, since v is of Type 4, one has that v i is adjacent to exactly one marker of H and that H 0 & Infv i g.
If H is not m-full, i.e., jN ðu j ðHÞÞ \ H 0 j\m for some j 2 f1; . . .; pg, then I is contained in the set If H is m-full, i.e., jN ðu j ðHÞÞ \ H 0 j ! m for j 2 f1; . . .; pg, then let us consider the following argument. Let us write I ¼ fv i g [ H 0 [ I 0 , where I 0 ¼ ðInfv i gÞ \ ðH Ã nN ðv i ÞÞ. Since Infv i g is a maximal independent set of G½HnN ðv i Þ, I 0 is a maximal independent set of G½H Ã nN ðv i Þ. Now, according to Step (2.1) of Algorithm Beta(l, m) and according to Lemma 7 (iv) by the inductive assumption on l, let S 0 ¼ S 0 one [ S 0 two [ S 0 three be the family of subsets of V ðG½H Ã nN ðv i ÞÞ produced by Algorithm Betaðl À p; mÞ executed for G½H Ã nN ðv i Þ. Therefore, by the present lemma and by the inductive assumption on l, there exists an M 0 2 S 0 such that I 0 M 0 , and by Lemma 7 (iv) and by the inductive assumption on l, one of the following three subcases occurs.
Assume that M 0 2 S 0 one . Then Assume that M 0 2 S 0 three . Therefore, M 0 is a p 0 -star set of G½H Ã nN ðv i Þ for some p 0 2 f1; . . .; l À p þ 1g, whose at least one star say ðc 0 ; L 0 Þ is such that jL 0 j\m and is clearly a star of G i as well. Then I is contained in the set L 0 [ A G i ðc 0 ; L 0 Þ 2 S i (Step 3).
Case 2.2. p ¼ l þ 1. By Lemma 7 (ii) H is a p-star m-full set of G whose stars are of center u 1 ðHÞ; . . .; u p ðHÞ and of leaves a subset of H 0 . If v i is of Type 1 is either of Type 1 with respect to H being adjacent to at most one marker of H or of Type 3 with respect to H, then I H [ fv i g 2 S i (Step 1). If v i is of Type 2 with respect to H, then there exists a vertex u 2 N G i ðv i Þ that has no neighbors in Infv i g, that is, I is contained in the set fv i g [ A G i ðu; v i Þ 2 S i (Step 3).
Let us consider the case in which v i is either of Type 1 with respect to H being adjacent to at least two markers of H or of Type 5 with respect to H (so that p ! 2).
Then I is contained in some member of the family Rði; HÞ generated by Step (2.2) of Loop i of Algorithm Beta(l,m).
Let us consider the case in which v i is of Type 4 with respect to H. Let U j , for j ¼ 1; . . .; p, denote the set of neighbors of u j ðHÞ in H 0 ; then by the above jU j j ! m.
Without loss of generality, by symmetry, assume that v i is adjacent to u 1 ðHÞ and is non-adjacent to u 2 ðHÞ; . . .; u p ðHÞ.
Since v i is of Type 4, v i is adjacent to a vertex say h of H Ã . Let us write T ¼ N ðhÞ \ ðInfv i gÞ. Note that, by Lemma 7 (ii), fu 1 ðHÞg [ U 1 has a co-join to fhg [ T .
Assume that T ¼ ;. Then I is contained in the set fv i g [ A G i ðh; v i Þ 2 S i (Step 3). Assume that T 6 ¼ ;. Therefore jT j\m, else vertices of T, fh; v i ; u 1 ðHÞg, U 1 would induce a Y m;m , that is, any induced lK 2 of the remaining stars of H of center u 2 ðHÞ; . . .; u p ðHÞ (recall that p ¼ l þ 1) and such an induced Y m;m would induce a lK 2 þ Y m;m , that is not possible since G is lK 2 þ Y m;m -free. Then I is contained in the . h members and can be computed in polynomial time. Therefore, since the total number of p 0 -marked members with p 0 \p is bounded by a polynomial by the inductive assumption on p, the total number of p-marked members from families T ði; HÞ (for i ¼ 1; . . .; n, and for any p 0 -marked member H with p 0 \p) is bounded by a polynomial, and all such members can be computed in polynomial time; in particular, since each p-marked member can be extended in O(n) time and since the loops are n, all p-marked members can be computed in polynomial time.
Concerning unmarked members of S. Let us observe that each unmarked member is created with respect to some p 0 -marked member for p 0 2 f1; . . .; lg in Step (2.1) or with respect to some p-marked member for p 2 f2; . . .; l þ 1g in Step (2.2), and then it is possibly extended in Step 1 of the successive loops (except for the unmarked member which is created as the empty set in the initialization step and is possibly extended in Step 1 of the successive loops).
By statement (i), for i ¼ 1; . . .; n, and for any p 0 -marked member H, the family Qði; HÞ of unmarked members contains polynomially many elements and can be computed in polynomial time. Therefore, since the total number of p 0 -marked members is bounded by a polynomial (by the above), the total number of unmarked numbers from families Qði; HÞ (for i ¼ 1; . . .; n, and for any p 0 -marked member H) is bounded by a polynomial, and all such members can be computed in polynomial time; in particular, since each unmarked member can be extended in polynomial time and since the loops are n, all such unmarked members can be computed in polynomial time.
By statement (ii), for i ¼ 1; . . .; n, and for any p-marked member H, the family Rði; HÞ of unmarked members contains polynomially many elements and can be computed in polynomial time. Therefore, since the loops of the algorithm are n, and since the total number of p-marked members is bounded by a polynomial (by the above), the total numbers of unmarked members from families Rði; HÞ (for i ¼ 1; . . .; n, and for any p-marked member H) is bounded by a polynomial, and all such members can be computed in polynomial time; in particular, since each unmarked member can be extended in polynomial time and since the loops are n, all such unmarked members can be computed in polynomial time.
Summarizing: the total number of members of the family S produced by Algorithm Beta(l, m) is bounded by a polynomial, and all such members can be computed in polynomial time, which is also the time bound of Algorithm Beta(l, m). h Then, let us consider the following algorithm to solve WIS for lK 2 þ Y-free graphs for any l ! 1, where Y is any graph family containing an induced subgraph of Y m;m .
Output: A maximum weight independent set of G. Theorem 9 Algorithm WIS(l,m) is correct and can be executed in polynomial time whenever WIS can be solved for Y-free graphs in polynomial time.
Proof The proof is by induction on l. For l ¼ 1 the proof is that of Theorem 7. Then let us assume that the theorem holds for l À 1 and let us show that it holds for l. Correctness. By Lemma 8, Algorithm WIS(l, m) is correct.

Complexity.
Concerning PHASE 1: By Lemma 9, PHASE 1. can be executed in polynomial time. Concerning PHASE 2: By Lemma 9, the family S contains polynomially many members. On the other hand, by Lemma 7 (ii) and by Observation 1, for each H 2 S only two cases may occur: either H is an independent set (and then the problem is trivial), or each non-trivial component K of G[H] is contained in the antineighborhood of one induced edge of G (easily detectable), i.e., K is ðl À 1ÞK 2 þ Yfree since G is lK 2 þ Y-free. Therefore, by the inductive assumption on l, PHASE 2 can be executed in polynomial time whenever WIS can be solved for Y-free graphs in polynomial time.
Then Algorithm WIS(l, m) can be executed in polynomial time whenever WIS can be solved for Y-free graphs in polynomial time. h Then one obtains the following result.
Theorem 10 For any constant m and for any graph family Y containing an induced subgraph of Y m;m , if WIS can be solved for Y-free graphs in polynomial time, then WIS can be solved for lK 2 þ Y-free graphs in polynomial time for any constant l. h

Declarations
Conflict of interest The author declares that he has no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.