The Proper Interval Colored Graph problem for caterpillar trees

The Proper Interval Colored Graph problem for caterpillar trees

Electronic Notes in Discrete Mathematics 17 (2004) 23–28 www.elsevier.com/locate/endm The Proper Interval Colored Graph problem for caterpillar trees...

202KB Sizes 1 Downloads 54 Views

Electronic Notes in Discrete Mathematics 17 (2004) 23–28 www.elsevier.com/locate/endm

The Proper Interval Colored Graph problem for caterpillar trees (Extended Abstract)  1 ` C. Alvarez M. Serna2

Dept. de Llenguatges i Sistemes Inform` atics, UPC, Jordi Girona Salgado 1-3. 08034 Barcelona, Spain

Abstract This paper studies the computational complexity of the Proper interval colored graph problem (picg), when the input graph is a colored caterpillar, parameterized by hair length. To prove our result we also study a graph layout problem the Proper colored layout problem (pclp). We show a dichotomy result: the picg and the pclp are NP-complete for colored caterpillars of hair length ≥ 2, while both problems are in P, for colored caterpillars of hair length < 2.

1

Introduction

A graph G = (V, E) is called an interval graph if one can assign to each vertex v ∈ V an interval on the real line Iv , in such a way that (u, v) ∈ E ⇐⇒ Iu ∩ Iv = ∅. When in addition for any pair of vertices u, v ∈ V it holds that Iu ⊆ Iv , the graph is called a proper interval graph. Interval graphs have been studied intensively because of their wide applicability to practical problems [7]. Many efforts have been devoted to the study of problems in which one is asked to complete a graph or a colored graph into an interval or a proper interval graph as this kind of problems are used to model ambiguity in Physical Mapping or consistency in Temporal Reasoning [9]. In the colored versions of the above problems, the input is a graph together with a proper  The authors thank the support of the FET Programme of the EU under contract number IST-2001-33116 (FLAGS) and the Spanish CICYT project TIC-2002-04498-C05-03 1 Email: [email protected] 2 Email: [email protected] 1571-0653/$ – see front matter © 2004 Elsevier B.V. All rights reserved. doi:10.1016/j.endm.2004.03.008

24

C. Àlvarez, M. Serna / Electronic Notes in Discrete Mathematics 17 (2004) 23–28

vertex coloring that uses k-colors, and the solution is a super-graph that, besides of being of the required type, is still properly colored by the given coloring. Most of those problems are known to be NP-complete, the Interval graph completion [5] and the Interval colored graph completion (icg) [4,8]. In the case that the graph has degree bounded by a constant and it is further colored with k colors, there is a O(nk−1 ) algorithm to solve the icg [10]. For a fixed number of colors k, the problem is NP-complete for k ≥ 4 and in P for k < 4 [3]. In fact for 4 colors the problem is NP-complete even for caterpillar trees [1]. Recall that a caterpillar with hairs of length at most h is formed by a chain, called the backbone. Each node in the backbone can be connected to several non intersecting paths of length at most h. The parameterized version of the Proper interval colored graph (picg) problem, with parameter the number of colors, is W [1]-hard, this implies the NP-completeness of picg and a polynomial time algorithm for constant number of colors [10,11,6]. We study the complexity of the picg when the input graph is a colored caterpillar tree. We show its NP-completeness for colored caterpillars of hair length ≥ 2, and provide a polynomial time algorithm for caterpillars of hair length < 2. To prove our result we reinforce the relationship between intervalizing problems and graph layout problems. Recall that given a graph G = (V, E) with |V | = n a layout ϕ of G is a one to one mapping ϕ : V −→ [n]. For a given layout ϕ, and any 1  i < n, let Vi = {v | ϕ(v)  i and ∃u ϕ(u) > i (u, v) ∈ E}. For a given k-colored graph (G = (V, E), κ), where κ is a proper k-coloring of G, a colored layout of (G, κ) is a layout ϕ of G such that for all u ∈ V with ϕ(u) > 1, κ(u) ∈ κ(Vϕ(u)−1 ) and a proper colored layout of (G, κ) is a colored layout ϕ of G such that for all u, v ∈ V and x ∈ V with degree at least 2, if (u, v) ∈ E and ϕ(u) < ϕ(x) < ϕ(v) then it exists a vertex y such that ϕ(v) < ϕ(y), (x, y) ∈ E. The Colored layout problem (clp) asks whether a given k-colored graph has a proper colored layout. This problem is equivalent to the icg problem [2]. We introduce another graph layout problem the Proper colored layout problem (pclp) that asks whether a given a k-colored graph has a proper colored layout. The pclp problem is not identical to the picg problem, the graph G 1 , given in figure 1, has a proper colored layout, but does not have any proper intervalization (a label inside a circle indicates a color, while a label outside a circle, if any, indicates a node name). However, we will show that the picg problem can be formulated as an instance of the pclp, for a particular graph class. Our main result is that the picg and pclp problems are NP-complete for colored caterpillars of hair length ≥ 2 and in P for caterpillars of hair length 1 or 0. This contrasts with the fact that the Interval graph completion problem for trees is in P [12]. For the hardness results we provide a reduction

