Generalized Dynamic Storage Allocation

Dynamic Storage Allocation is a problem concerned with storing items that each have weight and time restrictions. Approximate algorithms have been constructed through online coloring of interval graphs. We present a generalization that uses online coloring of tolerance graphs. We utilize online-with-representation algorithms on tolerance graphs, which are online algorithms in which the corresponding tolerance representation of a vertex is also presented. We ﬁnd linear bounds for the online-with-representation chromatic number of various classes of tolerance graphs and apply these results to a generalization of Dynamic Storage Allocation, giving us a polynomial time approximation algorithm with linear performance ratio


Introduction
In this paper we study a generalization of Dynamic Storage Allocation (DSA) through the use of tolerance graphs and online coloring with representation.First, we introduce some notation and definitions.We will follow with a review of the standard DSA problem.Additional terms and notation will be defined as needed.
For a graph G, denote its clique number by ω(G), its maximum degree by ∆(G) and its chromatic number by χ(G).Let ∆ + (D) denote the maximum out-degree of a digraph D, and δ + (x) the out-degree of a vertex x ∈ V (D).For a given subgraph H of G, define d H (x) to be the degree x in H. Similarly define δ + H (x). Define an out-star S in a digraph to be a star in which all of the edges point out of the center vertex.
For a weighted graph G * = (V, E, w) with weight function w : V → N, the weight of a set of vertices U is defined to be w(U ) := v∈U w(v) and ω * (G * ) := max{w(U ) : U is a clique}.An interval t-coloring is a function c : V → {1, . . ., t} such that (i) c(v) is an interval of integers contained in {1, . . ., t}, (ii) if v ∼ u then c(v) ∩ c(u) = ∅, and (iii) |c(v)| = w(v).The weighted chromatic number, χ * (G * ), is defined to be the least t such that G * has a interval t-coloring.For a weighted digraph D * = (V, E, w), define the weighted out-degree of a digraph as ∆ + w (D) = {w(v) : v ∈ S, S is maximum out-star}.Note that if w(v) = 1 for all v ∈ V (D), then ∆ + w (D) = ∆ + (D) + 1.

Dynamic Storage Allocation
The Dynamic Storage Allocation (DSA) problem is defined as follows: Given a maximum storage size D and a set A of items such that each item a ∈ A has integral size s(a) and storage interval I a = [L(a), R(a)], is it possible to store A in linear space D, i.e., does there exists a function f : A → {1, . . ., D} so that f

Interval graphs and First-Fit coloring
For an interval An online graph G ≺ is a graph G together with an ordering ≺ of its vertices.Let G ≺ i denote the online graph induced by the first i vertices of ≺.An online coloring algorithm is an algorithm A that colors the vertices of G so that the color of the ith vertex v i depends only on G ≺ i .The number of colors used by A on G ≺ is denoted by χ A (G ≺ ) and χ A (G) is the maximum of χ A (G ≺ ) over all possible orderings ≺.First-Fit (F F ) is the online algorithm that colors the i-th vertex v i of an online graph G ≺ with the least positive integer that has not been used to color any of its neighbors in G ≺ .
There has been extensive research on the online coloring of interval graphs.Kierstead and Trotter [13] showed that there exists an online algorithm A such that χ A (G ≺ ) ≤ 3ω(G) − 2 for any online interval graph G ≺ and that no on-line algorithm can do better on the class of all interval graphs.Kierstead proved that every online interval graph G ≺ satisfies χ F F (G ≺ ) ≤ 40ω(G).This upper bound was improved to 26ω(G) in [10], before Pemmaraju, Raman and Varadarajan [15] introduced a beautiful new technique to improve the bound to 10ω(G).Brightwell, Kierstead and Trotter [3], and later more elegantly, Narayanaswamy and Subhash Babu [14], used easy modifications of this technique to get 8ω(G).Chrobak and Slusarek [4] proved that there exists interval graphs where χ F F (G) ≥ 4.4ω(G) − b for some constant b.Kierstead, Smith and Trotter [12] [16] have recently improved this to 5ω(G) − b.

