Max-Planck Institut fur Informatik, Im Stadtwald, Saarbrucken, Germany,

Similar documents
Localization in Graphs. Richardson, TX Azriel Rosenfeld. Center for Automation Research. College Park, MD

Eulerian disjoint paths problem in grid graphs is NP-complete

An Ecient Approximation Algorithm for the. File Redistribution Scheduling Problem in. Fully Connected Networks. Abstract

arxiv: v2 [cs.cc] 29 Mar 2010

G G[S] G[D]

A technique for adding range restrictions to. August 30, Abstract. In a generalized searching problem, a set S of n colored geometric objects

Face covers and the genus of apex graphs Bojan Mohar Department of Mathematics, University of Ljubljana, 1111 Ljubljana, Slovenia

Max-Cut and Max-Bisection are NP-hard on unit disk graphs

Treewidth and graph minors

A Simplied NP-complete MAXSAT Problem. Abstract. It is shown that the MAX2SAT problem is NP-complete even if every variable

Complexity Results on Graphs with Few Cliques

Max-Cut and Max-Bisection are NP-hard on unit disk graphs

Coloring edges and vertices of graphs without short or long cycles

COLORING EDGES AND VERTICES OF GRAPHS WITHOUT SHORT OR LONG CYCLES

ON WEIGHTED RECTANGLE PACKING WITH LARGE RESOURCES*

Dominating Set on Bipartite Graphs

The NP-Completeness of Some Edge-Partition Problems

Minimum sum multicoloring on the edges of trees

On Covering a Graph Optimally with Induced Subgraphs

1 Introduction and Results

The edge-disjoint paths problem is NP-complete for series parallel graphs

arxiv: v1 [cs.dm] 21 Dec 2015

The strong chromatic number of a graph

Theorem 2.9: nearest addition algorithm

SCHEDULING WITH RELEASE TIMES AND DEADLINES ON A MINIMUM NUMBER OF MACHINES *

PLANAR GRAPH BIPARTIZATION IN LINEAR TIME

Connecting face hitting sets in planar graphs

On Structural Parameterizations of the Matching Cut Problem

v 2 v 3 v 1 v 0 K 3 K 1

Algorithm and Complexity of Disjointed Connected Dominating Set Problem on Trees

Ray shooting from convex ranges

Packing Chromatic Number of Distance Graphs

Bottleneck Steiner Tree with Bounded Number of Steiner Vertices

1 Introduction The concept of graph spanners has been studied in several recent papers in the context of communication networks, distributed computing

Greedy algorithms is another useful way for solving optimization problems.

XLVI Pesquisa Operacional na Gestão da Segurança Pública

Finding a winning strategy in variations of Kayles

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

Let v be a vertex primed by v i (s). Then the number f(v) of neighbours of v which have

The temporal explorer who returns to the base 1

Transmissions in a Network with Capacities and Delays. Christos D. Zaroliagis 4. September 9, 1996

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

Algorithmic complexity of two defence budget problems

Analysis of an ( )-Approximation Algorithm for the Maximum Edge-Disjoint Paths Problem with Congestion Two

A 2k-Kernelization Algorithm for Vertex Cover Based on Crown Decomposition

if for every induced subgraph H of G the chromatic number of H is equal to the largest size of a clique in H. The triangulated graphs constitute a wid

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

Conflict Graphs for Combinatorial Optimization Problems

Parameterized coloring problems on chordal graphs

A note on Baker s algorithm

Chordal deletion is fixed-parameter tractable

An exact algorithm for max-cut in sparse graphs

The Competitiveness of On-Line Assignments. Computer Science Department. Raphael Rom. Sun Microsystems. Mountain View CA

On the packing chromatic number of some lattices

Theoretical Computer Science 297 (2003) Cube packing São Paulo-SP, Brazil

Discrete Applied Mathematics

of Two 2-Approximation Algorithms for the Feedback Vertex Set Problem in Undirected Graphs Michel X. Goemans y M.I.T. David P. Williamson x IBM Watson

On the Balanced Case of the Brualdi-Shen Conjecture on 4-Cycle Decompositions of Eulerian Bipartite Tournaments

Javier Cordova. Abstract. In this paper the following problem is considered: given a root node R in a

The Number of Connected Components in Graphs and Its. Applications. Ryuhei Uehara. Natural Science Faculty, Komazawa University.