C. Àlvarez, M. Serna / Electronic Notes in Discrete Mathematics 17 (2004) 23–28 G+ 1

G2

G1 a

b

b

a

b

b

b

25

b

a

X

b

b

b

Fig. 1. Some graphs

from the Multiprocessor Scheduling problem, while the polynomial time results follows from a characterization in terms of forbidden subgraphs.

2

The reduction for the PICG problem

We start by establishing the relationship between the picg and the pclp. Given a k-colored graph (G = (V, E), κ), a decoration of G is a new k + 1colored graph (G+ = (V  , E  ), κ ) with V  = V ∪V + where V + = {u+ | u ∈ V }, E  = E ∪ E + where E + = {(u, u+ ) | u ∈ V }, and for any u in V , κ (u) = κ(u) and κ (u+ ) = c, where c is a new color, therefore κ is a k + 1 coloring of G+ . We refer to G+ as a decorated graph. Theorem 2.1 (G, κ) ∈ picg iff (G+ , κ ) ∈ pclp Inspired in the schema used in [13] to show hardness for the bandwidth problem, we give a reduction from the Multiprocessor Scheduling problem. Recall that given a set of n tasks, having duration ti , for 1  i  n, a deadline D and a set of m processors, determine whether the tasks can be assigned to processors so that all processors finish their work before the deadline D. Recall that the problem is NP-complete in the strong sense, so we can assume that the duration of each task is polynomially bounded. We sketch the construction of a decorated caterpillar. Given an instance I = (t1 , . . . , tn , D, m) of the Multiprocessor Scheduling problem we construct the colored decorated caterpillar G(I) (see figure 2) obtained by joining three different gadgets, one for the processors, one for the tasks, and a turning point. A processor is represented by an alternating chain, and the graph associated to the processors is formed by a series of barriers, separating the graphs corresponding to processors i and i + 1, with two additional big barriers, one at the beginning and the other at the end. Each task is represented by an alternating chain. We join the graphs corresponding to two consecutive tasks with a zig-zag chain of length equal to the length of the backbone of the processors gadget. An additional zig-zag chain joins the first task with the node G of the turning point. We select a set of new different colors for each zig-zag chain (sets ∆i ). So, the set of colors is, in addition of {1, 2, 3, 4}, ∆ = ∪ni=1 ∆i . Theorem 2.2 The instance I = (t1 , . . . , tn , D, m) of multiprocessor Scheduling has a solution iff the colored decorated caterpillar G(I) has a proper colored

C. Àlvarez, M. Serna / Electronic Notes in Discrete Mathematics 17 (2004) 23–28

26

Processors Rm

Tasks

r

n

1

4

1

n

2

X2

X3

r

s

r

3

Zl (∆n )

Pm

Xn−1 Xn s

B(∆ ∪ {1, 3, 4}, 2)

1

A barrier B(∆, r) ∆ = {1, . . . , n} X1

Tn

1

1

r 2

B({3, 4}, 2)

Zl (∆2 )

Alternating chain Cn (r, s) 2

X1

r

c1

r

cn

B({3, 4}, 2) 4

Xn r

1

T1 P1

3

1

Generalized Alternating chain

A1

A2

A3

c1

c2

c3

An−1 An cn

2

Zl (∆1 )

1 B(∆ ∪ {2}, 1)