Generalized DSA and Tolerance Graphs
Here we propose a tolerance version of DSA -Dynamic Storage Allocation with Tolerance Ratio p (p-DSA).Perhaps some overlap is acceptable in the storage intervals of some items, such as through the utilization of temporary storage.Thus each item a ∈ A also has a tolerance t a with ta Ia ≤ p.Our new goal is to find a function f : A → {1, . . ., D} such that f (a) + s(a) − 1 ≤ D for every a ∈ A, and if for all a, b ∈ A. This generalization replaces interval graphs with tolerance graphs.
Tolerance graphs were introduced by Golumbic and Monma [5] as a natural generalization of interval graphs.A graph G = (V, E) is a tolerance graph if for each vertex x ∈ V there exists a closed interval x ∈ V , and we may define r x = R(x) − t x and l x = L(x) + t x .Golumbic and Monma [5] proved that bounded tolerance graphs are cocomparability graphs and Golumbic, Monma and Trotter [6] proved that all tolerance graphs are perfect.For further results on tolerance graphs the reader is referred to the excellent book by Golumbic and Trenk [7].
The following classification of tolerance graphs was recently introduced by the authors [11]: define G to be a p-tolerance graph if it has a tolerance representation I, t such that t x / I x ≤ p for all x ∈ V .Then interval graphs are 0-tolerance graphs.Normally, 1-tolerance graphs are called bounded tolerance graphs and 1 2 -tolerance graphs have been referred to as totally bounded tolerance graphs.If one views tolerance graphs as imprecise interval graphs, then p measures the degree of imprecision of p-tolerance graphs.In addition, a special type of totally bounded tolerance graph, called a 50%-tolerance graph satisfies t x = 1 2 I x , and will be referenced below.The authors have recently generalized the linear bound on First-Fit coloring of interval graphs (0tolerance graphs) to obtain an upper bound on p-tolerance graphs.This result will be of use later and is stated below.
Theorem 1 [11] Our results on First-Fit coloring of p-tolerance graphs imply a polynomial time approximation algorithm with constant performance ratio for p-DSA.We will improve on this bound by making use of the tolerance representation of a graph for certain types of tolerance graphs.Note that when considering the online chromatic number we do not use any property of the representation, but the input for DSA includes the representation.Below we discuss how to make use of this representation.

Online-with-representation Chromatic Number
In the application to p-DSA, we will make use of a digraph formed from a tolerance representation and define an algorithm that performs well on the digraph.Although this is an online algorithm on a digraph, the results on the graph are not the same as the online chromatic number of a tolerance graph as it requires the use of a tolerance representation.Because of this extra information needed, we will call this the onlinewith-representation chromatic number and denote it χ owr .More formally, the online-with-representation chromatic number is the is the minimum χ A (G) over all online algorithms A in which the corresponding tolerance representation of a graph is also presented.
Define a digraph D = (V, A) by orienting the edges of a bounded tolerance graph G = (V, E) as x → y if r x or l x ∈ I y .Then it is not difficult to show that a digraph formed from a totally bounded tolerance graph satisfies the following condition: We show how the clique size in G relates to the maximum out-degree in D, as well as define an online algorithm for the digraph.A 50%-tolerance graph satisfies t x = 1 2 I x , and so r x = l x .Here we define c x = r x .The following result was stated in [1] and we find a similar result for totally bounded tolerance graphs.
Proposition 2 Let G = (V, E) be a 50%-tolerance graph with representation I, t .For any two vertices x, y ∈ V , x ∼ y if and only if c x ∈ I y or c y ∈ I x .Proposition 3 Two vertices x and y in a totally bounded tolerance graph are adjacent if and only if at least one of the following hold: (i) r x ∈ I y , (ii) l x ∈ I y , (iii) r y ∈ I x , or (iv) l y ∈ I x .
Proof: Without loss of generality assume L(x) < L(y).Suppose at least one of the above hold.First suppose R(x) < l y .Then r y , l y / ∈ I x .If l x ∈ I y then r x ∈ I y also; otherwise, since one of the above hold, r x ∈ I y .Regardless, Either of the cases above gives x ∼ y.
Conversely, suppose none of the above hold.Then l x < L(y), R(x) < l y and r x < L(y).Thus and without loss of generality c y ≤ c z .Since x → z we know c x ∈ I z and so [c x , c z ] ⊆ I z .Thus c y ∈ I z and so y ∼ z.Hence Q + R (x) forms a clique.A similar argument holds for Proposition 5 If D is a digraph formed as above from a totally bounded tolerance graph Then r x ≤ r y , r z .Without loss of generality we may assume r y ≤ r z .Thus r y ∈ [r x , r z ] ⊆ I z and so y ∼ z.Hence A forms a clique in G.A similar argument holds for the set of vertices containing r x with r y < r x , as well as when we replace r x and r y with l x and l y , respectively.2 Now consider the following algorithm A k .This is a digraph version of the algorithm from [13].We bound the performance of this algorithm and use it to give an upper bound on the online-withrepresentation chromatic number for 50% and totally bounded tolerance graphs.