The problem of minimizing the elimination tree height for general graphs is N P-hard. However, there exist classes of graphs for which the problem can

3 No-Wait Job Shops with Variable Processing Times

A Nim game played on graphs II

Proposed running head: Minimum Color Sum of Bipartite Graphs. Contact Author: Prof. Amotz Bar-Noy, Address: Faculty of Engineering, Tel Aviv Universit

Some Remarks on the Geodetic Number of a Graph

On a n Ed g e Crossing P roblem

3-colouring AT-free graphs in polynomial time

Minimal Dominating Sets in Graphs: Enumeration, Combinatorial Bounds and Graph Classes

Feedback Arc Set in Bipartite Tournaments is NP-Complete

Mathematical and Algorithmic Foundations Linear Programming and Matchings

ABSTRACT Finding a cut or nding a matching in a graph are so simple problems that hardly are considered problems at all. Finding a cut whose split edg

Expected Approximation Guarantees for the Demand Matching Problem

Strong edge coloring of subcubic graphs

Approximability Results for the p-center Problem

Independent Sets in Hypergraphs with. Applications to Routing Via Fixed Paths. y.

Necessary edges in k-chordalizations of graphs

Parameterized graph separation problems

A Note on Polyhedral Relaxations for the Maximum Cut Problem

Discrete mathematics , Fall Instructor: prof. János Pach

Rearrangement of DNA fragments: a branch-and-cut algorithm Abstract. In this paper we consider a problem that arises in the process of reconstruction

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

6. Lecture notes on matroid intersection

A primal dual interpretation of two 2-approximation algorithms for the feedback vertex set problem in undirected graphs

Lecture 9 - Matrix Multiplication Equivalences and Spectral Graph Theory 1

1 Introduction. 1. Prove the problem lies in the class NP. 2. Find an NP-complete problem that reduces to it.

Online algorithms for clustering problems

Upper bounds and algorithms for parallel knock-out numbers

Simpler Approximation of the Maximum Asymmetric Traveling Salesman Problem

Chain Packings and Odd Subtree Packings. Garth Isaak Department of Mathematics and Computer Science Dartmouth College, Hanover, NH

Applied Mathematical Sciences, Vol. 5, 2011, no. 49, Július Czap

On the Approximation of Largest Common. Subtrees and Largest Common Point Sets. Technology, Tatsunokuchi, Ishikawa , Japan

arxiv:cs/ v1 [cs.cc] 28 Apr 2003

Topological Invariance under Line Graph Transformations

Set Cover with Almost Consecutive Ones Property

On Approximating Minimum Vertex Cover for Graphs with Perfect Matching

Agreedy approximation for minimum connected dominating sets

Graph Vertex Colorability & the Hardness. Mengfei Cao COMP-150 Graph Theory Tufts University

Exponential time algorithms for the minimum dominating set problem on some graph classes

Optimization Problems in Dotted Interval Graphs

On Algebraic Expressions of Generalized Fibonacci Graphs

Transcription:

