Tight Bounds for Online Coloring of Basic Graph Classes
Susanne Albers, Sebastian Schraink

TL;DR
This paper establishes tight lower bounds on online graph coloring algorithms for various fundamental graph classes, demonstrating that the optimal competitive ratio is logarithmic in the number of vertices, and showing the effectiveness of the First Fit algorithm.
Contribution
It provides the first tight bounds for online coloring of multiple graph classes, including randomized algorithms, and shows First Fit's near-optimality in these settings.
Findings
Optimal competitive ratio is Θ(log n) for various graph classes.
First Fit algorithm achieves near-optimal performance in these classes.
Bounds hold even with lookahead or reordering buffers.
Abstract
We resolve a number of long-standing open problems in online graph coloring. More specifically, we develop tight lower bounds on the performance of online algorithms for fundamental graph classes. An important contribution is that our bounds also hold for randomized online algorithms, for which hardly any results were known. Technically, we construct lower bounds for chordal graphs. The constructions then allow us to derive results on the performance of randomized online algorithms for the following further graph classes: trees, planar, bipartite, inductive, bounded-treewidth and disk graphs. It shows that the best competitive ratio of both deterministic and randomized online algorithms is , where is the number of vertices of a graph. Furthermore, we prove that this guarantee cannot be improved if an online algorithm has a lookahead of size or access to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Tight Bounds for Online Coloring of Basic Graph Classes††thanks: Work supported by the European Research Council, Grant Agreement No. 691672, project APEG.
Susanne Albers Department of Computer Science, Technical University of Munich, Garching, Germany. [email protected].
Sebastian Schraink Department of Computer Science, Technical University of Munich, Garching, Germany. [email protected].
Abstract
We resolve a number of long-standing open problems in online graph coloring. More specifically, we develop tight lower bounds on the performance of online algorithms for fundamental graph classes. An important contribution is that our bounds also hold for randomized online algorithms, for which hardly any results were known. Technically, we construct lower bounds for chordal graphs. The constructions then allow us to derive results on the performance of randomized online algorithms for the following further graph classes: trees, planar, bipartite, inductive, bounded-treewidth and disk graphs. It shows that the best competitive ratio of both deterministic and randomized online algorithms is , where is the number of vertices of a graph. Furthermore, we prove that this guarantee cannot be improved if an online algorithm has a lookahead of size or access to a reordering buffer of size , for any . A consequence of our results is that, for all of the above mentioned graph classes except bipartite graphs, the natural First Fit coloring algorithm achieves an optimal performance, up to constant factors, among deterministic and randomized online algorithms.
1 Introduction
Online graph coloring is a classical problem in graph theory and online computation. It has applications in job scheduling, dynamic storage allocation and resource management in wireless networks [19, 23, 24]. A problem instance is defined by an undirected graph , consisting of a vertex set and an edge set . Let . The vertices arrive one by one in a sequence that may be determined by an adversary. Whenever a new vertex arrives, , its edges to previous vertices with are revealed. An online algorithm has to immediately assign a feasible color to , i.e. a color that is different from those assigned to the neighbors of presented so far. The goal is to minimize the total number of colors used.
For a graph , let be the number of colors used by . Let be the chromatic number of , which is the minimum number of colors needed to color offline. An online algorithm is -competitive if holds for every graph [25]. If is a randomized algorithm, then is the expected number of colors used by . The algorithm is -competitive against oblivious adversaries if holds for every [5]. An oblivious adversary, when determining , does not know the outcome of the random choices made by . We always evaluate randomized online algorithms against this type of adversary. When considering specific graph classes, for a deterministic or randomized algorithm, the competitive factor of must hold for every graph from the given class.
The framework defined above is the standard online one. It is also interesting to explore settings where an algorithm is given more power. An online algorithm has lookahead if, upon the arrival of vertex , the algorithm also sees the next vertices along with their adjacencies to vertices in . Alternatively, an algorithm might have a buffer of size in which vertices can be stored temporarily. The requirement is that at the end of step the algorithm must have colored at least vertices. A buffer is more powerful than lookahead because it allows the algorithm to partially reorder the input sequence and delay coloring decisions. The value of a buffer has recently been explored for a variety of online problems, see e.g. [1, 11] and references therein.
Previous work: For general graphs, the competitive ratios are high compared to the trivial upper bound of . Lovasz, Saks and Trotter [22] developed a deterministic online algorithm that achieves a competitive factor of . Vishwanathan [26] devised a randomized algorithm that attains a competitiveness of . This bound was improved to by Halldorsson [16]. Halldorsson and Szegedy [17] proved that the competitive ratio of any deterministic online algorithm is . This lower bound also holds for randomized algorithms. Moreover, it holds if a randomized algorithm has a lookahead or a buffer of size [17].
There has also been considerable research interest in online coloring for various graph classes. An early and celebrated result proved by Bean [4] in 1976 is that, for trees, every deterministic online algorithm can be forced to use colors. The First Fit algorithm colors every tree with colors [15]. The natural strategy First Fit assigns the lowest-numbered feasible color to each incoming vertex. Since trees have a chromatic number of 2, the best competitive ratio achievable by deterministic online algorithms is . For bipartite graphs, there also exists a deterministic online algorithm that uses colors [22], implying that the best competitiveness of deterministic strategies is again . However, First Fit performs poorly, as there are bipartite graphs for which it requires colors. Kierstead and Trotter [20] proved that, for interval graphs, the best competitive ratio of deterministic online algorithms is equal to 3.
A paper directly related to our work is by Irani [18]. She examined -inductive graphs, also referred to as -degenerate graphs. They are defined as the graphs which admit a numbering of the vertices such that each vertex is adjacent to at most higher-numbered vertices. Every planar graph is -inductive and every chordal graph is ()-inductive. Irani [18] proved that First Fit colors every -inductive graph with colors. Furthermore, for every deterministic online algorithm , there exist graphs such that uses colors [18]. Since -inductive graphs have a chromatic number of at most , the best competitive ratio achieved by deterministic online algorithms is . For planar graphs a tight bound of holds because trees are planar. However, it was an open problem if a tight competitiveness of holds for general chordal graphs. In fact, Irani [18] raised the question if, for every deterministic online algorithm and every , there exists a chordal graph with chromatic number such that uses colors. Finally, for -inductive graphs, Irani [18] analyzed deterministic online algorithms with lookahead and showed that the best competitiveness is . A lower bound of on the competitive ratio of randomized online algorithms for -inductive graphs was given by Leonardi and Vitaletti [21].
We address two further graph classes. Downey and McCartin [10] studied online coloring of bounded treewidth graphs. For an introduction to treewidth see [7]. For any graph of treewidth , First Fit uses colors. This is a consequence of Irani’s work [18] because a graph of treewidth is -inductive [10, 18]. Downey and McCartin [10] showed that, on graphs of treewidth , First Fit can be forced to use colors. Last but not least, a disk graph is the intersection graph of a set of disks in the Euclidean plane. Each vertex represents a disk; two vertices are adjacent if the two corresponding disks intersect. Online coloring of disk graphs has received quite some attention because it models frequency assignment problems in wireless communication networks, see [13] for a survey. The best competitiveness achieved by a deterministic online algorithm is , where is the ratio of the largest to smallest disk radius [9, 12]. The result relies on the common assumption that an online algorithm does not use the disk representation, when making coloring decisions [9, 12, 13]. It has been repeatedly raised as an open problem if the bound of can be improved using randomization [9, 12, 13].
Recent work on online graph coloring has studied scenarios where an online algorithm can query oracle information about future input [8, 6]. Moreover, online coloring of hypergraphs has been explored [2, 3].
Our Contribution: In this paper we settle the performance of online coloring algorithms for fundamental and widely studied graph classes. More precisely, we prove lower bounds on the performance of online algorithms. These bounds match the best upper bounds known in the literature. An important contribution is that our bounds also hold for randomized online algorithms, for which very few results were known.
First, in Sections 2 and 3 we investigate chordal graphs. They have been studied extensively, cf. textbook [27]. We remind the reader that a graph is chordal if every induced cycle with four or more vertices has a chord. For a chordal graph , the chromatic number is equal to the largest clique size . Interval graphs are a subfamily of chordal graphs. Chordal graphs in turn are perfect graphs, for which the offline coloring, maximum clique and independent set problems can be solved in polynomial time.
In Section 2 we examine deterministic online coloring algorithms. We prove that, for every deterministic algorithm and every integer , there exists a family of chordal graphs with such that uses colors. This resolves the open problem raised by Irani [18]. In Section 3 we extend this result to randomized online algorithms. The statement is identical to the one for deterministic algorithms, except that a randomized online algorithm uses an expected number of colors. Although the result for randomized algorithms is more general, we give proofs for both deterministic and randomized policies. Our lower bound construction for deterministic algorithms exhibits an adversarial strategy for generating worst-case graphs. Given this strategy, we show how to define a probability distribution on graphs so that Yao’s principle [28] can be applied. First Fit colors every chordal graph with using colors. Hence, the optimal competitiveness of deterministic and randomized online algorithms is .
In Section 4 we derive lower bounds for further graph classes, focusing on randomized online algorithms. For , our lower bound construction for chordal graphs generates trees. It follows that, for any randomized online algorithm , there exists a family of trees such that needs an expected number of colors. This complements the fundamental and early result by Bean [4] for deterministic algorithms. To the best of our knowledge, no lower bound on the performance of randomized online coloring algorithms for trees was previously known. Recall that trees have a chromatic number of 2. Vishwanathan [26] gave a lower bound of on the expected number of colors used by randomized online algorithms for graphs of chromatic number 2, i.e. bipartite graphs. However, the graphs in his construction have cycles. Thus, Vishwanathan’s lower bound does not apply to trees. Obviously, trees are planar and bipartite. Hence, our result for trees directly implies that every randomized online algorithm can be forced to use colors in expectation for graphs of these two classes. The lower bounds are tight because known deterministic online algorithms color trees, planar and bipartite graphs with colors [15, 18, 22].
Section 4 also addresses inductive and bounded-treewidth graphs. Since every chordal graph is -inductive and has treewidth , we derive the following results. For every randomized online algorithm and every , there exists a family of -inductive graphs such that uses colors. The same statement holds for graphs of treewidth . We further show that the statement also holds for strongly chordal graphs with chromatic number . A chordal graph is strongly chordal if every cycle of even length consisting of at least six vertices has an odd chord, i.e. an edge connecting two vertices that have an odd distance from each other in the cycle [14]. First Fit colors any -inductive graph and any graph of treewidth using colors. We conclude that, for all the graph classes considered so far, is the best competitiveness of deterministic and randomized online algorithms. Finally, in Section 4 we study disk graphs. We prove that, for , every graph of the probability distribution defined in Section 3 translates to a disk graph. We then show that, for every randomized online algorithm that does not use the disk representation, there exists a family of disk graphs forcing to use an expected number of colors, where is again the ratio of the largest to smallest disk radius. Hence randomization does not improve the asymptotic performance of online coloring algorithms for disk graphs, cf. [9, 12, 13].
In Section 5 we explore the settings where an online algorithm has lookahead or is equipped with a reordering buffer. We show that a lookahead of size does not improve the asymptotic performance of randomized online algorithms. We prove the result for chordal graphs and then derive analogous results for all the other graph classes. Irani [18] gave a similar result for deterministic algorithms, considering inductive graphs. As a final result of this paper we demonstrate that a reordering buffer of size , for any , does not yield an improvement in the asymptotic performance guarantees of deterministic online algorithms. Again, we develop the result for chordal graphs and derive corollaries for the other graph classes.
Our Proof Technique: We devise a technique for proving lower bounds that is relatively simple; we view this as a strength of our results. The main idea is to recursively construct trees of cliques, which in turn form forests. In a recursive step the construction combines forests by adding or not adding a new clique in a specific way. Our construction resembles the one by Bean [4] but differs in an important aspect that allows us to obtain lower bounds for randomized algorithms. The construction by Bean builds a tree , , by joining trees , for , so that any deterministic online algorithm must use a -th new color for some vertex of . This vertex then becomes the root of . An oblivious adversary, playing against a randomized online algorithm, cannot identify with sufficiently high probability such vertices exhibiting a new color. Instead, our construction maintains the invariant that the root vertices of each forest use a large number of colors, given any deterministic online algorithm. For randomized algorithms, a corresponding invariant holds with probability of at least .
Convention: Unless otherwise stated, logarithms are base 2.
2 Deterministic online algorithms for chordal graphs
We establish a lower bound on the performance of any deterministic online coloring algorithm.
Theorem 1**.**
Let with be arbitrary. For every deterministic online algorithm and every with , there exists a -vertex chordal graph with chromatic number such that uses colors to color .
The proof of Theorem 1 relies on Lemma 1, which we prove first.
Lemma 1**.**
Let with be arbitrary. For every deterministic online algorithm and every , there exists a chordal graph having chromatic number and consisting of vertices such that is forced to use at least colors to color .
Proof.
We describe how an adversary constructs a chordal graph , . Such a graph is built up recursively and consists of graphs , where . We assume that is even. The construction of can be adapted easily if is odd; details will be given later. On a high level is a forest, i.e. a collection of disjoint trees, each having a distinguished root node. In every tree of , each tree node represents a clique of size in . If two tree nodes and are connected by a tree edge in , then any two vertices and are connected by an edge in . Hence and form a clique of size in . Since is a forest, it consists of several connected components. One can add a final vertex and edges in order to connect the various trees; details will be given at the end of the proof.
We proceed with the concrete construction of , for increasing values of . As mentioned above, each tree of has a distinguished root node consisting of vertices in . Let be the set of these vertices. Moreover, let be the union of these sets , taken over all of . We refer to the elements of as the root vertices of . They are important because the online algorithm will be forced to use a large number of colors for . For any subset of the vertices of , let be the set of colors used by to color .
The strategy of the adversary to generate a graph is adaptive, i.e. the exact structure of the graph depends on the coloring decisions of . Nevertheless, during the bottom-up construction of , for increasing , the following invariants will be maintained.
- (1)
Algorithm uses at least colors for the root vertices of , i.e. . 2. (2)
is a union of connected components, each of which can be represented by a tree . Each tree node is a clique of size . Every tree has a distinguished root node containing a set of root vertices in . 3. (3)
is chordal. 4. (4)
The maximum clique size is . 5. (5)
The number of vertices satisfies .
Invariants (3) and (4) together imply that holds. In invariant (1) and the following technical exposition integer values are compared to expressions of the form , which might not be integer. We remark that the statements, comparisons and calculations hold without considering the rounded expressions.
Construction of the base graph : is a clique of size . The adversary may present the corresponding vertices in an arbitrary order. The set of root vertices is an arbitrary subset of size of the vertices of . The remaining vertices form a second tree node. The resulting tree is depicted in Figure 2. We can easily verify properties (1–5).
(1) Since is a clique of size , uses colors for it, i.e. .
(2) consists of one connected component which represents a tree, as described above and shown in Figure 2.
(3) is a clique and thus chordal.
(4) The maximum clique size is exactly .
(5) There holds .
Construction of the graph , : Assume that the adversary can generate graphs , for any , satisfying invariants (1–5). The construction of proceeds as follows. First the adversary recursively generates two independent graphs of type , i.e. it twice executes the strategy for generating a graph . Let and be these two graphs. They are created one after the other. We remark that and need not be identical because ’s coloring decision in one graph can affect its decisions in the other one.
In the following we focus on the root vertices of and . In particular, we consider the colors used by . Invariant (1) implies that and . We distinguish two cases depending on the total number of colors used, i.e. the cardinality of . To this end we introduce some notation. Assume that consists of connected components, which we number in an arbitrary way. Each component/tree has a distinguished root containing a set of root vertices. We abbreviate , . Similarly, assume that consists of connected components. Set is the set of root vertices in the component . Let , . There holds and . Figure 2 shows the general structure of and by focusing on the roots. The left-hand side of the figure depicts as a union of connected components rooted at , respectively. The right-hand side shows as a collection of components rooted at .
Case 1: Assume that . In this case the adversary defines as the union of and . No further vertices or edges are added. It is easy to verify the five invariants because and satisfy them by inductive assumption.
(1) The condition of Case 1 ensures .
(2) The invariant is satisfied since is the union of and .
(3) is chordal because and are, and no further vertices or edges have been added.
(4) There holds , as .
(5) Let and be the number of vertices in and , respectively. There holds . The first inequality follows because (5) holds for and .
Case 2: Next assume that . In this case the adversary adds a set of vertices that form a clique. Moreover, for every vertex of there is an edge to every vertex in , for . In other words, every vertex of has edges to all root vertices of . The vertices of together with their adjacent edges may be presented by the adversary in an arbitrary order. The resulting structure is depicted in Figure 3. Set and the connected components of rooted at form a single component rooted at . There is a tree edge between and every , . The newly created component forms a tree rooted at because the components of represent trees rooted at . Graph is the union of the new component and the components of . The set of root vertices of consists of and the root vertices of . Formally, . It remains to verify the five invariants.
(1) We analyze the number of colors that uses for the root vertices in . In a first step, among the colors for the roots of and , we upper bound the number of colors occurring in only. By assumption . There holds . We obtain . Next consider the vertices in . We upper bound the number of colors from that can use for . Observe that is the disjoint union of and . Every vertex of is adjacent to every vertex in . Hence, cannot apply a color occurring in to a vertex in . Only a color of is feasible, and the latter set has cardinality . Since is a clique of size algorithm must use at least colors not contained in to color the vertices of . As , we conclude .
(2) By construction is a collection of connected components, forming trees rooted at and , respectively.
(3) In consider a simple cycle with at least four vertices and assume that at least one vertex is in . If three or more vertices of are in , then there is a chord because is a clique. If contains one or two vertices of , then can visit only one connected component of . Suppose that it visits the one rooted at . Cycle must contain two vertices of . Each of these two vertices has an edge to every vertex of in . Hence has a chord. Since and , and thus the components rooted at and , are chordal, so is .
(4) Set and each , , form a clique of size . The vertices of are not connected to any vertices outside , . Hence no other cliques are formed by the addition of . Since it follows .
(5) Again, let and be the number of vertices in and . We have .
The construction and analysis of is complete.
Graph consists of several connected components if . The adversary can create a connected graph by adding a final vertex that has an edge to exactly one root vertex in each of the components. The resulting graph remains chordal because there is no simple cycle containing . By the addition of the maximum clique size does not change. Including the total number of vertices is upper bounded by because . The lemma follows from invariants (1) and (3–5) because .
We finally address the case that is odd. In this case the adversary executes the graph construction described above for parameter , which is even. In the end when is generated for the desired , the adversary adds a final vertex to each base graph . This vertex has edges to every other vertex of the corresponding . This increases the maximum clique size from to . The new graph remains chordal. The number of colors used by algorithm is at at least . We observe that the number of base graphs in is . Hence, in the extended graph the total number of vertices is upper bounded by . If , the adversary can add a final vertex to link the various components. Again the lemma follows. ∎
Proof of Theorem 1.
Given and , let . There holds because . For every deterministic online algorithm, by Lemma 1, there exists a chordal graph with chromatic number such that uses at least colors. Graph has vertices. By the choice of , we have . To we add vertices, all of which have one edge to an arbitrary vertex of . The resulting -vertex graph remains chordal and . Since , there holds . We have . Inequality is equivalent to . Thus, . As , there holds . Hence, the number of colors used by is at least . ∎
In Theorem 1 the lower bound on can be reduced from to , for any . Then the number of colors used by is .
3 Randomized online algorithms for chordal graphs
We extend the result of Theorem 1 to randomized algorithms against oblivious adversaries.
Theorem 2**.**
Let with be arbitrary. For every randomized online algorithm and every with , there exists a -vertex chordal graph with chromatic number , presented by an oblivious adversary, such that the expected number of colors used by to color is .
In order to prove Theorem 2 we resort to Yao’s principle [28] and show the following Lemma 2.
Lemma 2**.**
Let with be arbitrary. For every , there exists a probability distribution on a set of chordal graphs with the following properties. For every , and the number of vertices is at most . The expected number of colors used by any deterministic online algorithm to color a graph drawn according to the distribution is at least .
Proof.
For every we define a set of chordal graphs , each having a chromatic number of . Moreover, we specify the order in which the vertices of any are presented to a deterministic online algorithm . The distribution on is the uniform one, i.e. each is chosen with the same probability. We assume that is even. The definition of can be adapted easily if is odd; details are given at the end of the proof.
The set is built recursively based on . The construction of graphs is a generalization of the one presented in the proof of Lemma 1. A major difference is that any contains twelve graphs of , which are grouped into six pairs. For each pair a clique of size may or may not be added. As before, every is a union of connected components. Each such component can be represented by a tree with a distinguished root vertex. Every tree vertex is a set of vertices forming a clique in . We reuse the notation of the proof of Lemma 1. Given , for any component/tree of , is the set of vertices in the root of . Set is the union of all , taken over all of . Finally is the set of colors used by for the vertices of .
During the recursive construction of , for increasing , the following invariants are maintained. Compared to the proof of Lemma 1, (1) and (5) differ. Invariant (1) states that, for a randomly chosen , every deterministic online algorithm needs, with probability greater than 1/2, at least colors for the root vertices . Invariant (5) gives an adjusted bound on the size of any .
- (1)
If is chosen uniformly at random from , then for any deterministic online algorithm , . This holds independently of other connected components might have already colored. 2. (2)
Every is a union of connected components, each of which can be represented by a tree . Each tree node is a clique of size . Every tree has a distinguished root containing a set of root vertices in . 3. (3)
Every is chordal. 4. (4)
For every , the maximum clique size is . 5. (5)
For every , the number of vertices satisfies .
Graph set : The set only contains , the base graph used in the proof of Lemma 1, which is a clique of size . The vertices of may be presented in any order to a deterministic online algorithm. Again, the set of root vertices is an arbitrary subset of size of the vertices of . The remaining vertices form a second tree node. Every deterministic online algorithm, with probability 1, needs colors for , which implies (1). Invariants (2–4) are obvious. As for (5), there holds .
Graph set , : Assume that the set satisfying (1–5) has been constructed. First, in order to build , all possible -tuples of graphs of are formed. In assigning tuple entries, graphs of are selected with replacement. Hence, a total of tuples are built. For each tuple, graphs are added to in the following way. Let be any fixed tuple. Six graph pairs are formed. For , let and be the graphs in tuple entries and , respectively. To the -th pair a clique of size may or may not be added. The possible additions, over the six pairs, can be represented by a bit vector . More specifically, given and any such bit vector , a graph is constructed as follows. For , a subgraph is generated. If , then is the union of and . The set of root vertices is the union of and . If , then a clique of size is added to and . Every vertex of has an edge to every vertex of . Subgraph consists of the newly created component rooted at and , i.e. . Graph is the union of the and the set is the union of the , . When is presented to , the subgraphs are revealed one by one, . For each the graphs and are presented recursively. Finally, the vertices of , if they exist, are shown. It remains to verify the invariants.
(1) Let be a graph drawn uniformly at random from . Consider any subgraph , , containing and . By the construction of , both and represent graphs drawn uniformly at random from . Let be any deterministic online algorithm. Invariant (1) for implies and . Moreover it implies . Let be the latter event that and hold.
Assume that holds. There are two cases, which correspond to those analyzed in the proof of Lemma 1. If , then if is not added to and , which happens with probability . On the other hand, if , then the addition of ensures that . Again, is added with probability . In either case, given , . We obtain . Equivalently, . If , then must hold true for . The latter event occurs with probability at most . We conclude . This holds independently of ’s coloring decisions made in other components.
Invariants (2–4) are immediate, based on the arguments given in the proof of Lemma 1. As for the number of vertices of any , we observe that it is upper bounded by .
If is odd, the above construction of sets , , is performed for parameter . In , graph is extended by a single vertex having edges to all other vertices in . Invariant (5) holds because any graph contains copies of .
The lemma follows from (1) and (3–5). In particular, (1) implies that the expected number of colors used by any deterministic online algorithm is at least . ∎
Proof of Theorem 2.
For the given and , choose . In this proof, logarithms are base 12. There holds , because . By Lemma 2, there exists a probability distribution on a set of chordal graphs with chromatic number such that the expected number of colors used by every deterministic online algorithm is at least . The number of vertices of any graph in is at most . Hence, by the choice of , it is upper bounded by . For every , we add a suitable number of vertices so that the total number of vertices is equal to . Every new vertex has one edge to an arbitrary vertex in the original graph . Hence, there exists a probability distribution on a set of -vertex graphs with chromatic number such that the expected number of colors used by any deterministic online algorithm is at least . By Yao’s principle [28], for every randomized online algorithm, there exists an -vertex chordal graph with such that the expected number of color is . We have , because , and hence . Since , we have and thus . ∎
Again, in Theorem 2 we can reduce the lower bound on from to , for any . The expected number of colors used by is .
4 Further graph classes
Given Theorem 2, we can derive lower bounds on the performance of randomized online coloring algorithms for other important graph classes.
4.1 Trees, planar, bipartite, -inductive and bounded-treewidth graphs
Corollary 1**.**
For every randomized online algorithm and every with , there exists a -vertex tree , presented by an oblivious adversary, such that the expected number of colors used by to color is .
Proof.
The corollary follows from Lemma 2 and Theorem 2 because, for , the constructed graphs are trees. Every clique of size added in the construction is a singleton vertex. Indeed, every constructed graph is a forest whose components can be linked by an additional vertex. ∎
Since trees are planar and bipartite graphs, we obtain the following two corollaries.
Corollary 2**.**
For every randomized online algorithm and every with , there exists a -vertex planar graph , presented by an oblivious adversary, such that the expected number of colors used by to color is .
Corollary 3**.**
For every randomized online algorithm and every with , there exists a -vertex bipartite graph , presented by an oblivious adversary, such that the expected number of colors used by to color is .
Every chordal graph is -inductive and has treewidth [7]. Hence, Theorem 2 gives the following two results.
Corollary 4**.**
Let be an arbitrary positive integer. For every randomized online algorithm and every with , there exists a -vertex -inductive graph , presented by an oblivious adversary, such that the expected number of colors used by to color is .
Corollary 5**.**
Let be an arbitrary positive integer. For every randomized online algorithm and every with , there exists a -vertex graph of treewidth , presented by an oblivious adversary, such that the expected number of colors used by to color is .
The following corollary gives a result for strongly chordal graphs.
Corollary 6**.**
Let be an arbitrary positive integer. For every randomized online algorithm and every with , there exists a -vertex strongly chordal graph with chromatic number , presented by an oblivious adversary, such that the expected number of colors used by to color is .
Proof.
We prove that every graph constructed in Lemma 2 is strongly chordal. The corollary then immediately follows from Theorem 2. Let denote the neighborhood of a vertex in . For , does not posses an even cycle and thus is strongly chordal. For , consider an even cycle of length at least six in . We first argue that there must exist two non-consecutive vertices and in that are part of the same tree node . If visits only one or two tree nodes, this is obvious, given the length of . If visits at least three tree nodes, the desired fact follows from invariant (2) in Lemma 2, which ensures that each connected component of forms a tree of tree nodes.
Hence let and be two non-consecutive vertices in belonging to the same tree node . As is a clique, is an edge in . Moreover because, again, is a clique and its vertices are connected to the same vertices that are not part of . Consider a neighbor of in . We differ between two cases. First, if is also a neighbor of in , then there must exist a neighbor of and a neighbor of in because has length at least six. Therefore, starting at , cycle visits vertices in this order. We have , which implies that is an edge in . The distance between and in is three so that is an odd chord of . On the other hand, if is not a neighbor of in , then is an edge in since . Thus is a chord of . Moreover is a chord of because and are non-consecutive in . We conclude that either or is an odd chord of because distances between vertices and and vertices and in differ by exactly one. ∎
4.2 Disk graphs
A disk graph is the intersection graph of disks in the Euclidean plane. Every vertex corresponds to a disk; two vertices are connected by an edge if the respective disks intersect. The following theorem implies that it is not possible to improve on the performance of deterministic online coloring algorithms by using randomization. We use the common assumption that when an online algorithm makes coloring decisions, it does not use the disk representation [9, 12, 13].
Theorem 3**.**
Let be an arbitrary randomized online algorithm. For every and with , there exists a -vertex disk graph with chromatic number , presented by an oblivious adversary, in which the ratio of the largest to smallest disk radius is , such that the expected number of colors used by is .
The proof of Theorem 3 relies on the following lemma, which we prove first.
Lemma 3**.**
For every and every with , there exists a probability distribution on a set of disk graphs with the following properties. In every , the number of vertices is at most , the ratio of the largest to smallest disk radius is and . The expected number of colors used by every deterministic online algorithm for a graph drawn according to the distribution is at least .
Proof.
We use the graph sets , constructed in Lemma 2, focusing on . Let be arbitrary. We show that if , every with vertices translates to a disk graph with vertices in which the ratio of the largest to smallest disk radius is .
Again . Assume that . Let be an arbitrary graph. The corresponding disk graph is constructed in a top-down manner. In a first step we generate a graph in which disks touch each other but do not intersect. At the end of the construction we slightly increase the disk radii so as to create intersections among the disks.
First in the construction of a disk of radius , centered at the origin , is placed in the Euclidean plane. Determine an such that . Such an exists because . Disk has diameter . Let be the vertical strip of width below . The center line of has -coordinate 0. Figure 5 depicts the arrangement. Since , disk extends past both boundaries of . In a disk representation of will be placed recursively below . Recall that consists of twelve graphs of that form six pairs , . To each pair a clique of size might have been added. Since , this clique is a single vertex.
The disk representation of in is as follows. Strip of width is divided into twelve substrips of width each, see again Figure 5. In the -th substrip a strip of width is located, . Strip lies in the middle of the -th substrip so that its left and right boundaries have a distance of from those of the substrip. The strips , , will host the representations of the twelve subgraphs of .
Consider any pair , . If is added to the pair, a disk of radius is placed in the odd numbered strip below . Disk is positioned so that it touches . Then a representation of is placed in below . Since , disk fully covers . If is not added to , a representation of is placed in below disk . In any case a representation of is created in the neighboring strip below . Since the left and right boundaries of have a distance of from those of the -th substrip containing , disks and graph representations placed in do not touch or overlap with disks placed in other strips , .
In general assume that a graph , , has to be represented in a strip of width below a disk . The construction proceeds in the same way as described in the last paragraph for . Strip is divided into twelve substrips, which in turn contain strips of width . These strips host the subgraphs of . For each pair of subgraphs for which a new vertex is added, a disk of radius is placed so that it touches disk from below. The top-down construction ends when graphs have to be placed in a strip of width below a disk . Graph is represented by a combination of two disks of radius 1, see Figure 5. The two disks are placed on top of each other so that the upper one touches from below.
Graph is constructed in a top-down manner. However, when presented to an online coloring algorithm, the vertices are of course revealed bottom-up, with the vertices of graphs representing revealed first. Disk in does not correspond to a vertex in . For every other vertex of , exactly one disk was introduced. Hence, the analysis in the proof of Lemma 2 implies that contain at most vertices. In the contact points among disks correspond to edges in . More precisely, any two disks and touch each other in if and only if the vertices corresponding to and are connected by an edge in . It is easy to modify so that the contact points are replaced by real intersections among the respective disks. Let be the minimum distance of any disks that do not touch each other. The radius of disk is increased by . For every other disk the radius is increased by .
Let be the set of all disk graphs generated for any . Consider the uniform distribution on . By Lemma 2, if a graph is drawn uniformly at random from , the expected number of colors used by any deterministic online algorithm is at least . ∎
Proof of Theorem 3.
Let . Logarithms are base 12. Since , there holds . Moreover, . Consider the set of disk graphs, defined in Lemma 3, each of which consists of at most disks. Hence by the choice of , they consist of at most disks. To each with, say, disks we add additional disks. Their radius may be an arbitrary value between the smallest and the largest disk radius occurring in . Lemma 3, together with Yao’s principle [28], implies that for every randomized online algorithm there exists an -vertex disk graph in which the ratio of the largest to smallest disk radius is such that the expected number of colors used by is at least . There holds because . We conclude that . ∎
5 Lookahead and buffer reordering
We explore the settings where an online algorithm has lookahead or is equipped with a reordering buffer.
5.1 Lookahead
We first assume that a randomized online coloring algorithm has lookahead . Theorem 4 below shows that, for chordal graphs, a lookahead of size leads to no improvement.
Theorem 4**.**
Let and be arbitrary numbers with and . For every randomized online algorithm with lookahead and every with and , there exists a -vertex chordal graph with chromatic number , presented by an oblivious adversary, such that the expected number of colors used by to color is .
Proof.
For any , consider the class of deterministic online algorithms with lookahead . We refine the graph sets , defined in the proof of Lemma 2, by specifying an order in which vertices arrive and by extending the individual graphs. Let be arbitrary and be an any graph. The vertices of are presented to an online coloring algorithm in phases, based on the subgraphs with contained in .
More precisely, at the bottom level contains several instances of . The vertices of all the copies of form a set . They are presented first and are part of phase 1. Next contains graphs . Let be the set of vertices in all instances of that are not yet contained in . Using the notation of the proof of Lemma 2, the vertices of belong to sets that are added to graph pairs of . In general, let be the set of vertices in instances of that are not yet contained in , . Graph is presented to an online algorithm by revealing the vertices of , for increasing . The vertex sequence of forms phase , .
In order to render ’s lookahead useless, at the end of each phase , exactly new dummy vertices are presented, . These new vertices can for example be isolated vertices. Alternatively, they could be combined to form a chain of cliques having size at most . The new vertices increase the graph size by no more than . When coloring the vertices of , an online algorithm with lookahead has no information about vertices of , . Let be the set of all extended graphs. Lemma 2 implies that if a graph is drawn uniformly at random from , the expected number of colors used by any deterministic online algorithm with lookahead is at least .
We conclude that for any , there exists a probability distribution on a set of chordal graphs with the following properties. For every , and the number of vertices satisfies . The expected number of colors used by any deterministic online algorithm with lookahead is at least .
In order to prove the theorem, for , and with the stated properties, choose . Logarithms are base 12. There holds because . Consider the set of extended graphs defined above. Each graph in has at most vertices. We argue that, for , this expression is upper bounded by . For the chosen , we have . The first inequality holds because . The second inequality is equivalent to , which holds for . Obviously, if , then . Hence, as desired, . To each graph of we add a suitable number of vertices so that the graph size is exactly .
Using Yao’s principle we obtain that, for every randomized online algorithm with lookahead , where , there exists an -vertex chordal graph with such that the expected number of colors used by is at least , which in turn is lower bounded by . There holds . Moreover, , for . Also, , for . In conclusion, and therefore . ∎
Based on Theorem 4 we can derive analogous results for all the other graph classes considered in Section 4. Loosely speaking, a lookahead of size is of no help. The next Corollary 7 addresses trees. Exactly the same statement holds for planar and bipartite graphs, respectively. For brevity, we omit the corresponding corollaries.
Corollary 7**.**
Let be an arbitrary real number. For every randomized online algorithm with lookahead and every with and , there exists a -vertex tree , presented by an oblivious adversary, such that the expected number of colors used by to color is .
For -inductive graphs, graphs of treewidth and strongly chordal graphs with chromatic number , the formulation of Theorem 4 directly carries over. In fact, the result holds for all integers . For disk graphs, Theorems 3 and 4 give the following corollary.
Corollary 8**.**
Let with be arbitrary. For every randomized online algorithm with lookahead , every and with and , there exists a -vertex disk graph with chromatic number , presented by an oblivious adversary, in which the ratio of the largest to smallest disk radius is , such that the expected number of colors used by to color is .
5.2 Buffer reordering
Next we examine the setting in which a deterministic online coloring algorithm has a reordering buffer. We prove that a buffer of size , for any , does not improve the asymptotic performance of the algorithms.
Theorem 5**.**
Let and be arbitrary numbers with and . For every deterministic online algorithm having a buffer of size and every with and , there exists a -vertex chordal graph with chromatic number such that the number of colors used by is .
Proof.
We extend the adaptive graph construction presented in the proof of Lemma 1 and, as in the proof of Theorem 4, let the adversary generate a graph in a bottom-up fashion. Given , and with the stated properties, let . The adversary constructs a graph consisting of subgraphs , for any . In phase 1, graphs are constructed. As always each is a clique of size in which arbitrary vertices form a set of distinguished root vertices. We assume that is even and address the case that is odd at the end of the proof. The vertices of all the copies of may be presented in an arbitrary order to the deterministic online algorithm . In general in phase , , the adversary presents the vertices of subgraphs that have not been revealed in previous phases.
More specifically, let . There holds : The last inequality is satisfied if . This inequality in turn is equivalent to , which holds true by the choice of . Consider any phase , . We say that algorithm has made progress on a subgraph if at the end of phase the algorithm has colored at least half of the root vertices of . We prove that at the end of every phase , , the following invariant (1) holds. Invariants (2–5) are as in the proof of Lemma 1.
- (1)
At the end of phase , has made progress on at least subgraphs . For each of these subgraphs, .
For , the analysis is simple. Suppose that at the end of phase 1 has made progress on less than subgraphs . Then there exist more than graphs for which less than half of the root vertices have been colored. Thus at the end of phase 1 the buffer must contain more than vertices. We observe that for any with , there holds because the latter inequality is equivalent to , which is satisfied by the choice of . Since the buffer size is at most , cannot store more than vertices in the buffer at the end of phase 1. Hence must have made progress on at least subgraphs . For each of those subgraphs at least half of the root vertices have been colored, i.e. at least colors have been used.
Assume that invariant (1) holds for phases , where . The adversary takes subgraphs for which has made progress and holds. The adversary pairs them in an arbitrary way so that graph pairs are formed. Consider any such pair . By inductive assumption and . If , then the adversary creates a graph that is simply the union of and . No further vertices are added. On the other hand, if , the adversary creates a graph by adding a clique of size to . Each vertex of has an edge to every vertex of . As in the proof of Lemma 1 we can show that if has colored at least half of the vertices of , there holds . Phase consists of the arrival of the vertices of , taken over all the graph pairs for which such a clique is added. Finally, the adversary takes the subgraphs not combined so far and pairs them in an arbitrary way so as to create graphs . No further vertices are added.
It remains to verify that invariant (1) holds. Again, consider the graph pairs composed of subgraphs satisfying invariant (1) for phase . The adversary has constructed corresponding subgraphs . We argue that at the end of phase , has made progress on at least half of them. Consider any , based on graph pair . If no clique has been added, then has made progress on , because by inductive assumption has colored at least half of the root vertices of and . On the other hand, if a clique had been added and has not made progress on , then more than vertices of must reside in the buffer at the end of phase . Hence, if had not made progress on more than half of the considered subgraphs , then more than vertices must reside in the buffer. This is impossible because, as verified in the second to last paragraph, . We obtain that has made progress on at least subgraphs . For each of these subgraphs, the potential addition of a clique ensures that must use at least colors for the root vertices.
After phase the formation of graphs , is simple. The adversary takes arbitrary pairs of graphs and combines them to form graphs . No further vertices are added. Finally, when the generation of a graph consisting of, say, vertices is complete, the adversary adds vertices to form a final graph with vertices. Invariant (1) for ensures that uses at least colors. We show that is in . There holds , for .
Finally, if is odd, the above graph construction is performed for . A single vertex is added to each subgraph to form a graph with clique size . ∎
Given Theorem 5, we derive analogous results for the other graph classes. Corollary 9 shows a result for trees. Identical statements hold for planar and bipartite graphs. Again, for brevity, we omit the corresponding corollaries.
Corollary 9**.**
Let with be arbitrary. For every deterministic online algorithm having a buffer of size and every with and , there exists a -vertex tree such that the number of colors used by is .
For -inductive graphs, graphs of treewidth and strongly chordal graphs with chromatic number , the statement of Theorem 5 directly carries over. In this case it holds for any . The corollaries are omitted here. Finally, we give a result for disk graphs.
Corollary 10**.**
Let be an arbitrary deterministic online algorithm having a buffer of size and let be an arbitrary real number with . For every and with and , there exists a -vertex disk graph with chromatic number , in which the ratio of the largest to smallest disk radius is , such that the number of colors used by is .
Acknowledgments
We thank anonymous referees for their valuable comments.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] N. Avigdor-Elgrabli and Y. Rabani. An optimal randomized online algorithm for reordering buffer management. In Proc. 54th Annual IEEE Symposium on Foundations of Computer Science (FOCS) , pages 1–10, 2013.
- 2[2] A. Bar-Noy, P. Cheilaris, S. Olonetsky, and S. Smorodinsky. Online conflict-free colouring for hypergraphs. Combinatorics, Probability & Computing , 19(4):493–516, 2010.
- 3[3] A. Bar-Noy, P. Cheilaris, and S. Smorodinsky. Deterministic conflict-free coloring for intervals: From offline to online. ACM Trans. Algorithms , 4(4):44:1–44:18, 2008.
- 4[4] D. Bean. Effective coloration. J. Symbolic Logic , 41(2):469–480, 1976.
- 5[5] S. Ben-David, A. Borodin, R. Karp, G. Tardos, and A. Wigderson. On the power of randomization in on-line algorithms. Algorithmica , 11(1):2–14, 1994.
- 6[6] M. P. Bianchi, H.-J. Böckenhauer, J. Hromkovic, and L. Keller. Online coloring of bipartite graphs with and without advice. Algorithmica , 70(1):92–111, 2014.
- 7[7] H. L. Bodlaender. A tourist guide through treewidth. Acta Cybernetica , 11(1-2):1–21, 1993.
- 8[8] E. Burjons, J. Hromkovic, X. Muñoz, and W. Unger. Online graph coloring with advice and randomized adversary. In Proc. 42nd International Conference on Current Trends in Theory and Practice of Computer Science (SOFSEM’16) , pages 229–240. Springer LNCS 9587, 2016.