Generalized Dynamic Storage Allocation
Chrobak and Ślusarek [4] used the following approach on a given interval graph G to obtain a polynomial time approximation algorithm for DSA.First, obtain a new graph G * by giving every vertex a weight that is a power of 2. Since the weight of a vertex will increase by at most a factor of 2, w * (G * ) ≤ 2w * (G).Second, obtain an online graph G * ≺ by ordering the vertices by decreasing weight.Next, form the associated unweighted online interval graph H ≺ from G * ≺ by replacing every vertex x ∈ V (G * ≺ ) by w(x) clones that appear consecutively in the order ≺.Each of these clones x 1 , . . ., x w(x) will be represented by the same interval as x in the interval representation of G. Hence clones will have the same set of neighbors as well as being adjacent to each other.We will refer to x as the parent of each of its clones.
At this point, we can use the First-Fit algorithm to color the interval graph H.It can be shown that, since the weights are all powers of two and we are using the First-Fit algorithm, the vertices x 1 , . . ., x w(x) will be assigned consecutive colors as they appear consecutively in the order ≺.We can then obtain an interval coloring of G * by coloring a vertex x with the set of colors assigned to x 1 , . . ., x w(x) in H. Using this approach we get an interval t-coloring of G * , and hence a t-coloring of G, where t ≤ χ F F (G * ) ≤ 2χ F F (G).
Kierstead [8] showed this technique gives a performance ratio of 80 by proving that χ F F (G) ≤ 40ω(G) for all interval graphs G. Later in [9] Kierstead replaced First-Fit by using a modification of the algorithm from [13] to improve the performance ratio to 6. Finally, Buchsbaum, Karloff, Kenyon, Reingold and Thorup [2] obtained a performance ratio of 2 + ε.
We will use this same approach as in [9], where the vertices x 1 , . . ., x w(x) in H are given consecutive colors, even though they are not being colored using First-Fit, and so a proper weighted coloring of G * can be obtained.This converts the p-DSA problem into a question of online coloring p-tolerance graphs.The result from Theorem 1 on the First-Fit chromatic number on p-tolerance graphs gives us a linear performance ratio.
Theorem 9 There exists a polynomial time approximation algorithm for p-DSA with performance ratio 16 1  1−p .To improve this bound, we make use of an adjustment to algorithm A k above.As with the onlinewith-representation chromatic number, we will make use of an online digraph that is related to a specific representation of a tolerance graph.Consider an online digraph D ≺ with v 1 ≺ v 2 ≺ • • • ≺ v n that satisfies ( * ).We present the algorithm Weighted Digraph Coloring (WDC) below, which contains a subroutine W m , and show it is a polynomial time approximation algorithm for p-DSA for the class of digraphs that satisfy ( * ).The algorithm begins by converting the weights into powers of 2 and then adjusting the weighted digraph into an unweighted digraph by making use of clones.Note that in a digraph not only are the clones (v and v ) adjacent but we also have v → v and v → v .

