• Nem Talált Eredményt

4.3 Cleaning an interval graph

4.3.2 Reduction rules

In this section, we introduce some reduction rules, each of which can be applied in linear time, and provides a necessary set, an independent subproblem, or a reduced input, as described earlier. Our aim is to handle all cases except for the case when bothGandG0have a PQ-tree with a Q-node root. We always apply the first possible reduction. From now on, we assume thatS is a solution for (G0, G) andφS is an isomorphism fromG0 toG−S.

Rule 1. Isomorphic components.Lemma 4.3.7 yields a simple reduction: ifGandG0 have isomorphic components, then algorithm A can output a reduced input of (G0, G).

4.3. Cleaning an interval graph 55 Note that partitioning a set of interval graphs into isomorphism equivalence classes can be done in linear time [96] (see also [42, 135, 136]). Hence, this reduction can also be performed in linear time.

Lemma 4.3.7. If K andK0 are connected components of GandG0, respectively, and K is isomorphic toK0, then(G0−K0, G−K)is a reduced input of(G0, G).

Proof. Trivially,G0−K0has fewer vertices thanG0, and any solution for (G0−K0, G−K) is a solution for (G0, G) as well, by the isomorphism ofK0andK. Therefore, we only have to prove that if (G0, G) is solvable then (G0−K0, G−K) is also solvable. Clearly, ifS∩V(K) =∅, then we can assume w.l.o.g. thatφS(K0) =K. In this case,S is a solution for (G0−K0, G−K).

Now, if S∩V(K) 6= ∅ then K and φS(K0) are disjoint. Moreover,K and φS(K0) are disjoint isomorphic connected components of G−S0 where S0 = S \V(K). Let κ be an isomorphism fromK toφS(K0). Notice that the role ofK andφS(K0) can be interchanged, and we can replaceS∩V(K) withκ(S∩V(K)) in the solution. Thus,S0∪κ(S∩V(K)) is a solution for (G0, G) that is disjoint fromK. Since this yields a solution for (G0−K0, G−K) as well, this finishes the proof.

Rule 2. Many components in G0.This reduction is possible in the case whenG0 has at least 4k+ 1 components. Since Rule 1 cannot be applied, none of the components ofGis isomorphic to a component ofG0. Our aim is to locate φS(K0) in Gfor one of the compo-nentsK0ofG0. If we findφS(K0) then we know thatNGS(K0)) must be contained inS, so we can produce anecessary setof size 1 by outputting any of the vertices ofNGS(K0)).

Given a graphH, recall thatM(H, G) denotes the occurrences ofH in Gas a complete module. By Proposition 4.3.3, the elements of M(H, G) are disjoint subsets of V(G). We can findM(H, G) in linear time, using the labeled PQ-tree ofGand the characterization of Lemma 4.3.2.

Relying on Lemmas 4.3.4 and 4.3.6, the algorithm performs the following reduction. Sup-pose that K10, K20, . . . , Kk00 are thek0 = 4k+ 1 largest connected components ofG0, ordered decreasingly by their size, and letS be a solution for (G0, G). As the vertex sets of the con-nected components ofG0 are complete modules of G0, the setsKiS(V(Ki0)) for i∈[k0] are complete modules ofG−S. By definition, these sets are also disjoint and independent.

As a consequence of (1) in Lemma 4.3.4, we get that for at leastk0−4k= 1 indices i∈[k0] the set Ki will be a complete module of G. We branch on the choice of i to find such a set Ki, resulting in at most k0 possibilities. Observe that w.l.o.g. we can assume that the subgraph G[Ki] is the first one (according to the given representation of G) among the components ofG−S isomorphic toKi0.

It remains to describe how we can findKiinG. To begin, we suppose now thatKi0is not a clique. Let us discuss a simplified case first, where we assume thatKi0is not contained as an induced subgraph in any of the componentsKj0 ifj6=i. LetM(Ki0, G) ={A1, A2, . . .}, where the sets inM(Ki0, G) are ordered according to their order in the interval representation ofG.

Let i denote the index for whichAi is the first element in M(Ki0, G) that is a complete module inG−Sas well. SinceKi0is not contained in a component ofG0having more vertices than|V(Ki0)|,G[Ai] must be a connected component ofG−S. Also, G[Ai] is isomorphic to Ki0, and by the definition of Ai, it must be the first such component of G−S. Thus, we can conclude thatAi equals Ki. By (2) of Lemma 4.3.4, there can be at most 4k sets inM(Ki0, G) that are not complete modules inG−S, so we get thati≤4k+ 1 =k0. Hence, we can findKi by guessingi and branching intok0 directions.

