[go: up one dir, main page]

Academia.eduAcademia.edu
Discrete Mathematics 250 (2002) 1–22 www.elsevier.com/locate/disc On (P5 , diamond)-free graphs Claudio Arbib ∗ , Ra aele Mosca Dipartimento di Matematica Pura ed Applicata, Universita degli Studi di L’Aquila, via Vetoio, I-67010 Coppito, L’Aquila, Italy Received 21 April 1999; revised 6 November 2000; accepted 19 March 2001 Abstract We study the stability number, chromatic number and clique cover of graphs with no induced P5 and diamonds. In particular, we provide a way to obtain all imperfect (P5 , diamond)-free graphs by iterated point multiplication or substitution from a nite collection of small basic graphs. Corollaries of this and other structural properties, among which a result of Bacso and Tuza, are (i) combinatorial algorithms to solve coloring, clique cover and stable set in the class of (P5 , diamond)-free graphs, (ii) a complete description of the stable set polytope of (P5 , diamond)-free graphs, and (iii) the existence of non-trivial h-perfect graphs which are not c 2002 Elsevier Science B.V. All rights reserved. t-perfect.  Keywords: Stability number; Chromatic number; Clique cover; P5 -free graphs 1. Introduction For the basic notation of graph theory and polyhedral combinatorics, we follow [13] and [8]. A stable or independent set (a clique) in a graph G is a subset of pairwise nonadjacent (adjacent) points of G. The stable set problem (SSP) consists in nding a stable set of G with maximum cardinality (G). A weighted version of the problem is de ned by a graph G and a weight cu for each point u of G, and consists in nding  a stable set S such that u∈S cu is maximum. A coloring (a clique cover) of G is a partition of the points of G into stable sets (cliques). The coloring problem (CP) consists in nding a coloring of G with minimum cardinality (G). Similarly, the clique cover problem (CCP) consists in nding a clique  with minimum cardinality (G). cover of G (i.e., a coloring of G) Both SSP and CCP (and therefore CP) are well known NP-hard problems. The three problems remain dicult even if G meets particular conditions (such as, for SSP, being Corresponding author. Tel.: +39-0862-433-124=125; fax: +39-0862-433-180. E-mail address: arbib@univaq.it (C. Arbib). ∗ c 2002 Elsevier Science B.V. All rights reserved. 0012-365X/02/$ - see front matter  PII: S 0 0 1 2 - 3 6 5 X ( 0 1 ) 0 0 2 6 8 - 0 2 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 triangle-free, cubic or planar; for CCP, being K4 -free; for CP, being planar 4-regular, see [9,14]). Many authors contributed however to highlight particular properties of graphs that make it possible to solve them eciently. From a fundamental result due to Chvatal (see [11,12]), it follows that if G is perfect, then the three problems can be solved in polynomial time by linear programming via the ellipsoid method. This result stressed for the rst time in this context the importance of rank inequalities, i.e.,  valid inequalities for the stable set polytope having the form u∈H xu 6 (H ) for some induced subgraph H of G: in fact, the rank inequalities associated with the maximal cliques of a perfect graph G, together with the trivial clauses xu ¿ 0, are sucient to completely de ne the stable set polytope of G. With a reverse procedure, one can construct interesting classes by considering those graphs whose stable set polytope is completely de ned by some particular rank inequalities. Remarkable cases are when choosing the rank inequalities associated with the odd holes and either (i) the lines or (ii) the maximal cliques of G. In the former case we get the so-called t-perfect graphs, in the latter, the h-perfect graphs. A natural question arises about the possibility of characterizing these two classes in terms of combinatorial properties, such as forbidden subgraphs or elementary graph operations. With respect to this, it has been observed [12] that, while several classes of t-perfect graphs are known, very few signi cant ones are available for h-perfect graphs: to our knowledge, only Cao and Nemhauser [4] recently provided one such class. The limited practical e ectiveness of ellipsoid-based algorithms stimulated also the study of combinatorial methods applicable to (possibly restricted classes of) graphs which, like perfect ones, have a complete and polynomially separable description of the stable set polytope. For instance, if G is bipartite with n points, then by Konig’s Theorem one can solve SSP in O(n2:5 ) time, see [12]. Permutation graphs, that include P4 -free graphs (cographs), provide another subclass of perfect graphs in which SSP can be eciently solved (see [11] for an O(n3 ) algorithm). Other ecient combinatorial algorithms apply to the class of chordal graphs and comparability graphs, see [11]. On the other hand, CCP can be solved in polynomial time in perfect claw-free graphs [16]. A maximum stable set can also be found in polynomial time in graphs which are in general non-perfect but have nice properties (a list of problems that can be solved via the ellipsoid method can be found in [12]). Some of these graphs are again de ned in terms of forbidden subgraphs. This is the case of line-graphs [13], where a stable set of G corresponds to a matching in one of the root-graphs of G, or, more generally, of claw-free graphs [17]. Also forbidding odd cycles of length greater than a xed integer k leads to enumerative polynomial algorithms [15]. Another result due to De Simone and Sassano [6] states that in a bull- and chair-free graph G with n points, (G) can be computed in O(n3 ) time. Also CCP admits a polynomial algorithm in particular non-perfect graphs [19]; trivially, it can be solved by matching in triangle-free graphs. An O(nm) algorithm applying to graphs with no odd-K4 was recently devised [21]. P5 -free graphs have been the subject of pretty recent studies. In 1995, Fouquet et al. [7] characterized graphs with no induced P5 and P 5 (the latter is the so-called house C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 3 graph). Based on the notion of -binding function introduced by Gyarfas (see [3]), they also gave a combinatorial O(n4 ) algorithm for nding an !2 (G)-coloring of any graph G in such a class. In 1998, Puech proved that P5 -free graphs are irredundance perfect [20]. Notice that (P5 , paw)-free graphs are also P 5 -free (whereas in general (P5 , diamond)-free are not). Graphs with no induced P5 ; P 5 and C5 are a remarkable self-complementary subclass of Meyniel graphs (i.e., graphs such that every odd cycle of length ¿ 5 has at least two chords): for these graphs, an O(n) algorithm for SSP has been provided by Chvatal et al. [5]. For the more general class of (P5 ; P 5 )-free graphs, Giakoumakis and Rusu [10] gave an exact algorithm for SSP and an approximate algorithm for CP and CCP, both running in O(n(n + m)) time. No polynomial time algorithms for the three problems on P5 -free or P 5 -free graphs are known to the authors. In this paper we give polynomial algorithms for solving CP and CCP when G is (P5 , diamond)-free. As for SSP, an O(n4 ) combinatorial algorithm is implied by a more general result on (P5 , fan)-free graphs [18]. We improve this bound to O(n2 ). We also show the possibility of describing imperfect (P5 , diamond)-free graphs via elementary graph operations such as point multiplication or substitution from a limited set of small basic graphs. Corollaries of this result are a complete description of the stable set polytope for (P5 , diamond)-free graphs, and the existence of a non-trivial subclass of these graphs whose elements are h-perfect but generally not t-perfect. 1.1. Notation and preliminary results In this paper we consider connected undirected graphs without loops. Let V (G) (let E(G)) indicate the set of the points (of the lines) of G. For any U ⊆ V (G) we let G[U ] denote the subgraph of G induced by U , and N (U ) denote the set of points of V (G) − U that are adjacent to a point of U (for brevity, for any x ∈ V (G), we write N (x) instead of N ({x})). The set N (U ) is called the neighborhood of U . We use the notation G − U to indicate the subgraph of G induced by V (G) − U ; if U = {u} we write in particular G − u. We say that U (or G[U ]) dominates W ⊆ V (G) (or G[W ]) if U ∪N (U ) ⊇ W ; in particular, G = (V; E) admits a dominating point (line) if there exists v ∈ V (uv ∈ E) such that {v} (such that {u; v}) dominates V . Finally, for any v ∈ V (G) and any induced subgraph H of G, we call the distance between v and H the number of lines in a shortest path from v to a point of H (in particular, if v ∈ V (H ), then such a distance is zero). Let v ∈ V (G), and k be a positive integer: we say that G ′ is obtained by multiplying v by k if V (G ′ ) = V (G)∪{v1 ; : : : ; vk−1 }; {v; v1 ; : : : ; vk−1 } is stable, and N (vi ) = N (v) for 1 6 i ¡ k. For instance, the graph of Fig. 1(a), right, is obtained from G by multiplying v by 2 and u by 3. Let then F be a graph: we say that G ′ is obtained by substituting F for v if V (G ′ ) = V (G) ∪ V (F) − v, and all the points of N (v) are adjacent to all the points of F. See for instance Fig. 1(b). 4 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 Fig. 1. Examples of point multiplication and substitution. Fig. 2. A diamond (left) and a P5 (right). For any graph G, the stable set polytope STAB(G) is the convex hull of all the incidence vectors of stable sets of G. For any G, the following rank inequalities are valid for STAB(G):  xu 6 1 ∀Q clique of G; u∈Q  (1) xu 6 |C|=2 ∀C odd hole of G: u∈C A diamond (usually denoted as K4 − e) is a graph with points a; b; c; d and lines ab; ac; bc; bd; cd (see Fig. 2, left). A diamond-free graph is a graph with no induced diamonds. Diamond-free graphs are a noticeable subclass of quasi-line graphs. A path with 5 points is denoted as P5 (see Fig. 2, right). A P5 -free graph does not clearly contain induced cycles (holes) of order k ¿ 6. A (P5 , diamond)-free graph is not necessarily Berge: however, it does not admit any odd hole or anti-hole of order ¿ 7. P5 -free graphs enjoy the following properties in terms of dominating subgraphs: C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 5 Theorem 1.1 (Bacso and Tuza [2]). Every connected P5 -free graph G contains either a dominating clique or a dominating P3 . Observation 1.2. From the proof of Theorem 1:1; it follows that checking whether a P5 -free graph with n points contain a dominating clique or a dominating P3 ; and computing the dominating subgraph; can be done in time O(n). Theorem 1.3 (Bacso and Tuza [2]). In a graph G; every connected subgraph contains a dominating clique if and only if G is P5 -free and C5 -free. Being P5 -free gives particular graphs other nice properties, such as: Theorem 1.4. In a P5 -free connected bipartite graph G = (V1 ; V2 ; E); the u ∈ V1 can be totally ordered so that N (u) ⊇ N (v) whenever u precedes v. Moreover; there exists x ∈ V1 such that N (x) = V2 . Proof. See [1]. Theorem 1.5. Let G = (V1 ; V2 ; E) be a connected P5 -free bipartite graph with |V1 | = n. Then a maximum stable set of G can be found in time O(n). Proof. Let V1 = {u1 ; u2 ; : : : ; un }, and suppose N (ui ) ⊇ N (ui+1 ); i = 1; : : : ; (n − 1). Then the maximal stable sets S of G (S = V2 ) are of the form S = {uh ; : : : ; un } ∪ (N (u1 ) − N (uh )); h = 1; : : : ; n. We can compute these sets in time O(n), thus the theorem is proved. 1.2. The main results The remainder of the paper is divided into two sections. In Section 2, the eleven small special graphs G0 ; : : : ; G10 of Fig. 3 will be used to describe imperfect (P5 , diamond)-free graphs. All these graphs contain an induced C5 {u0 ; u1 ; u2 ; u3 ; u4 }: let Dk denote the set of points at distance k from this C5 . Then we can prove the following main result: Theorem 1.6. Any connected (P5 ; diamond)-free graph that properly contains an induced C5 can be obtained from C5 or from a graph among those of Fig. 3 by multiplying some v ∈ D1 ∪ C5 and=or substituting a P3 -free graph for some v ∈ D2 . Theorem 1.6 has the following interesting consequences: Corollary 1.7. Let G be a (P5 ; diamond)-free graph. Then STAB(G) is completely de ned by the trivial clauses; inequalities (1) and the rank inequality associated with graph G0 . 6 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 Fig. 3. The basic graphs which every (P5 , diamond)-free graph can be obtained from. Corollary 1.8. Any (P5 ; diamond)-free graph with no induced G0 is h-perfect. Corollary 1.9. The Clique Cover and the Coloring Problem can be solved in polynomial time on (P5 ; diamond)-free graphs. Section 3 is divided into three parts. The rst is devoted to some further notation. In Section 3.2, after some technicalities, we derive an O(n2 ) algorithm to solve SSP when the graph, besides being (P5 , diamond)-free, has a dominating line xy. In Section 3.3, Theorems 1.1, 1.3 and 1.5 are then used to extend the result to the whole class of (P5 , diamond)-free graphs. Summarizing, the main result of Section 3 is C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 7 Theorem 1.10. Let G be a (P5 ; diamond)-free graph. Then a maximum stable set of G can be computed in time O(n2 ). 2. Imperfect (P5 , diamond)-free graphs In this section we show that if G is (P5 , diamond)-free, then G can be obtained by point multiplication and=or substitution from a C5 or a graph among those depicted in Fig. 3. Let C = ({u0 ; u1 ; : : : ; u4 }; {u0 u1 ; u1 u2 ; : : : ; u4 u0 }) denote an induced C5 of G: rst, we wish to characterize the sets Dk ⊆ V of points at distance k from this C. First of all, one clearly has Dk = ∅ for any k ¿ 3. For D1 , its points can be partitioned into 10 subsets of the form: Ai = {x ∈ D1 : xui ; xui+2 ; xui−2 ∈ E and xui+1 ; xui−1 ∈ E}; (2) Bi = {x ∈ D1 : xui+1 ; xui−1 ∈ E and xui ; xui+2 ; xui−2 ∈ E} (3) for i = 0; : : : ; 4 (sums of indexes are taken modulo 5). For D2 , one has Proposition 2.1. (i) No point in D2 is adjacent to any point in Bi ; i ∈ {0; : : : ; 4}; (ii) for some i ∈ {0; : : : ; 4} there exists an x ∈ Ai adjacent to every y ∈ D2 ; (iii) the subgraph induced by D2 is P3 -free. Statements (i) and (ii) trivially derive from the absence of induced P5 . Statement (iii) follows since by (ii) there certainly exists an x dominating D2 , and this x plus an induced P3 of D2 would result in an induced diamond. To characterize the (P5 , diamond)-free graphs that properly contain an induced C5 , let us establish some further properties of Ai and Bi . Proposition 2.2. (i) |Ai | 6 1 for all i; (ii) x ∈ Ai ; y ∈ Aj ⇒ xy ∈ E for all i and j; (iii) Ai = ∅ ⇒ Ai+1 = ∅; Ai−1 = ∅. Proposition 2.3. (i) x; y ∈ Bi ⇒ xy ∈ E for all i; (ii) x ∈ Bi ; y ∈ Bi+1 ⇒ xy ∈ E for all i; (iii) let x ∈ Ai ; y ∈ Bj ; then xy ∈ E ⇔ i = j. Also the statements of Propositions 2.2, 2.3 immediately follow from the absence of induced P5 and diamonds. Statements (i) – (ii) of Proposition 2.2 imply that 8 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 A = A0 ∪ : : : ∪ A4 is stable. Similarly, statement (i) of Proposition 2.3 implies that Bi is stable for all i. We now use the above propositions to prove Theorem 1.6 and describe in this way the structure of all the (P5 , diamond)-free graphs containing an induced C5 . Proof of Theorem 1.6. Let G = (V; E) be (P5 , diamond)-free and properly contain an induced subgraph C ∼ = C5 . Consider the graph H obtained by contracting D2 (which by Proposition 2.1-(iii) induces a P3 -free subgraph) into a single point, and then removing all the v ∈ D1 ∪C such that there exists a u with uv ∈ E and N (u) = N (v). So H has no non-adjacent points with identical neighborhood. The theorem is then proved as soon as we show that H = C ⇒ H = Gi for some i between 0 and 10. Let us rst assume D2 = ∅. If H = C, then H can be obtained by adding to C a combination of points of Ai and Bj (together with the corresponding lines). In particular, if we add no point of Bj , we get either H ⊆ C ∪ Ai ; or H ⊆ C ∪ Ai ∪ Ai+2 ; for otherwise forbidden subgraphs will occur (statement (iii) of Proposition 2.2). These cases correspond to the graphs G1 and G2 .  Conversely, if we add points of B = 06j64 Bj three cases may occur (a) C ⊂ H ⊆ C ∪ B, (b) C ∪ B ⊂ H ⊆ C ∪ Ai ∪ B, or (c) C ∪ Ai ∪ B ⊂ H ⊆ C ∪ Ai ∪ Ai+2 ∪ B. Notice that statement (i) of Proposition 2.2 allows us to regard the Ai ’s as singletons for 0 6 i 6 4. Similarly, statement (i) of Proposition 2.3 allows us to consider each point of Bi separately from the others, for 0 6 i 6 4. Set then w.l.o.g. i = 0, let in general ai (let bi ) denote a point of Ai (of Bi ), and consider these cases separately. Case a: C ⊂ H ⊆ C ∪ B. Suppose w.l.o.g. B0 = ∅. Then, b0 must be adjacent to a third point x ∈ N (u0 ), or it would have the same neighbors of u0 . Clearly, x = b1 and x = b4 (they are both in N (u0 )). Then, B2 = ∅ and b0 b2 ∈ E (or, symmetrically, B3 = ∅ and b0 b3 ∈ E). Now, B2 = ∅ ⇒ B1 = B3 = ∅. In fact, for the former, u1 ; b0 ; b1 ; b2 would induce a diamond of H ; for the latter, b3 and u3 would have the same neighbors, so b3 should be adjacent to b1 or to b0 : but the rst case is impossible, since B1 = ∅, while in the second a diamond would occur. Symmetrically, one has B4 = ∅. Thus, H = C ∪ B0 ∪ B2 (graph G3 ). Case b: C ∪ B ⊂ H ⊆ C ∪ Ai ∪ B. W.l.o.g. let i = 0. Notice rst that B2 = ∅ ⇒ B3 = ∅, for otherwise statement (ii) of Proposition 2.3 would require b2 b3 ∈ E, thus inducing a P5 with b3 ; b2 ; u1 ; u0 ; a0 . Suppose B0 = ∅: in this case statement (iii) of Proposition 2.3 implies a0 b0 ∈ E. Observe that B2 ∪ B3 = ∅ and b0 b2 ∈ E (or symmetrically b0 b3 ∈ E), otherwise b0 and u0 , which are non-adjacent, would have the same neighbors. Suppose then w.l.o.g. B2 = ∅; B3 = ∅. C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 9 From this, we see that B1 = B4 = ∅. Should in fact b1 ∈ H , one would have both b1 b0 and b1 b2 ∈ E (Proposition 2.3.ii), and H would contain a diamond induced by u1 ; b0 ; b1 ; b2 . Similarly, should b4 ∈ H , one would have b0 b4 ∈ E: since b4 and u4 are non-adjacent, one has that b4 b2 ∈ E, but then b0 ; b2 ; b4 ; u3 would induce a diamond. Thus, H ⊆ C ∪ A0 ∪ B0 ∪ B2 (graph G4 ). Suppose now B0 = ∅. If B1 = ∅, one necessarily has b1 x ∈ E for some x not in N (u1 ). Since b2 ∈ N (u1 ), the only possibilities are x = b3 or x = b4 . In the former case, H would however contain an induced P5 ; hence, B4 = ∅ and b1 b4 ∈ E. One can legally extend this graph by adding B2 or, symmetrically, B3 , but not both (otherwise H would contain an induced diamond): for the same reason, one then has b1 b2 ∈ E (Proposition 2.3.ii) and b2 b4 ∈ E. Thus, H ⊆ C ∪ A0 ∪ B1 ∪ B2 (or B3 ) ∪ B4 (corresponding to graphs G5 and G6 ). If B2 = ∅, as previously seen, one has B3 = ∅. Moreover, one cannot have B4 = ∅ (this case is in fact symmetric to B1 = ∅ and B3 = ∅). The case B3 = ∅ is completely symmetric to the one just covered. Thus, H ⊆ C ∪ A0 ∪ B2 (or B3 ) (this graph is isomorphic to G3 ). Case c: C ∪ Ai ∪ B ⊂ H ⊆ C ∪ Ai ∪ Ai+2 ∪ B. Again, let w.l.o.g. i = 0. Let us rst prove that B1 = ∅. Suppose not. Applying the usual considerations on the neighbors of b1 and u1 , one has v ∈ N (b1 ) − N (u1 ). Being v ∈ N (u1 ), it follows v = b0 and v = b2 . But if v = b3 , one has {b1 ; b3 ; u4 ; u3 ; a0 } ∼ = P5 ; if on the other hand v = b4 , one symmetrically has {b1 ; b4 ; u3 ; u4 ; a2 } ∼ = P5 . Let us now show that |B2 | · |B3 | = 0 (and, symmetrically, |B0 | · |B4 | = 0). Suppose not. As usual we have b2 b3 ∈ E. But then {a0 ; u0 ; u1 ; b2 ; b3 } ∼ = P5 . So B2 = ∅ is only compatible with B0 = ∅ or B4 = ∅ (but not both). Observe also that Proposition 2.3.iii requires a2 b2 ∈ E. Consider rst |B2 | · |B0 | = 0. Now necessarily b2 b0 ∈ E, or b0 ; a0 ; u0 ; a2 ; b2 would induce a P5 of G. Consider then |B2 | · |B4 | = 0 (the case |B0 | · |B3 | = 0 is symmetric). In this case b2 b4 ∈ E, or b2 ; b4 ; u0 ; a0 ; u2 would induce a P5 of G. The last possibility is B3 and B4 = ∅ with b3 b4 ∈ E. In conclusion, in Case c H can only be isomorphic to G7 ; G8 or G9 . Finally, let us notice that: i By Proposition 2.1, every y ∈ D2 is either adjacent to a0 or to a2 . ii G3 contains no ai ; i = 0; : : : ; 4; G4 ; G5 and G6 contain a0 as unique point of A0 ∪ · · · ∪ A4 , and admit an induced P4 with a0 as extreme point: hence, y cannot be added to G4 ; G5 and G6 . iii Since in G7 ; G8 and G9 the set {a0 ; u3 ; u4 ; a2 } induces a P4 , it follows that y ∈ D2 must be adjacent to both a0 and a2 ; on the other hand, as {a0 ; u3 ; b4 ; b3 } (resp., {a2 ; u4 ; u3 ; b4 }; {a0 ; b0 ; u1 ; b2 }) induces a P4 in G7 (resp., in G8 ; G9 ), then y cannot be added to G7 ; G8 ; G9 . 10 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 From (i), (ii), and (iii) we deduce that y can only be added to G1 or to G2 in order to obtain G10 or, respectively, G0 . Corollaries 1.7, 1.8 and 1.9 are now easily derived from Theorem 1.6. Let us move from a well known result and a consequent de nition (see also [8]): Proposition 2.4. A rank inequality of STAB(G) is a facet if and only if (i) it is also a facet of its support H ⊆ G; and (ii) ∀x ∈ G − H; (H ) ¡ (H ∪ x).  De nition 2.1. Let G = (V; E) be a graph, and u∈V au xu 6 b a facet of STAB(G) with au = 0 for all u ∈ V . Then, we say that G is facet-producing. Let us then observe the following general result: Lemma 2.5. Let G be facet-producing. Then G does not contain any non-adjacent points v; w such that N (v) = N (w). Proof. Let n = V (G). As G is facet-producing, there exists n maximal stable sets whose incidence vectors form a full rank 0-1 matrix X. Suppose by contradiction that G contains non-adjacent v; w with N (v) = N (w): then any maximal stable set of G either contains both v and w, or does not contain either of them; that is, the v-th and the w-th row of X coincide. We then prove Corollary 1.7 by showing that the only facet-producing subgraphs of G are either induced C5 , or G0 , or cliques of G. Proof of Corollary 1.7. Since the Strong Perfect Graph Conjecture holds true for diamond-free graphs, the structure of STAB(G) is already known if G does not contain any induced C5 ; P5 and diamond. Let then G contain at least an induced C5 , and let us prove that for a complete de nition of STAB(G), besides trivial clauses and inequalities (1) (the odd hole ones obviously written for C ∼ = C5 only), we only need the rank inequality associated with G0 . Observe rst that by Theorem 1.6 and Lemma 2.5 any facet-producing subgraph of G that properly contains an induced C5 is necessarily isomorphic to one of G0 ; : : : ; G10 . But each of the graphs G1 ; : : : ; G8 and G10 has less maximal stable sets than points, and graph G9 , which has 9 points, admits on the other hand only 8 linearly independent maximal stable sets. So none of these is facet-producing. However, the 0-1 matrix obtained by collecting the incidence vectors of the maximal stable sets of G0 is non-singular, so G0 is facetproducing. C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 11 Corollary 1.8 is then immediate from the de nition of h-perfect graph. To prove Corollary 1.9, consider the following: Observation 2.6. Inequalities (1) are polynomially many: in fact; being P5 free; G has no odd hole of order greater than 5; being diamond-free; no two maximal cliques share a line; so these are 6 n2 . Moreover; G is generally not t-perfect. Proof of Corollary 1.9. If G has no induced C5 it is perfect, so by Observation 2:6 both CCP and CP can be solved in polynomial time by linear programming. If on the other hand G contains a C5 , then CCP can be solved in polynomial time by considering that every graph obtained according to Theorem 1.6 from G1 ; : : : ; G9 has no more than 3 triangles (no point in a triangle can in fact be multiplied since G is diamond-free). Moreover, if F is a P3 -free graph that substitutes y in G10 , since a0 is a cutpoint of G10 , all the cliques of F belong to an optimal solution of CCP. Finally, y ∈ V (G0 ) cannot be substituted by any P3 -free graph. Hence, the problem consists in deciding which triangles belong to a solution, suppressing them and then nding a maximum matching in the remaining graph. Similar considerations apply to CP. 3. An O(n2 ) algorithm for the SSP This section provides a combinatorial algorithm for SSP in (P5 , diamond)-free graphs. Prior to this, we need to (Section 3.1) introduce some more notation and (Section 3.2) prove a series of intermediate properties holding in the case in which the graph has a dominating line. 3.1. Notation In the sequel, S(G) will denote a stable set of maximum cardinality in a graph G. For any x; y; z ∈ V (G), we also set Ny (x) = {u ∈ N (x) − y: uy ∈ E(G)}; Nyz (x) = {u ∈ N (x) − {y; z}: uy; uz ∈ E(G)}; i.e., in general, NT (x) denotes the set of points not in T that are adjacent to x but not to points of T . Clearly Ny (x) ∩ Nx (y) = ∅; ∀x; y ∈ V (G). For any subset U = {u1 ; : : : ; uk } of V (G), we denote by D(U ) = D(u1 ; : : : ; uk ) the set of the points of G that are adjacent to all the points in U ; in symbols D(U ) = {x ∈ V (G): ∀u ∈ U; ux ∈ E(G)}: Finally, for any disjoint Q; Q′ ⊆ V (G), we say that Q and Q′ are adjacent if there exist u ∈ Q; u′ ∈ Q′ such that uu′ ∈ E(G), and, more generally, that the distance between Q and Q′ is k ¿ 1 if a shortest path with one extreme in Q and the other in Q′ contains k lines. 12 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 In the following, we will extensively use the notation Qy (x) (the notation Qx (y)) to indicate the set of maximal cliques of Ny (x) (of Nx (y)) with at least 2 elements: these cliques will be called non-trivial. The following lemma describes the structure of Ny (x): Lemma 3.1. Let G be a diamond- and P5 -free graph. Then; (i) each component of the subgraph induced by Nx (y) (by Ny (x)) is a clique; (ii) each point of Ny (x) (of Nx (y)) is adjacent to at most one point of every clique of Qx (y) (of Qy (x)); (iii) each point of Ny (x) (of Nx (y)) is adjacent to at most one clique of Qx (y) (of Qy (x)); (iv) each clique of Qy (x) (of Qx (y)) is adjacent to at most one clique of Qx (y) (of Qy (x)). Proof. Since G is diamond-free, G[Nx (y)] and G[Ny (x)] are P3 -free, i.e., their components are complete subgraphs. As for statement (ii), should a point of Ny (x) (of Nx (y)) be adjacent to 2 points of the same clique of Qx (y) (of Qy (x)), then G would contain an induced diamond. Statement (iii) follows from statements (i), (ii) and from the absence of induced P5 . Statement (iv) follows from statements (ii) and (iii), and from the absence of induced P5 . Observation 3.2. Under the assumptions of Lemma 3:1; by statement (i) set Qy (x) (set Qx (y)) consists of pairwise non-adjacent cliques of Ny (x) (of Nx (y)). This justi es the following de nition. De nition 3.1. Two cliques Q1 ∈ Qy (x); Q2 ∈ Qx (y) are matched if Q1 is adjacent to Q2 but neither Q1 nor Q2 are adjacent to any other clique in Qy (x) ∪ Qx (y). 3.2. (P5 , diamond)-free graphs with a dominating line We will now use De nition 3.1 to characterize the subgraph induced by Nx (y)∪Ny (x) when G has a dominating line. Lemma 3.3. Let G be a diamond- and P5 -free graph; and assume that G contains a dominating line xy. Let K denote any component of the subgraph induced by Ny (x) ∪ Nx (y). Then; if K contains a clique of Qx (y) ∪ Qy (x); two cases may only occur: (a) K contains exactly one clique Q ∈ Qx (y) ∪ Qy (x). In this case N (Q) is stable and dominates K − Q. Moreover N (N (Q)) − Q is stable as well. (b) K contains exactly one matched pair of cliques Q1 ∈ Qx (y); Q2 ∈ Qy (x). In this case Q1 ∪ Q2 dominates K. Moreover; the lines with one extreme in Q1 and the other in Q2 form a matching of G. C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 13 Fig. 4. Proof. Case a. W.l.o.g., let Q ∈ Qx (y). Since no non-trivial clique is contained in K ∩ Ny (x), such a set is stable. To prove that N (Q) is stable as well, it is then sucient to show K ∩ Ny (x) ⊇ N (Q) − y. In fact, by Lemma 3.1.i, each component of Nx (y) is a clique, and, since Q is maximal, if there exists a point of K adjacent to an element of Q, this point must belong to K ∩ Ny (x). Assume now by contradiction that there exists a point u0 ∈ K − Q that is not dominated by N (Q). Let P = {u0 ; u1 ; : : : ; uh } denote one of the shortest paths between u0 and uh ∈ N (Q). Notice that, since P is minimum, u1 ; : : : ; uh−1 ∈ N (Q). Let us prove that h 6 1, that is, u0 is dominated by N (Q). Assume in fact h ¿ 2, and let q1 ; q2 ∈ Q with uh q1 ∈ E(G). Consider the graph induced by {uh−2 ; uh−1 ; uh ; q1 ; q2 }: such a graph is a P5 , since uh−1 and uh−2 are not adjacent to any point of Q, and, by Lemma 3.1.ii, uh is not adjacent to q2 (contradiction). Hence, N (Q) dominates K − Q. Being induced by Ny (x) ∪ Nx (y); K is partitioned into K ∩ Ny (x) and K ∩ Nx (y). Let us now prove that K ∩ Ny (x) = N (Q) − y. Suppose indirectly that v ∈ K ∩ Ny (x) and does not belong to N (Q). Should v ∈ K − Q; v would be dominated by N (Q), and this would contradict the fact that K ∩Ny (x) ⊇ N (Q) and is stable. Then v ∈ Q ∩Ny (x). But Q is a subset of Nx (y), hence Q ∩ Ny (x) = ∅. Thus, K ∩ Ny (x) = N (Q). Since N (Q) dominates K − Q, we can write N (N (Q)) = K ∩ Nx (y) − y; moreover, by Lemma 3.1.i, K ∩ Nx (y) is P3 -free, and does not contain any clique with 2 or more points but Q. Hence N (N (Q)) − Q is stable. Case b. Suppose now that K contains more than one clique of Qx (y) ∪ Qy (x). First, let us show that K cannot contain two non-adjacent cliques of Qx (y) ∪ Qy (x). Suppose that there exist two such cliques Q1 ; Q2 . Since K is connected, it contains a path with extremes q1 ∈ Q1 ; q2 ∈ Q2 . Let P denote one such path of minimum length: P is clearly induced and has no more than 4 points. Assume |P| = 4. Let u1 ; u2 denote the intermediate points of P (Fig. 4(a)). Lemma 3.1.i implies then the following: Qj ∈ Qx (y) ⇒ uj ∈ Ny (x); Qj ∈ Qy (x) ⇒ uj ∈ Nx (y) (4) for j = 1; 2. Now, if Q1 and Q2 are in the same class, say Qx (y), then u1 and u2 belong to a clique of Qy (x), which contradicts Lemma 3.1.iv. Suppose then Q1 ∈ Qx (y); Q2 ∈ Qy (x) (see Fig. 4a), and let v ∈ Q1 ; v = q1 . Then {v; q1 ; u1 ; u2 ; q2 } de nes a path of K with 5 points. Now, neither u1 , nor u2 , nor q2 are adjacent to v. The rst fact follows 14 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 from G being diamond-free. The second and the third, from P being minimum. Hence, {v; q1 ; u1 ; u2 ; q2 } has no chords (contradiction). Assume now |P| = 3. By Lemma 3.1.i, Q1 and Q2 must necessarily belong to the same set, say Qx (y), and the intermediate point u of P to Ny (x) (see Fig. 4(b). Let vi ∈ Qi ; vi = qi ; 1 6 i 6 2. By Lemma 3.1.ii, u is not adjacent to v1 ; v2 . Since Q1 and Q2 are in turn non-adjacent, {v1 ; q1 ; u; q2 ; v2 } induces P5 (contradiction). Thus, K does not contain two non-adjacent cliques of Qx (y) ∪ Qy (x). On the other hand (Observation 3:2) any two cliques of Qx (y) (of Qy (x)) are pairwise non-adjacent. Hence, if K contains more than one clique of Qx (y) ∪ Qy (x), then K contains exactly two adjacent cliques Q1 ∈ Qx (y); Q2 ∈ Qy (x), that form a matched pair. Moreover, by Lemma 3.1.ii, the lines with one extreme in Q1 and the other in Q2 form a matching of G. Let us nally prove that Q1 ∪ Q2 dominates K. Let u0 ∈ K be a point not dominated by Q1 ∪ Q2 and let u0 ; u1 ; : : : ; uh denote a minimum length path between u0 and Q1 ∪ Q2 (with no loss of generality, assume uh ∈ Q1 ; Q1 ∈ Qx (y)). Indeed, h 6 1. In fact, let q1 ∈ Q1 ; q2 ∈ Q2 be adjacent, and assume h ¿ 1. Suppose rst uh = q1 . By Lemma 3.1, uh−1 is not adjacent to q1 (statement (ii)) and uh is not adjacent to q2 (statement (iii)). Also, uh−1 ∈ Ny (x) (by (4)) and uh−1 ∈ Q2 (otherwise uh−2 would be adjacent to Q2 ). Hence uh−1 is not adjacent to Q2 . But then, recalling that uh−2 is not dominated by either Q1 or Q2 , we have that {uh−2 ; uh−1 ; uh ; q1 ; q2 } induces a P5 of G. Suppose now uh = q1 . Then, a similar argument leads to conclude that there exists a point v ∈ Q2 ; v = q2 such that {uh−2 ; uh−1 ; uh ; q2 ; v} induces a P5 of G. Thus u0 is dominated by Q1 ∪ Q2 . Observation 3.4. Note that; if K has no clique of Qx (y) ∪ Qy (x); then Lemma 3:1:i implies that K is bipartite. Observation 3.5. From Lemma 3:3 and statement (i) of Lemma 3:1; it follows that; if G has n points; then computing the cliques of K that belong to Qx (y) ∪ Qy (x) requires O(n) time. From Lemmas 3.1 and 3.3, one can derive the main result of this section. Theorem 3.6. Let G be a diamond- and P5 -free graph with n points; and assume that G contains a dominating line xy. Then; a maximum stable set of G can be computed in time O(n2 ). Proof. To prove the theorem, it is sucient to consider the case {x; y} ∩ S(G) = ∅, i.e., to limit our attention to G − {x; y}. Since xy is a dominating line of G, the case of x ∈ S(G) (of y ∈ S(G)) can in fact be handled by applying the same argument to Nx (y) (to Ny (x)). Now we have V (G) − {x; y} = D(x; y) ∪ Nx (y) ∪ Ny (x). Furthermore, since G is diamond-free, every element of D(x; y) (if any) is not adjacent to any element of Nx (y) or Ny (x), and moreover D(x; y) is a clique. Hence, it suces considering the subgraph H induced by Nx (y) ∪ Ny (x). C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 15 Let K be any component of H . If K does not contain any clique of Qx (y) ∪ Qy (x), then K is bipartite (Observation 3:4). Since K is P5 -free, by Theorem 1.5 we can compute S(K) in time O(n). If K contains at least one clique of Qx (y) ∪ Qy (x), then by Lemma 3.3 two cases may only occur. Case a: K contains exactly one clique Q of Qx (y) (of Qy (x)). Let qi ; 1 6 i 6 |Q|, denote the points of Q. Assume w.l.o.g. Q ∈ Qx (y), i.e., Nx (y) ⊇ Q. By Lemma 3.3, N (Q) is stable and dominates K − Q, and N (N (Q)) − Q is stable: recalling statement (i) of Lemma 3.1, we conclude that the graph Ki obtained by deleting from K all the points qj = qi is bipartite, i = 1; : : : ; |Q|. Thus, S(K) can be found in time O(n2 ). Case b: K contains exactly one matched pair Q1 ; Q2 of cliques of Qx (y); Qy (x), respectively, and Q1 ∪ Q2 dominates K. Moreover, the lines with one extreme in Q1 and the other in Q2 form a matching of G. Clearly, any stable set of K has no more than one point in Q1 and one in Q2 . The case of K − (Q1 ∪ Q2 ) empty is trivial. Suppose then K − (Q1 ∪ Q2 ) non-empty. Observe that it is bipartite: denote as {V1 ; V2 } its bipartition, where V1 ⊆ Nx (y) (V2 ⊆ Ny (x)) is stable and dominated by Q2 (by Q1 ). By Lemma 3.1.ii, the set of lines with one extreme in V1 and the other in Q2 is an assignment and de nes a partition {V11 ; : : : ; V1p } of V1 , where V1k is dominated by zk ∈ Q2 . Assume that Q1 contains an element u1 ∈ S(K). If p = 1, i.e., V1 is dominated by z1 ∈ Q2 , then either z1 ∈ S(K) or not. In the rst case, S(K) = {u1 ; z1 } ∪ V2 − N (u1 ); in the second case, S(K) is obtained by adding u1 and (possibly) a point q = z1 of Q2 to a maximum stable set of the subgraph of K induced by V1 ∪ (V2 − N (u1 )). Thus, the time complexity of this step is O(n). If p ¿ 1, then V2 is partitioned into two sets: W , which is formed by isolated points of K − (Q1 ∪ Q2 ), and V2 − W , which together with V1 induces a complete bipartite subgraph of K − (Q1 ∪ Q2 ). Let in fact 1 6 h ¡ k 6 p, and assume that there exists a point v ∈ V2 adjacent to vh ∈ V1h but not to vk ∈ V1k . Then, by virtue of Lemma 3.1.ii {v; vh ; zh ; zk ; vk } would induce a P5 of G. Hence, either v is adjacent to both vh and vk , or to none of them. In conclusion, either • S(K) = V2 − N (u1 ) plus u1 and an element of Q2 non-adjacent to u1 , or • S(G) = V1 ∪ W ∪ {zk }, where zk (if any) is an element of Q2 non-adjacent to u1 and such that V1k = ∅, and the time complexity of this step is that of computing W , namely O(n). The case of S(K) ∩ Q1 = ∅ easily reduces to the cases considered so far. In the next section we will remove the assumption on the existence of a dominating line, and base a similar result on the following corollary of Theorem 3.6, holding for G − {x; y}. Corollary 3.7. Let G be a diamond- and P5 -free graph with n points; and assume that G contains a dominating line xy. Then; a maximum stable set of G − {x; y} can be computed in time O(n2 ). 16 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 3.3. Extension to (P5 , diamond)-free graphs In order to extend the previous complexity results to the entire class of (P5 , diamond)free graphs, it is convenient to prove two further lemmas, both expressing properties of the maximal dominating cliques of G. Lemma 3.8. Let G be a (P5 ; diamond)-free graph with a maximal dominating clique Q = {q1 ; : : : ; qk }. Then; either: (i) (ii) (iii) (iv) G is complete; or G contains a dominating line; or V (G) − Q induces a P3 -free subgraph of G; or V (G)−Q can be partitioned into sets U1 ; : : : ; Up ; and there exist u1 ∈ U1 ; u2 ∈ U2 ; u3 ∈ U3 such that the set Z of points of V (G)−Q non-dominated by T = {u1 ; u2 ; u3 } is a P3 -free component of V (G) − Q. Observation 3.9. From the following proof of Lemma 3:8; we see in particular that Ui = N (qi ) − Q; 1 6 i 6 |Q|. Moreover; it turns out that T induces either a triangle; or a P3 : in the latter case; one necessarily has p = 3 and there exists an index i such that Ui ⊇ Z. Proof of Lemma 3.8. Each point of V (G) − Q is adjacent to exactly one point of Q. This is evident for k = 1, for k = 2 it follows from Q being maximal, and for k ¿ 2 from G being diamond-free. In other words, if we set Ui = N (qi )−Q; 1 6 i 6 |Q|, then the non-empty Ui ’s de ne a partition {U1 ; : : : ; Up } of V (G) − Q; p 6 |Q|; moreover, each member of this partition induces a P3 -free subgraph of G. If p 6 2, then either V (G) − Q is empty, i.e., G is complete, or (apart from trivial cases) G admits a dominating line (cases (i) and (ii)). Suppose then p ¿ 3. If Ui ; Uj are non-adjacent for 1 6 i ¡ j 6 p, then V (G) − Q induces on G a P3 -free subgraph (case (iii)). Otherwise, let ui ∈ Ui ; uj ∈ Uj , for any i; j such that i = j and, w.l.o.g., assume ui adjacent to uj . Since G is P5 -free, ui uj dominates Uh for any h = i; h = j; 1 6 h 6 p. Let w.l.o.g. ui uh ∈ E(G). Hence, the set T = {ui ; uj ; uh } induces either a P3 or a triangle of G. To show that case (iv) occurs, it is convenient to consider 2 subcases. Subcase 1: T = {u1 ; u2 ; u3 }, with u1 ∈ U1 ; u2 ∈ U2 ; u3 ∈ U3 , induces a triangle of G. In this case any x ∈ Ui is dominated by either u1 u2 , or u2 u3 , or u3 u1 (or by a combination of these lines), for 1 6 i 6 p, and the thesis immediately follows. Subcase 2: for any choice of ui ∈ Ui ; uj ∈ Uj ; uh ∈ Uh with i = j; i = h; j = h; T does not induce a triangle of G. First of all, in this case one necessarily has p = 3. In fact, take by contradiction uk ∈ Uk ; k = i; j; h. By assumption, {ui ; uj ; uk } does not form a triangle. But uk is dominated by ui uj , i.e., is adjacent to, say, uj : then, {qh ; qi ; ui ; uj ; uk } forms an induced P5 of G. C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 17 Let then u1 ; u2 ; u3 denote points of U1 ; U2 ; U3 , respectively, and, with no loss of generality, assume u1 u2 ; u2 u3 ∈ E(G) (recall that u1 u2 (u2 u3 ) dominates U3 (U1 )). Let D ⊇ U1 ; U3 (let Z ⊆ U2 ) denote the points of V (G) − Q (not) dominated by T . Let us show that the points of D are not connected to those of Z. Let z ∈ Z, and w.l.o.g. assume by contradiction that U3 contains a point x = u3 and adjacent to z. This x is also adjacent either (a) to u1 or (b) to u2 but not to both (because otherwise {u1 ; u2 ; x} would form a triangle dominating V (G) − Q). In both cases (a) and (b) G contains then an induced P5 . In case (a), if x and u3 are adjacent, then this P5 is induced by {q1 ; q2 ; z; x; u3 }; if otherwise x and u3 are not adjacent, then it is induced by {z; x; u1 ; u2 ; u3 }. In case (b), it is induced by {z; x; u2 ; u1 ; q1 }. Hence, G does not contain any such line xz, and therefore Z is not adjacent to any point dominated by u1 u2 , in particular to any point of U3 ; with a similar argument, one can show that Z is not adjacent to any point of U1 . To prove statement (iv) in this case, it remains then to show that z is not adjacent to any y ∈ D ∩ U2 . If this y is dominated by u2 , since U2 is P3 -free, then also z is dominated by u2 (contradiction). If y is dominated by u3 (by u1 ), then {z; y; u3 ; q3 ; q1 } ({z; y; u1 ; q1 ; q3 }) would induce a P5 of G, and the argument is complete. Thus, Z and D are not adjacent, and Z is a P3 -free component of V (G) − Q (case (iv)). Notice that cases (i) – (iv) of Lemma 3.8 do not necessarily exclude one each other. To complete our analysis, let us now examine the particular structure of G in case (iv). In this case, V (G) − Q can be partitioned into sets U1 ; : : : ; Up , and there exist u1 ∈ U1 ; u2 ∈ U2 ; u3 ∈ U3 such that the set Z of points of V (G) − Q non-dominated by T = {u1 ; u2 ; u3 } is a P3 -free component of V (G) − Q. Set as usual Ui = ∅ for i ¿ p, with p 6 |Q|. Assume p ¿ 3. We can then prove the following lemma. Lemma 3.10. Let G be a (P5 ; diamond)-free graph with a maximal dominating clique Q = {q1 ; : : : ; qk }. Assume that statement (iv) of Lemma 3:8 holds; and let T = {u1 ; u2 ; u3 } be a dominating triangle of V (G) − Q with ui ∈ Ui ; 1 6 i 6 3. Then; (iv − 1) if p ¿ 3; then V (G) − Q is a clique of G; (iv − 2) if p = 3; then Ui is a stable set of G. Proof. Let Ai ⊆ Ui denote the set of points of Ui whose distance from ui is 6 1; 1 6 i 6 3. In other words, set Ai = Ui ∩ N (ui ) ∪ {ui }. Let us rst show that Ai = {ui }; 1 6 i 6 3. Let in fact x ∈ A1 ; x = u1 . Like every element of A1 ; x is dominated by {u2 ; u3 }. Assume w.l.o.g. x adjacent to u2 . Then, {q1 ; u1 ; u2 ; x} forms an induced diamond (contradiction). Let us next show that, if p ¿ 3, then V (G) − Q is a clique. In fact, let 3 ¡ h 6 p and x ∈ Uh . Assume indirectly x non-adjacent to, say, u1 ∈ T . Since each line of T dominates Uh ; x is adjacent to u2 ; u3 . Hence, {x; u1 ; u2 ; u3 } induces a diamond of G 18 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 (contradiction). It follows that x is adjacent to every point of T . From this, with a similar argument, one can prove that x is adjacent to y ∈ Uk ; 3 ¡ k 6 p. To complete the proof, let us show that for p ¿ 3 one also has Ui = {ui }; 1 6 i 6 3. In fact, p ¿ 3 implies |Q| ¿ 3. With no loss of generality, assume indirectly x ∈ U1 − A1 . Being x member of U1 implies as usual x dominated by u2 u3 : actually, should x be adjacent to both u2 and u3 ; {u1 ; u2 ; u3 ; x} would induce a diamond of G. Hence x is not adjacent to, say, u3 . It follows that {q; q1 ; x; u2 ; u3 }, with q ∈ Q; q = q1 ; q2 ; q3 , forms an induced P5 of G (contradiction). Let us now turn to the case p = 3 and show that Ui is a stable set of G; 1 6 i 6 3. To this aim, since Ai contains no point adjacent to ui , it is sucient to prove that Ui − Ai = Ui − {ui } is stable for 1 6 i 6 3. w.l.o.g., assume in fact by contradiction that x and y are adjacent points of U1 −A1 . As elements of U1 , they are both dominated by u2 u3 , but, as usual, being G diamond-free, each of them is adjacent to only one extreme of u2 u3 . Similarly, x and y are not both adjacent to u1 (to u2 ), otherwise {q1 ; x; y; u1 (u2 )} would induce a diamond of G. Hence, x is adjacent, say, to u2 , and y to u3 . But then {x; y; u3 ; q3 ; q2 } induces a P5 of G. After Lemma 3.10 it is worth noticing that Observation 3.11. Given Q; one can decide about which case of Lemmas 3:8 and 3:10 occurs in O(n2 ) time. In fact, checking (i) clearly takes O(n2 ) time; (ii) requires verifying whether or not the points of G − Q are all adjacent to Q ⊆ {u; v}, and this can be done in O(n) time. As for (iii), verifying that G − Q is P3 -free is as costly as verifying that it is complete, so the complexity is again O(n2 ). Finally, if none of the above cases holds, then nding U1 ; : : : ; Up given Q clearly costs O(n). If Ui and Uj are not adjacent, then we are done (case (iii)); otherwise, the existence of ui uj ∈ E can be checked in O(n2 ), and therefore T can then be found in O(n) further steps. So we are at last in a position to prove our second main result. Proof of Theorem 1.10. Theorem 1.1 implies that G contains either a dominating P3 = ({x; y; z}; {xy; yz}), or a dominating clique. Accordingly, we split the proof into two major cases, and show that the problem always reduces to basic instances of P5 -free bipartite or P3 -free graphs. G has a dominating P3 . In this case, G is partitioned into the following sets: D(x; y); D(x; z); D(y; z); Nyz (x); Nxz (y); Nxy (z); {x; y; z} (note that D(x; y; z) = ∅, since G is diamond-free). As G is P5 -free, Nyz (x) ∪ Nxy (z) induces a complete bipartite subgraph. Thus, S(G − {x; y; z}) is a maximum stable set either of H1 = G[Nyz (x) ∪ Nxz (y) ∪ D(x; y) ∪ D(x; z) ∪ D(y; z)] or of H2 = G[Nxz (z) ∪ Nxz (y) ∪ D(x; y) ∪ D(x; z) ∪ D(y; z)]: C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 19 As xy (yz) dominates H1 ∪ xy (dominates H2 ∪ yz), by Corollary 3.7 we can compute S(H1 ) (S(H2 )) in time O(n2 ): this is therefore the time complexity of nding a maximum stable set of G − {x; y; z}, and hence of G when there exists a stable S(G) not intersecting {x; y; z}. Let us now examine the case in which every S(G) contains a point of {x; y; z}. Here one has three subcases: (a) y ∈ S(G); (b) x; z ∈ S(G); (c) x ∈ S(G); z ∈ S(G). In Subcase (a), either S(G) − {x; y; z} ⊆ Nxy (z) ∪ D(x; z), or S(G) − {x; y; z} ⊆ Nyz (x) ∪ D(x; z); since the subgraphs induced by the above sets are P3 -free, S(G) can be immediately computed in time O(n). In Subcase (b), S(G) − {x; y; z} is contained in Nxz (y), which induces a P3 -free subgraph of G: once again, S(G) can be computed in time O(n). In Subcase (c), S(G) − {x; y; z} is a subset of D(y; z) ∪ Nxz (z) ∪ Nxz (y); since such a set is dominated by yz, we can apply Corollary 3.7 and hence end up with a global time complexity of O(n2 ). In conclusion, if G admits a dominating P3 then S(G) can be computed in O(n2 ) time. G has a dominating clique Q. By Lemmas 3.8 and 3.10, the following four cases are now to be considered. (i) (ii) (iii) (iv) G is complete (in this case, S(G) consists of course of one point). G contains a dominating line (this case has already been considered). V (G) − Q induces a P3 -free subgraph of G. V (G)−Q can be partitioned into sets U1 ; : : : ; Up , and there exist u1 ∈ U1 ; u2 ∈ U2 ; u3 ∈ U3 such that the set Z of points of V (G)−Q non-dominated by T = {u1 ; u2 ; u3 } is a P3 -free component of V (G) − Q. In case (iii), either S(G) is a subset of V (G) − Q and can be computed in time O(n); or S(G) contains one point qi ∈ Q, that is, S(G) − {qi } is contained in (V (G) − Q) − N (qi ); 1 6 i 6 |Q|, which again induces a P3 -free subgraph. In conclusion, S(G) can be found in time O(n2 ). It remains to consider case (iv). By Observation 3:9; T induces either (a) a triangle, or (b) a P3 . In subcase (a), we apply Lemma 3.10. If p ¿ 3 (case iv-1), then V (G) − Q is a clique, thus S(G) = {q1 ; u2 }. If p = 3 (case iv-2), then Ui is stable (i = 1; 2; 3). Suppose rst Q ∩ S(G) = ∅, say q1 ∈ S(G). Then S(G) − {q1 } is a subset of U2 ∪ U3 , which (Lemma 3.10) induces a bipartite P5 -free graph. Therefore (Theorem 1.5), S(G) can be computed in O(n) time. 20 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 Fig. 5. Suppose now Q ∩ S(G) = ∅. Then S(G) is a subset of V (G) − Q. Being 3-colorable, G − Q is K4 -free, and since G is diamond-free, every x ∈ V (G) − Q is adjacent to at most one point of every triangle of G − Q. We next show that G − Q contains no triangles at distance ¿ 1, and no cycle of triangles. Let us rst show that distinct triangles always share a point. Clearly, no triangles are at distance ¿ 2, otherwise and induced P5 would exist. Let then T = {u; v; w}; T ′ = {u′ ; v′ ; w′ } be adjacent triangles, with u ∈ T; u′ ∈ T ′ and uu′ ∈ E. Assume w (w′ ) dominated by q (by q′ ) ∈ Q. Since Q is maximal and G is diamond-free, q (q′ ) is adjacent to w (to w′ ) and to no other point of T (of T ′ ). But then q (q′ ) is necessarily adjacent to u′ (to u) too, for otherwise an induced P5 would occur. (By the way, this implies q = q′ ). With a similar argument, one sees that both ww′ and vw′ necessarily belong to E, and consequently also uw′ , for otherwise G would contain an induced diamond. Hence, N (w′ ) ∩ T = T , i.e., G − Q contains a K4 (contradiction). Let us now show that the triangles of G −Q never form a cycle. In fact, suppose that G − Q contains a subgraph that can be obtained by replacing each edge of a Ck with a triangle (Fig. 5(a)). Clearly, k ¿ 3 since G − Q is both K4 - and diamond-free. On the other hand, k ¿ 4 would imply a P5 that cannot have chords, due to the absence of diamonds and K4 (see Fig. 5(b), drawn for k = 4). Thus, G − Q consists of a bipartite P5 -free graph plus, possibly, a graph admitting a perfect elimination scheme. Consequently, a maximum stable set of G − Q can be computed in O(n) time. Let us nally consider Subcase (b). So let {u1 ; u2 ; u3 } ∼ = P3 with, say, u1 and u3 non-adjacent. We necessarily have (Observation 3:9) p = 3 and U2 ⊇ Z. Case (iv) then implies that q2 is a cut-point of G. Hence, if q2 ∈ S(G), then no point of U2 ∪Q belongs to S(G). In other words, U1 ∪ U3 ⊇ S(G) − {q2 }, or, equivalently, S(G) − {q2 } is a maximum stable set of the subgraph H of G induced by U1 ∪ U3 , which is dominated by line q1 q3 . Since H ∪ {q1 ; q3 } satis es the assumptions of Corollary 3.7, one can nd S(G) − {q2 } in O(n2 ) time. If otherwise q2 ∈ S(G), then S(G) is the union of C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 21 a maximum stable set of G[Z] and a maximum stable set of G − Z not containing q2 . The former can be computed in O(n) time, since being G[U2 ] P3 -free implies that also G[Z] is P3 -free. The latter can be computed in O(n2 ), since G − Z contains a dominating P3 . By Observations 1:2 and 3:11, one can decide about which of the above cases occurs in time O(n2 ). Thus the theorem is proved. Observation 3.12. Summarizing the results obtained so far; to develop an algorithm for solving SSP in (P5 ; diamond)-free graphs it is sucient to provide procedures to recognize the particular subcase and to solve SSP for P3 -free and bipartite P5 -free graphs (see also Observation 3:4). One consequence is that the complexity results reported in this section hold also for the weighted version of the problem. Acknowledgements We gratefully acknowledge the comments of anonymous referees, whose careful scrutiny helped improve this paper considerably. References [1] C. Arbib, R. Mosca, Polynomial algorithms for special cases of the balanced complete bipartite subgraph problem, J. Combin. Math. Comput. 30 (1999) 3–22. [2] G. Bacso, Zs. Tuza, Dominating cliques in P5 -free graphs, Period. Math. Hung. 21 (4) (1990) 303–308. [3] Z. Blazski, M. Hujter, M. Pluhar, Zs. Tuza, Graphs with no induced C4 and 2K2 , Discrete Math. 115 (1993) 51–55. [4] D. Cao, G.L. Nemhauser, Polyhedral characterization and perfection of line graphs, Discrete Appl. Math. 81 (1998) 141–154. [5] V. Chvatal, C.T. Hoang, N.V.R. Mahadev, D. de Werra, Four classes of perfectly orderable graphs, J. Graph Theory 11 (1987) 481–495. [6] C. De Simone, A. Sassano, Stability number of bull- and chair-free graphs, Discrete Appl. Math. 41 (1993) 121–129. [7] J.-L. Fouquet, V. Giakoumakis, F. Maire, H. Thuillier, On graphs without P5 and P 5 , Discrete Math. 146 (1995) 33–44. [8] A. Galluccio, A. Sassano, The rank facets of the stable set polytope for claw-free graphs, J. Combin. Theory, Ser. B 69 (1) (1997) 1–38. [9] M.R. Garey, D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-completeness, Freeman & Co., San Francisco, CA, 1979. [10] V. Giakoumakis, I. Rusu, Weighted parameters in (P5 ; P5 )-free graphs, Discrete Appl. Math. 80 (2–3) (1997) 255–261. [11] M.C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, Academic Press, New York, 1980. [12] M. Grotschel, L. Lovasz, A. Schrijver, Geometric Algorithms and Combinatorial Optimization, Springer-Verlag, Berlin, 1988. [13] F. Harary, Graph Theory, Addison-Wesley, Reading, MA, 1972. [14] I. Holyer, The NP-completeness of edge-coloring, SIAM J. Comput. 10 (1981) 718–721. [15] W.L. Hsu, Y. Ikura, G.L. Nemhauser, A polynomial algorithm for maximum weighted vertex packings in graphs without long odd cycles, Math. Prog. 20 (1981) 225–232. [16] W.L. Hsu, G.L. Nemhauser, Algorithms for minimum covering by cliques and maximum clique in claw-free perfect graphs, Discrete Math. 38 (1982) 65–71. 22 C. Arbib, R. Mosca / Discrete Mathematics 250 (2002) 1–22 [17] G.J. Minty, On maximal independent sets of vertices in claw-free graphs, J. Combin. Theory, Ser. B 28 (1980) 284–304. [18] R. Mosca, A note on the stable sets of certain P5 -free graphs, submitted for publication. [19] S. Poljak, A note on stable sets and colorings of graphs, Comment. Math. Univ. Carolinae 15 (1974) 307–309. [20] J. Puech, Irredundance perfect and P6 -free Graphs, J. Graph Theory 29 (1998) 239 –255. [21] W. Zang, Coloring graphs with no odd-K4 , Discrete Math. 184 (1998) 205–212.