Weighted Digraph Coloring (WDC):
(1) Input a weighted digraph D = (V, A, w) satisfying ( * ); (2) Increase the weight w of each vertex v to a power of 2 by setting w (v) = 2 log 2 w to form a weighted digraph D * = (V, A, w ); (5) For i = 1 to n set d(v i ) to be the set of colors assigned to the clones of v i by W m .
The subroutine W m allows us to color a weighted graph based on an unweighted digraph formed from D * .We will define a(v i ) and b(v i ) and use these values to assign colors to v i .Given some α and v i , we will denote relies only on a(v j ) where j < i and not on the value a(v i ).
Subroutine W m : (1) Input a weighted digraph D * = (V, A, w ) satisfying ( * ), where the weights are all powers of 2, the vertices are ordered by decreasing weight, and m = max{w (v) : v ∈ V }; (2) Calculate ∆ + w = ∆ + w (D * ); (3) Let L = {v i : w (v i ) > 1} and form D * * = (L, A L , w ), where A L is the set of edges from D * restricted to L and w (v) = 1 2 w (v).If L = ∅ then go to step (6); (4) Apply W m−1 to D * * ; (5) For each v i in L split v i into two clones v i and v i to obtain D , and For all v i with w (ii) b(v i ) is the least nonnegative integer β such that for all v j with j < i and When the subroutine W m ends, we obtain colors c(v i,j ) = a(v i,j ) + b(v i,j )∆ + w for each clone v i,j of v i .The final step of WDC sets d(v i ) = {c(v i,j ) : v i,j is a clone of v i }.To ensure that this algorithm and subroutine give a proper coloring of a weighted digraph, we must prove that d(v i ) is a set of consecutive colors and if Theorem 10 For any weighted digraph D = (V, A, w) satisfying ( * ), the algorithm WDC constructs an interval t-coloring d of D with t ≤ 6∆ + w (D) − 2.
Proof: Applying the algorithm we get To prove that WDC gives a proper interval coloring of D * , we prove the following invariants: The assignment of a(v i,j ) and b(v i,j ) satisfy the following conditions: Note that by the way in which the values are defined, we know that a(v i,1 ), . . ., a(v i,w (vi) ) are consecutive values and b(v i,j ) = b(v i,1 ) for all j.
Claim 11 Invariant I(i) holds for all v i,j .
Proof: Argue by induction on m.The base step m = 1 follows from step (6) of the subroutine W m .So suppose it holds for all m < m.Let w (v i ) = m.Then w (v i ) = m 2 in D * * and so from W m−1 we get clones {v i,1 , . . ., v i,k } of v i , where k = m 2 .Moreover, condition (i) holds for all v i,j by the induction hypothesis.So consider some clone v i,j of v i where a(v i,j ) = α and b(v i,j ) = β.Then W m creates clones v i,j and v i,j with a(v i,j ) = 2α, a(v i,j ) = 2α + 1 and b(v i,j ) = b(v i,j ) = β.(ic) Note that since clones of the same vertex receive consecutive a-values, it suffices to consider b(v i,j ) and b(v i,j ) with respect to clones of a different vertex v r .So suppose there exists some v r with r < i and v r ∼ v i such that some clone v r,s satisfies c(v r,s ) = a(v i,j ) + b(v i,j )∆ + w .Then a(v r,s ) = a(v i,j ) and the parent x of v r,s would satisfy c(x) = a(v i,j ) + b(v i,j )∆ + w , a contradiction.A similar argument holds for v i,j .Thus (ic) holds. 2 Claim 12 Invariant I(ii) holds.
Proof: Suppose v i,j ∼ v s,t .If s = i then these vertices are clones of the same vertex v i .Hence a(v i,j ) = a(v s,t ) and so c(v i,j ) = c(v s,t ).Otherwise, by Claim 11 we know that if s < t then c(v Claim 13 Invariant I(iii) holds.
Proof: If v i,j is in an out-star of size one, then a(v i,j ) = w(v i,j ) ≥ 1. Suppose for a contradiction that a(v i,j ) = ∆ + w .Then there exists an out-star S in D ∆ + w −1 [v i,j ] such that v i,j ∈ S and |S| ≥ ∆ + w + 1.But these vertices have total weight at most ∆ + w , which contradicts that w(v) ≥ 1 for all vertices v. Thus 0 < a(v i,j ) < ∆ + w .As b(v i,j ) = b(v i,1 ), it suffices to show that b(v i,1 ) ≤ 2 for all i.Suppose there exists v m such that b(v m,1 ) ≥ 3. Then by ( * ) there exists v So suppose v k,1 is not the center vertex of S. Suppose x is the center vertex of S. Then either x → v i or x → v j .Without loss of generality, suppose x → v j .If j < k, then S ∪ {v j } is an out-star of size α + 2 contained in D α [v k,1 ], a contradiction.Otherwise k < j and so S ∪ {v k } is an out-star of size α + 2 contained in D α [v j,1 ], a contradiction.Hence b(v i,1 ) ≤ 2 for all i.

Conclusion
Note that the result above gives better bounds than those from Theorem 9 as totally bounded tolerance graphs are 1 2 -tolerance graphs and we have moved from 32ω * (G) to 24ω * (G) − 20.Moreover, we get improved bounds for 50%-tolerance graphs.Also, for finding the online chromatic number of a tolerance graph, we do not wish to use any property of the tolerance representation.However, when applying this to p-DSA, we are given the tolerance representation as the input and so we are allowed to use the online-with-representation results to obtain a linear performance ratio.
We have found a polynomial time approximation algorithm for a generalization of DSA with linear performance ratio.Can we improve this ratio?Also, can we extend this to larger classes of graphs?
(a)+s(a)−1 ≤ D for every a ∈ A, and if I(a)∩I(b) = ∅ then either f (a)+s(a) ≤ f (b) or f (b) + s(b) ≤ f (a) for all a, b ∈ A? It is known that DSA is NP-complete.Chrobak and Ślusarek [4] introduced a polynomial time approximation algorithm for DSA based on First-Fit coloring of interval graphs.

Theorem 6 2 Corollary 7 χ
iv) Otherwise put v i into T .Color v i with First-Fit with respect to D[T ], using disjoint sets of colors for D[B] and D[T ].Let D = (V, A) be a digraph with ∆ + (D) = k.If D satisfies ( * ) then A k uses at most 3k +1 colors.Proof: Argue by induction on k.The result is trivial for k ≤ 0. Assume k ≥ 1.By the induction hypothesis A k uses at most 3(k − 1) + 1 colors on D[B] and so it suffices to show that First-Fit uses at most 3 colors on D[T ].Suppose there exists some vertex v ∈ T with d D[T ] (v) ≥ 3. Then there exist x, y, z ∈ N [v] such that y ∈ N + (x) and N − (x) ⊆ N − (y) ∪ N − (z).If x / ∈ B since δ + D[B∪{x}] (x) = k, then since x → y we have δ + D (x) > k.This contradicts the maximum out-degree of D. Hence there must exist some u ∈ B such that δ + D[B∪{x}] (u) = k.Then either u → y or u → z.In either case we get δ + D (u) > k, a contradiction.Therefore no vertex in T has degree 3. Since ∆(D[T ]) ≤ 2, First-Fit uses at most 3 colors on D[T ], and so A k uses at most 3k + 1 colors on D. owr (G) ≤ 6ω(G) − 5 for any 50%-tolerance graph G. Corollary 8 χ owr (G) ≤ 12ω(G) − 11 for any totally bounded tolerance graph G.
an ordering of V (D * ) by decreasing weight; (4) Calculate m = max{w (v) : v ∈ V } and apply the subroutine W m to D * ; (a) If a(v) = α then any out-star S contained in D α [v] with v ∈ S satisfies |S| ≤ α + 1, (b) If a(v) = α then there exists an out-star S in D α−1 [v] such that v ∈ S and |S| ≥ α + 1, and (c) If b(v i ) = β then β is the least nonnegative integer such that for all v j with j < i and v (ia) Consider an out-star S in D 2α [v i,j ] and suppose |S | > 2α + 1.Then there exists a corresponding out-star S in D * * α [v i,j ] with |S| > α + 1, a contradiction.Similarly, if there exists an out-star S in D 2α+1 [v i,j ] with |S | > 2α + 1, then there exists a corresponding out-star S in D α [v i,j ] with |S| > α + 1, a contradiction.Thus (ia) holds.(ib)Now since a(v i,j ) = α, there exists an out-star S in D α−1 [v i,j ] where v i,j ∈ S and |S| ≥ α + 1.Then when the vertices are split into 2 clones, we obtain a corresponding out-star S where, for all x ∈ S − {v i,j }, a(x ) ≤ 2α − 2 and a(x ) ≤ 2α − 1. Hence S is an out-star of size at least 2α + 1 in D 2α−1 [v i,j ].Moreover, S ∪ {v i,j } is an out-star of size at least 2α + 2 in D 2α [v i,j ].Thus (ib) holds.