Let us consider now the general case, where some of the componentsKj0 can containKi0 in G0. (We still suppose that Ki is not a clique.) For each j < i, we define an indicator variable δ(j) which has value 1 if and only ifKj precedes Ki in G−S. We guess δ(j) for eachj ∈[i−1], which means at most 2k01 possibilities.

A B C D Ki0 F

φS(A)

φS(B) φS(C) φS(D) Ki φS(F)

G G0

Figure 4.5: An illustration of Rule 2. In this example, the small rectangles denote elements ofM(Ki0, G0) andM(Ki0, G). Rectangles with a skew pattern are elements ofM(Ki0, G) that are not complete modules ofG−S. Crossed rectangles with a dashed border indicate if some setφS(X) is not a complete module ofGfor someX ∈ M(Ki0, G0). In this example,i= 5, δ(1) = 0, δ(2) =δ(3) =δ(4) = 1,|M0|= 4 andi= 6.

Again, let M(Ki0, G) = {A1, A2, . . .}, where the sets Ah are ordered according to their order in the interval representation of G. Let i denote the index for which Ki = Ai, and letM0 stand forS

j<i,δ(j)=1M(Ki0, Kj0), which is a collection of subsets ofV(G0), each inducing a subgraph ofG0 isomorphic toKi0. AsKiis not a clique, the elements ofM0inG0 are disjoint and independent, so by (1) of Lemma 4.3.4 we get that for at least |M0| −4k setsA∈ M0, the setφS(A) will be a complete module ofGas well. As all these sets precedeKi

inG, we get that φS(A)∈ {A1, . . . , Ai1} holds for at least|M0| −4ksets A∈ M0. From this,i−1≥ |M0| −4kfollows.

Clearly, for all those setsA∈ {A1, . . . , Ai1} which are complete modules inG−S as well,φS1(A) must be contained in a component ofG0 which is larger thanKi0. Here we used again the assumption thatG[Ki] is the first one among the components ofG−S isomorphic toKi. Since such anAprecedesKi, we obtainφS1(A)∈ M0. By (2) of Lemma 4.3.4, there can be at most 4ksets amongA1, . . . , Ai1 that are not complete modules inG−S, so we get thatφS1(A)∈ M0for at leasti−1−4ksetsAin{A1, . . . , Ai1}. This impliesi−1≤

|M0|+ 4k. Altogether, we get the bounds|M0| −4k+ 1≤i≤ |M0|+ 4k+ 1. Since|M0|can be determined in linear time, by branching on the at most 8k+ 1 possibilities to choosei, we can find the vertex setKi.

Now, we suppose thatKi0 is a clique. AsKiis a component ofG−S,|NG(Ki)| ≤k, which by Lemma 4.3.5 implies thatKi must bek/2-short. Using Lemma 4.3.6, we can find Ki in a similar manner to the previous case. We denote byN(H, G) the occurrences of a graphH in G as a k/2-short complete module. Analogously to the previous case, let N(Ki0, G) = {B1, B2, . . .}, where the sets inN(Ki0, G) are ordered according to their order in the fixed representation of G. We also let Ki = Bi and N0 = S

j<i,δ(j)=1N(Ki0, Kj0). Now, using Lemma 4.3.6 just as in the reasoning above, we get the bounds|N0| −k(3k/2 + 5)≤i−1≤

|N0|+k(2k+ 3). Again,|N0| can be determined in linear time, so by branching on the at mostk(7k/2 + 8) + 1 possibilities to choosei, we can find the vertex setKi.

Since Rule 1 cannot be applied, none of the components of G can be isomorphic to a component ofG0, henceSi =NG(Ki) is not empty. ClearlySi⊆S, so we get that{s}is a necessary set for anys ∈Si. The total number of possible branches in this reduction is at most (4k+ 1)24k(k(7k/2 + 8) + 1) = 2O(k).

Rule 3. DisconnectedG.Here we give a reduction for the case whenGis not connected, but the previous reductions cannot be performed. First, observe that each component ofG contains at least one vertex from S, as none of them is isomorphic to a component of G0.

4.4. The Q-Q case 57