An Approximation Scheme for Bin Packing with Conicts Klaus Jansen 1 Max-Planck Institut fur Informatik, Im Stadtwald, 66 13 Saarbrucken, Germany, email : jansen@mpi-sb.mpg.de Abstract. In this paper we consider the following bin packing problem with conicts. Given a set of items V = f1; : : : ; ng with sizes s 1; : : : ; s n (0; 1] and a conict graph G = (V; E), we consider the problem to nd a packing for the items into bins of size one such that adjacent items (j; j 0 ) E are assigned to dierent bins. The goal is to nd an assignment with a minimum number of bins. This problem is a natural generalization of the classical bin packing problem. We propose an approximation scheme for the bin packing problem with conicts restricted to d-inductive graphs with constant d. This graph class contains trees, grid graphs, planar graphs and graphs with constant treewidth. The algorithm nds an assignment for the items such that the generated number of bins is within a factor of (1 + ) of optimal, and has a running time polynomial both in n and 1. 1 Introduction 1.1 Problem Denition In this paper we consider the following bin packing problem with conicts. The input I of the problem consists of an undirected graph G = (V; E) with a set of items V = f1; : : :; ng and sizes s 1 ; : : :; s n. We assume that each item size is a rational number in the interval (0; 1]. The problem is to partition the set V of items into independent sets or bins U 1 ; : : :; U m such that P s iuj i 1 for each 1 j m. The goal is to nd a conict-free packing with a minimum number m of bins. For any instance I = (G = (V; E); (s 1 ; : : :; s n )), let SIZE(I) = P n s i=1 i denote the total size of the n items, and let OP T (I) denote the minimum number of unit size bins needed to pack all items without conicts. For graph classes not dened in this paper we refer to [7]. One application of the problem is the assignment of processes to processors. In this case, we have a set of processes (e.g. multi media streams) where some of the processes are not allowed to execute on the same processor. This can be for reason of fault tolerance (not to schedule two replicas of the same process on the same cabinet) or for eciency purposes (better put two cpu intensive processes on dierent processors). The problem is how to assign a minimum number of processors for this set of processes. A second application is given by storing versions of the same le or a database. Again, for reason of fault tolerance we would like to keep two replicas / versions of the same le on dierent le server. Another problem arises in load balancing the parallel solution of partial dierential equations (pde's) by domain decomposition [, 1]. The domain for the pde's is decomposed into regions where each region corresponds to a subcomputation. The subcomputations are scheduled on processors so that subcomputations corresponding to regions that touch at even one point are not performed simultaneously. Each subcomputation j requires one unit of running time and s j gives the amount of a given resource (e.g. number of used processors or the used storage). The goal of the problem is to nd a schedule with minimum total completion time. The conict graphs in this application

arise from a two-dimension domain decomposition problem. Other applications are in constructing school course time tables [15] and scheduling in communication systems [9]. 1. Results If E is an empty set, we obtain the classical bin-packing problem. Furthermore, if P jv s j 1 then we obtain the problem to compute the chromatic number (G) of the conict graph G. This means that the bin packing problem with conicts is NP-complete even if E = ; or if P jv s j 1. We notice that no polynomial time algorithm has an absolute worst case ratio smaller than 1:5 for the bin packing problem, unless P = NP. This is obvious since such an algorithm could be used to solve the partition problem [6] in polynomial time. For a survey about the bin packing problem we refer to [4]. The packing problem for an arbitrary undirected graph is harder to approximate, because Lund and Yannakakis [14] proved that unless P = NP there is an > 0 such that no polynomial time approximation algorithm for the coloring problem can guarantee a worst case ratio better than jv j. In [1, 3] the bin packing problem with conicts and with unit-sizes (s j = 1` for each item j V ) was studied. Baker and Coman called this packing problem (with unit sizes) Mutual Exclusion Scheduling (short: MES). In [3] the computational complexity of MES was studied for dierent graph classes like bipartite graphs, interval graphs and cographs, arbitrary and constant numbers m of bins and constant `. Lonc [13] showed that MES for split graphs can be solved in polynomial time. Baker and Coman [1] have proved e.g. that forest can be scheduled optimally in polynomial time and have investigated scheduling of planar graphs resulting from a two-dimensional domain decomposition problem. A linear time algorithm was proposed in [11] for MES restricted to graphs with constant treewidth and xed m. Furthermore, Irani and Leung [9] have studied on-line algorithms for interval and bipartite graphs. In [10], we have proposed several approximation algorithms A with constant absolute worst case bound A(I) OP T (I) for the bin packing problem with conicts for graphs that can be colored with a minimum number of colors in polynomial time. Using a composed algorithm (an optimum coloring algorithm and a bin packing heuristic for each color set), we have obtained an approximation algorithm with worst case bound between :691 and :7. Furthermore, using a precoloring method that works for e.g. interval graphs, split graphs and cographs we have an algorithm with bound :5. Based on a separation method we have got an algorithm with worst case ratio + for cographs and graphs with constant treewidth. A d-inductive graph introduced in [8] has the property that the vertices can be assigned distinct numbers 1; : : :; n in such a way that each vertex is adjacent to at most d lower numbered vertices. We assume that an order v 1 ; : : :; v n is given such that jfv j jj < i; fv j ; v i g Egj d for each 1 i n. We notice that such an order (if one exists) can be obtained in polynomial time. In other words, the problem to decide whether a graph is d - inductive can be solved in polynomial time. It is clear that d + 1 is an upper bound on the chromatic number of any d-inductive graph and that a (d + 1)-coloring can be computed in polynomial time using the ordering. As examples, planar graphs are 5-inductive and graphs with constant treewidth k are k-inductive. Moreover, trees are 1-inductive and grid graphs are -inductive. The goal is to nd an algorithm A with a good asymptotic worst case bound, that means that A(I) limsup OP T (L)!1 OP T (I)

is small. In this paper, we give an asymptotic approximation scheme for the bin packing problem with conicts restricted to d-inductive graphs. Our main result is the following: Theorem 1. There is an algorithm A which, given a set of items V = f1; : : :; ng with sizes s 1 ; : : :; s n (0; 1], a d-inductive graph G = (V; E) with constant d and a positive number, produces a packing of the items without conicts into at most A (I) (1 + )OP T (I) + O( 1 ) bins. The time complexity of A is polynomial in n and 1. The Algorithm In the rst step of our algorithm, we remove all items with sizes smaller than = and consider a restricted bin packing problem as proposed by Fernandez de la Vega and Lueker [5]..1 Restricted Bin Packing For all 0 < < 1 and positive integers m, the restricted bin packing problem RBP [; m] is dened as the bin packing problem (without considering conicts) restricted to instances where the item sizes take on at most m distinct values and each item size is at least as large as. An input instance for RBP [; m] can be represented by a multiset M = fn 1 : s 1 ; n : s ; : : :; n m : s m g such that 1 s 1 > s > : : : > s m. Furthermore, a packing of a subset of items in a unit size bin B is given also by a multiset B = fb 1 : s 1 ; b : s ; : : :; b m : s m g such that b i is the number of items of size s i that are packed into B. For xed M, a feasible packing B t is denoted by a m-vector (called bin type) (b t ; : : :; 1 bt m ) of non-negative integers such that P m i=1 bt i s i 1. Two bins packed with items from M have the same bin type if the corresponding packing vectors are identical. Using the parameter =, the number of items in a bin is bounded by a constant P m i=1 bt i b 1 c = b c. Given a xed set S = fs 1 ; : : :; s m g, the collection of possible bin types is fully determined and nite. The number q of bin types with respect to S can be bounded by? m+` ` where ` = b 1 c [5]. Fernandez de la Vega and Lueker [5] used a linear grouping method to obtain a restricted bin packing instance RBP [; m] with xed constant m = b n0 k c where n0 is the number of large items (greater than or equal to ) and where k = d n 0 e. Since the number q of bin types is also a xed constant, these bin packing instances can be solved in polynomial time using a integer linear program [5]. A solution x to an instance M of RBP [; m] is a q-vector of non negative integers (x 1 ; : : :; x q ) where x t denotes the number of bins of type B t used in x. A q-vector is feasible, if and only if P q x t=1 tb t i = n i 81 i m x t IN 0 81 t q where n i is the number of items of size s i. We get the integer linear program using the (in-)equalities above and the objective function P q x t=1 t (the number of bins in the solution). Let LIN(I) denotes the value of the optimum solution for the corresponding linear program. Karmarkar and Karp [1] gave a polynomial time algorithm A for the restricted bin packing problem such that A(I) LIN(I) + 1 + m + 1 : 3

Their algorithm runs in time polynomial in n and 1 and produces a integral solution for the large items with at most m non-zero components (or bin types) x t. Considering the linear grouping method in [5], we get k additional bins with one element. In total, the number of bins generated for the instance J with the large items is at most where k is at most OP T (J) + 1. OP T (J) + 1 + m + 1 + k. Generation a Solution without Conicts The algorithm of Karmarkar and Karp generates a packing of the large items into bins, but with some possible conicts between the items in the bins. In this subsection, we show how we can modify the solution to get a conict - free packing for the large items. In the following, we consider a non-zero component x t in the solution of the algorithm A of Karmarkar and Karp. The idea of our algorithm is to compute for a packing with x t bins of type B t a conict free packing that uses at most a constant number of additional bins. Let C 1 ; : : :; C xt V be a packing into x t bins of type t. Each set of items C i can be packed into a bin of type B t = (b t ; : : :; 1 bt m ). That means that jfv C i js v = s j gj b t j for each 1 j m and each 1 i x t. We may assume that the cardinalities jfv C i js v = s j gj are equal to b t j for each set C i ; otherwise we insert some dummy items. We dene with M = P m j=1 bt j the number of items in each bin of type B t. Notice that the number M of items in a bin is bounded by the constant b c. Next, we consider the subgraph of G induced by the vertex set C 1 [ : : : [ C xt and label the vertices in this subgraph with 1; : : :; M as follows. We sort the items in each set C i in non-increasing order of their sizes and label the corresponding vertices (in this order) by 1; : : :; M. Two items x; y with the same label (possibly in two dierent sets C x and C y ) have the same size, and one largest item in each set C i gets label 1. Let `(v) be the the label of v. The key idea is to compute independent sets U by a greedy algorithm with the property that f`(v)jv Ug = f1; : : :; Mg: Each independent set U with this property can be packed into one bin. Moreover, the bin type of a packing for such a set U is again B t. In general, the problem to nd an independent set U with dierent labels 1; : : :; M is NP-complete even in a forest. Theorem. The problem to nd an independent set U with labels 1; : : :; M in a labelled forest W = (V; E) with ` : V! f1; : : :; Mg is NP-complete. Proof. By a reduction from a satisability problem. Let = c 1^: : :^c m be a formula in conjunctive normal form, with two or three literals for each clause c i = (y i1 _ y i _ y i3 ) or c i = (y i1 _ y i ) and with y ij fx 1 ; x 1 ; : : :; x n ; x n g. We may assume that each variable x k occurs either (a) once unnegated and twice negated or (b) once negated and twice unnegated. 4

We build a forest W with vertex set V = fa ij jy ij is in c i ; 1 i mg and labelling `(a ij ) = i for 1 i m. The edge set E is given as follows: for each variable x k connect the vertices a ij and a i0 j 0, if and only if y ij = x k, y i0 j 0 = x k and (i; j) 6= (i 0 ; j 0 ). Using the property of the variables above, W forms a forest. Then, we can prove that is satisable, if and only if there is an independent set of size m with labels 1; : : :; m Our method is based on the following idea: if we have enough vertices in a d-inductive graph, then we can nd an independent set with labels 1; : : :; M in an ecient way. Lemma 3. Let G = (V; E) be a d-inductive graph with constant d and jv j = M L vertices, and a labelling ` : V! f1; : : :; Mg such that each label occurs exacly L times. If L d(m? 1) + 1 then there exists an independent set U in G with labels 1; : : :; M. Proof. If M = 1 then we have at least one vertex with label 1. For M we choose a vertex v V with degree d. We may assume that v is labelled with label `(v) = 1. Next, we delete all vertices in G with label 1. Case 1: There is a vertex v 0? (v) with label `(v 0 ) 6= 1. We may assume that `(v 0 ) = and that jfw? (v)j`(w) = gj jfw? (v)j`(w) = igj 8i f3; : : :; Mg: Then, we delete exactly a = jfw? (v)j`(w) = gj vertices in G with labels ; : : :; M where we prefer the vertices in the neighbourhood of v. All vertices w? (v) are removed after this step. In this case, we obtain a d-inductive graph G 0 = (V 0 ; E 0 ) with (L? a ) (M? 1) vertices and labelling ` : V 0! f; : : :; Mg such that each label ; : : :; M occurs exactly L? a L? d times. Since L 0 = L? a L? d d(m? ) + 1, we nd per induction an independent set U 0 in G 0 with labels ; : : :; M. Since v is not adjacent to the vertices in U 0, the set U = U 0 [ fvg has the desired properties. Case : All vertices v 0? (v) have label `(v 0 ) = 1, or v has no neighbour. In this case, we have directly a graph G 0 = (V 0 ; E 0 ) with (M? 1) L vertices and a labelling ` : V 0! f; : : :; Mg where each label occurs exactly L times. Again, we nd (by induction) an independent set U 0 with labels ; : : :; M that can be extended to the independent set U = U 0 [ fvg with labels 1; : : :; M. The rst idea is to compute for each bin type B t and the d-inductive graph G t = G[C 1 [ [C xt ] with labels 1; : : :; M t (the number of labels depends on the bin type) a partition into conict-free independent sets as follows: (a) if G t contains more than M t (d(m t? 1) + 1) vertices, then we nd an independent set U with labels 1; : : :; M t using the algorithm in Lemma 3, (b) otherwise we take for each vertex v in G t a separate bin. Since the numbers M t and d are xed constants, we obtain using this idea only a constant number of additional bins. Another and better idea is to analyse the coloring problem for a labelled d- inductive graph. The rst result is negative. Theorem 4. The problem to decide whether a forest W = (V W ; E W ) with labelling ` : V W! f1; : : :; Mg can be partitioned into three independent sets U 1 ; U ; U 3 where each independent set U i contains only vertices with dierent labels is NP-complete. Proof. We use a reduction from the 3-coloring problem with no vertex degree exceeding 4, which is NP-complete, to the coloring problem for a labelled forest. Let G = (V; E) be a graph with 5

V = f1; : : :; ng and maximum degree 4. We substitute for each node 1; : : :; n a graph H v and construct a forest W with labelling ` such that G is 3-colorable if and only if W can be partitioned into three independent sets, each with dierent labels. For the node substitution, we use a graph H v with vertex set fv(j; k)j1 j; 3; 1 k 4g and edge set f(v(j; k); v(j 0 ; k))j1 j 6= j 0 3; 1 k 4g [f(v(1; k); v(; k? 1)); (v(1; k); v(3; k? 1))j k 4g: The graph H v has 4 outlets, labelled by v(1; k). The graph H v has the following properties: (a) H v is 3-colorable, but not -colorable, (b) for each 3-coloring f of H v we have f(v(1; 1)) = f((v(1; )) = f(v(1; 3)) = f(v(1; 4)), (c) The graph K v which arises from H v by deleting the edges f(v(1; k); v(; k? 1)); (v(1; k); v(3; k? 1))j k 4g [ f(v(; k); v(3; k))j1 k 4g is a forest. For each edge e = (v; v 0 ) E of the original graph G we choose a pair of vertices v(1; k e;v ) and v 0 (1; k e;v 0) in the graphs K v and K v 0 and connect these vertices. Clearly, we can choose dierent vertices v(1; k e;v ) and v(1; k e0 ;v) in K v for dierent edges e; e 0 incident to the same vertex v. If we insert these connecting edges in the graph S vv K v, we obtain our forest W for the reduction. Moreover, we choose a labelling ` : V W! f1; : : :; 5ng as follows. For v = 1; : : :; n we dene `(v(1; )) = `(v(; 1)) = `(v(3; 1)) = 4(v? 1) + 1; `(v(1; 3)) = `(v(; )) = `(v(3; )) = 4(v? 1) + ; `(v(1; 4)) = `(v(; 3)) = `(v(3; 3)) = 4(v? 1) + 3; `(v(; 4)) = `(v(3; 4)) = 4(v): The remaining vertices v(1; 1) get dierent labels between 4n + 1 and 5n. Using this construction, we can prove that G is 3-colorable if and only if the union of the forest W and the disjoint union of the 5n complete graphs (one complete graph for each label) is 3-colorable. This proves the theorem. In the following, we show that the coloring problem can be approximated for labelled d-inductive graphs. Lemma 5. Let G = (V; E) be a d-inductive graph and let ` : V! f1; : : :; Mg be a labelling where each label occurs at most L times. Then, it is possible to compute a partition of G into at most L+d independent sets U 1 ; : : :; U L+d such that jfu U j j`(u) = igj 1 for each label i f1; : : :; Mg and each 1 j L + d. Proof. Let v be a vertex with degree at most d. Per induction on jv j, we have a partition for V 0 = V n fvg into at most L + d independent sets U 1 ; : : :; U L+d with the property above. Since v has at most d neighbours and there are at most L? 1 other vertices with label `(v), there is at least one independent set U i (1 i L + d) that does not contain a neighbour of v or a vertex with label `(v). This implies that the partition U 1 ; : : :; U i?1 ; U i [ fvg; U i+1 ; : : :; U L+d has the desired property. This Lemma gives us an approximation algorithm for the coloring problem of labelled d - inductive graphs with additive factor d (since we need at least L colors). We use this approximation 6

algorithm for each bin type B t with non - zero component x t. Since we have only m non - zero components x t, the total number of bins with only conict free items in each bin can be bounded by (1 + )OP T (J) + m + 1 + + m d where m..3 Insertion of Small Items In the following, we show how we can insert the small items into a sequence of bins with only large items. The proof contains also an algorithm to do this in an ecient way. Lemma 6. Let (0; 1=] be a xed constant. Let I be an instance of the bin packing problem with conicts restricted to d-inductive graphs and suppose that all items of size have been packed into bins. Then it is possible to nd (in polynomial time) a packing for I which uses at most bins. max[; (1 + )OP T (I)] + (3d + 1) Proof. The idea is to start with a packing of the large items into bins and to use a greedy algorithm to pack the small items. Let B 1 ; : : :; B 0 (with 0 ) be the bins in the packing of the large items with sizes at most 1? and let I be the set of items in I with sizes <. First, we order all items with respect to the d-inductive graph. We obtain an order v 1 ; : : :; v n of the vertices such that vertex v i has at most d neighbours with lower index for 1 i n. In this order (restricted to the small items), we try to pack the small items into the rst 0 bins with sizes at most 1?. If a bin B i [ fv j g forms an independent set, then we can place v j into the corresponding bin since the size SIZE(B i [ fv j g) 1. If the size of such an enlarged bin is now larger than 1?, then we remove B i from the list of the small bins and set 0 = 0? 1. After this step, the remaining bins have sizes at most 1?. It is possible that some small items v j can not be packed into the rst bins. At the end of this algorithm, we have a list of bins B 1 ; : : :; B 00 with 0 00 0 with sizes at most 1? and a set I 0 I of items with sizes < such that (*) for each item v j I 0 and each index 1 i 00 there exists an item x B i such that v j is in conict with x. The other jobs in I n I 0 are placed either in one of the bins B 1; : : :; B 00 or in a bin of size now larger than 1?. We notice that? 00 bins of sizes larger than 1? are generated. The key idea is to give lower and upper bounds for the number LARGE(I; 00 ) of large jobs in the rst 00 bins of sizes at most 1?. Notice that we count only the large items in these bins. (a) LARGE(I; 00 ) 00 b 1 c Each large job j has size. A packing vector B = (b 1 ; : : :; b m ) corresponding to the bin with large numbers has the property that P m b i=1 is i 1. This implies that P m P b i=1 i 1 or equivalent m b i=1 i b 1c (since the numbers b i are non-negative integers). Since we have 00 bins with at most b 1 c large items, we get the inequality (a). This inequality holds for each undirected graph. 7

(b) LARGE(I; 00 ) ji 0 j 00?d d First, we show that each small item v i I 0 can not be packed with at least 00? d large items v j1 ; : : :; v j 00?d that are in conict with v i and that have a larger index than i. It holds i < j 1 < : : : < j 00?d. To prove this consider the time step at which v i can not be packed into one of the rst bins with size at most 1?. At this time step, we have at least 00 items that are in conict with v i (one item for each of these bins). Since v i has at most d adjacent vertices with smaller index, there are at least 00? d conict jobs with larger index. These 00? d items have sizes, since the other small items with larger index have not bben considered before. In total, we get ji 0j(00? d) large conict jobs in the rst 00 bins. Since each large item v j can be reached only by at most d small items with smaller index, each of these large items is counted at most d times. Therefore, we have at least ji 0j (00?d) d large items in the rst 00 bins. This shows the inequality (b). Combining the lower and upper bound, we get ji 0 j(00? d) d 00 b 1 c: This implies that ji 0 j d ( 00? d) 00 b 1 c: for 00 > d. If 00 d, then we obtain the upper bound ji 0j db 1 c. In this case, we compute a (d + 1) coloring for the items in I 0. Since all items v j I 0 have sizes at most, we can place at least b 1 c of these items into one bin. Using a next t heuristic for each color set, we obtain at most 3d + 1 bins for the items in I 0. In total, we obtain in this case at most + 3d + 1 bins. If 00 d, we have at least? d bins with sizes larger than 1?. The remaining jobs in I 0 can be packed (using a (d + 1) - coloring and NF for each color set) such that at most d + 1 further bins with sizes 1? are generated. Let be the total number of generated bins with sizes > 1?. Then, we have the inequality Since SIZE(I) OP T (I), we have SIZE(I) > (1? ) : < 1 OP T (I): 1? Since 1, we get 1 by 1? 1+. This implies that the total number of bins in this case is bounded + 00 + (d + 1) (1 + )OP T (I) + (3d + 1): 8

.4 The overall algorithm Algorithm A : Input: Instance I consisting of a d-inductive graph G = (V; E) with V = f1; : : :; ng and sizes s 1 ; : : :; s n (0; 1]. Output: A packing of V into unit size bins without conicts. (1) set =, () remove all items of size smaller than obtaining an instance J of the RBP [; n 0 ] with n 0 vertices, (3) apply the algorithm of Karmarkar and Karp [1] and obtain an approximative solution for the bin packing problem without considering the conicts and only for the large items, (4) using the algorithm from section., modify the solution for each bin type such that each bin contains now an independent set of large items, (5) using the algorithm from section.3, pack all small items (removed in step ), and use new bins only if necessary. 3 Analysis The total number of bins generated for set J of large items (with item size ) by the algorithm Karmarkar and Karp is bounded by (1 + )OP T (J) + 1 + 3: Step (4) of our algorithm produces at most m d additional bins where m. The total number of bins after step (5) is max[; (1 + )OP T (I)] + (3d + 1): Since (1 + )OP T (J) + d+1 + 3 and =, we have at most (1 + )OP T (I) + d + 1 + 3d + 4 bins. Since d is a constant, this gives an approximation scheme with bound A (I) (1 + )OP T (I) + O( 1 ): 4 Conclusions In this paper, we have given an asymptotic approximation scheme for the bin packing problem with conicts restricted to d-inductive graphs with constant d. This implies an approximation scheme for trees, grid graphs, planar graphs and graphs with constant treewidth. Our algorithm is a generalization of the algorithm by Karmarkar and Karp [1] for the classical bin packing problem. It would be interesting to nd other graph classes where this method also works. Furthermore, we would like to know whether there is an asymptotic approximation scheme or whether the bin packing problem with conicts is MAXSNP-hard for bipartite or interval graphs. Acknowledgement. I thank Sandy Irani for her helpful comments on d-inductive graphs. 9

References 1. B.S. Baker and E.G. Coman, Mutual exclusion scheduling, Theoretical Computer Science, 16 (1996) 5 { 43.. P. Bjorstad, W.M. Coughran and E. Grosse: Parallel domain decomposition applied to coupled transport equations, in: Domain Decomposition Methods in Scientic and Engineering Computing (eds. D.E. Keys, J. Xu), AMS, Providence, 1995, 369-380. 3. H.L. Bodlaender and K. Jansen, On the complexity of scheduling incompatible jobs with unit-times, Mathematical Foundations of Computer Science, MFCS 93, LNCS 711, 91 { 300. 4. E.G. Coman, Jr., M.R. Garey and D.S. Johnson, Approximation algorithms for bin-packing - an updated survey, Algorithmic Design for Computer System Design, G. Ausiello, M. Lucertini, P. Serani (eds.), Springer Verlag (1984) 49 { 106. 5. W. Fernandez de la Vega and G.S. Lueker, Bin packing can be solved within 1 + in linear time, Combinatorica, 1 (1981) 349 { 355. 6. M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NPcompleteness, Freeman, San Francisco, 1979. 7. M.C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, Academic Press, London, 1980. 8. S. Irani, Coloring inductive graphs on-line, Symposium on the Foundations of Computer Science FOCS (1990) and Algorithmica, 11 (1994) 53 { 7. 9. S. Irani and V. Leung, Scheduling with conicts, and applications to trac signal control, Symposium on Discrete Algorithms, SODA 96, 85 { 94. 10. K. Jansen and S. Ohring, Approximation algorithms for time constrained scheduling, Information and Computation, 13 (1997) 85 { 108. 11. D. Kaller, A. Gupta, T. Shermer: The t - coloring problem, Symposium on Theoretical Aspects of Computer Science, STACS 95, LNCS 900, 409 { 40. 1. N. Karmarkar and R.M. Karp, An ecient approximation scheme for the one-dimensional bin packing problem, Symposium on the Foundations of Computer Science, FOCS 8, 31 { 30. 13. Z. Lonc: On complexity of some chain and antichain partition problem, Graph Theoretical Concepts in Computer Science, WG 91, LNCS 570, 97 { 104. 14. C. Lund and M. Yannakakis, On the hardness of approximating minimization problems, 5.th Symposium on the Theory of Computing, STOC 93, 86 { 93. 15. D. de Werra, An introduction to timetabling, European Journal of Operations Research, 19 (1985) 151 { 16. 10