2 2 Corollary 14
Thus WDC will use at most (∆ + w − 1) + 2∆ + w = 3∆ + w − 1 colors on D * .Since we increased the weight of each vertex in D to a power of 2, WDC uses at most 6∆ + w − 2 colors on D. WDC uses at most (i) 12ω * (G) − 8 colors on any weighted 50%-tolerance graph.(ii)24ω * (G) − 20 colors on any weighted totally bounded tolerance graph.Proof: Suppose G = (V, E, w) is a weighted 50%-tolerance graph.Form a digraph D = (V, A, w) as above, that is orient an edge xy ∈ E(G) as x → y if c x ∈ I y .Then by Proposition 4 we know that if∆ + (D) = k then 2ω(G) − 2 ≥ k.Thus if ∆ + w (D) = k then 2ω * (G) − 1 ≥ k.Hence WDC uses at most 12ω * (G) − 8 colors on G.Similarly for a weighted totally bounded tolerance graph G = (V, E, w), form a digraph D = (V, A, w) as above by orienting an edge xy ∈ E(G) as x → y if r x or l x ∈ I y .Then by Proposition 5 we know thatif ∆ + (D) = k then 4ω(G) − 4 ≥ k.Thus if ∆ + w (D) = k then 4ω * (G) − 3 ≥ k.Hence WDC uses at most 24ω * (G) − 20 colors on G.2 and a nonnegative real t x such that xy ∈ E if and only if I x ∩ I y = ∅ and I x ∩ I y ≥ min{t x , t y }.In this case I, t is called a tolerance representation of G, where t maps x → t x .Moreover, a bounded tolerance graph is a tolerance graph where t x ≤ I x for every vertex t y , and so x y.2Proposition 4 If D is a digraph formed as above from a 50%-tolerance graph G with ∆ +