A 2

1

2

3

4

3

4 G

3

D1

D2

D3

Dn−1 Dn

2 Turning Point

Zig-Zag chain Zn (∆)

Fig. 2. A sketch of the caterpillar G(I) and some types of graphs used in its construction

layout. Therefore, picg is NP-complete for caterpillars with hair length ≥ 2. The previous reduction can be modified to show that the pclp problem is NP-complete for caterpillars with hair length at most 2. The changes affect the turning point and the task’s gadget. Theorem 2.3 pclp is NP-complete for caterpillars with hair length 2.

3

Short haired Caterpillars

We consider now the case of caterpillars with hair length ≤ 1. The following technical lemma follows from the definitions. Lemma 3.1 If a k-colored graph (G = (V, E), κ) has a proper colored supergraph that is a proper interval graph, then any of its subgraphs verify the same property. Based on the fact that the caterpillars Dk given in Figure 3 and the caterpillar G2 given in Figure 1 have no proper colored layout we show the following characterization.

C. Àlvarez, M. Serna / Electronic Notes in Discrete Mathematics 17 (2004) 23–28

Dk

Dk

A1 c1

b

A2 c2

b

b

Ak−1

b

Ak ck

b

A1 c1

b

A2 c2

b

b

27

D

Ak−1

b

Ak ck

b

b

A1

A2

A3

r

b

t

b

s

b

Fig. 3. Some decorated caterpillars

Lemma 3.2 A decorated colored caterpillar with hair length 1 has a proper colored layout iff it does not contain any instance of the subgraphs Dk nor the subgraph G2 . We find polynomial time algorithm for checking the above property, and for the case of caterpillars with hair length 0. Theorem 3.3 The pclp and the picg problems are in P for caterpillars with hair length ≤ 1.

References ` [1] C. Alvarez, J. D´ıaz, and M. Serna. The hardness of intervalizing four colored caterpillars. Discrete Mathematics 235:245–253, 2001. ` [2] C. Alvarez, J. D´ıaz, and M. Serna. Intervalizing colored graphs is NP-complete for caterpillars with hair length 2. Technical Report LSI 98-9-R, Universitat Polit`ecnica de Catalunya, 1998. [3] H. Bodlaender, M. R. Fellows, and M. T. Hallet. Beyond NP-completeness for problems of bounded width: hardness for the W-hierarchy. In ACM Symposium on Theory of Computing, pages 449–458, 1995. [4] M. R. Fellows, M. T. Hallet, and W. T. Wareham. DNA physical mapping: Three ways difficult. In T. Lengauer, editor, Algorithms-ESA’93, number 726 in Lecture Notes in Computer Science, pages 157–168. Springer-Verlag, September 1993. [5] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman, San Francisco, 1979. [6] P. W. Goldberg, M. C. Golumbic, H. Kaplan, and R. Shamir. Four strikes against physical mapping of DNA. Journal of Computational Biology, 2:139–152, 1995. [7] M. C. Golumbic. Algorithmic graph theory and perfect graphs. Academic Press, New York, 1980. [8] M. C. Golumbic, H. Kaplan, and R. Shamir. On the complexity of DNA physical mapping. Advances in Applied Mathematics, 15:251–261, 1994. [9] M. C. Golumbic, H. Kaplan, and R. Shamir. Graph sandwich problems. Journal of Algorithms, 19:449–473, 1995. [10] H. Kaplan and R. Shamir. Pathwidth, bandwidth and completion problems to proper interval graphs with small cliques. SIAM Journal on Computing, 25(3):540–561, June 1996. [11] H. Kaplan, R. Shamir, and R. E. Tarjan. Tractability of parameterized completion problems on chordal, strongly chordal, and proper interval graphs. SIAM Journal on Computing, 28(5):1906–1922 (electronic), 1999.

28

C. Àlvarez, M. Serna / Electronic Notes in Discrete Mathematics 17 (2004) 23–28

[12] D. Kuo and G. J. Chang. The profile minimization problem in trees. SIAM Journal on computing, 23:71–81, Feb. 1994. [13] B. Monien. The bandwidth minimization problem for caterpillars with hair length 3 is NPcomplete. SIAM Journal on Algebraic and Discrete Methods, 7(4):505–512, 1986.