Coloring and Guarding Arrangements

Given an arrangement of lines in the plane, what is the minimum number $c$ of colors required to color the lines so that no cell of the arrangement is monochromatic? In this paper we give bounds on the number c both for the above question, as well as some of its variations. We redefine these problems as geometric hypergraph coloring problems. If we define $\Hlinecell$ as the hypergraph where vertices are lines and edges represent cells of the arrangement, the answer to the above question is equal to the chromatic number of this hypergraph. We prove that this chromatic number is between $\Omega (\log n / \log\log n)$. and $O(\sqrt{n})$. Similarly, we give bounds on the minimum size of a subset $S$ of the intersections of the lines in $\mathcal{A}$ such that every cell is bounded by at least one of the vertices in $S$. This may be seen as a problem on guarding cells with vertices when the lines act as obstacles. The problem can also be defined as the minimum vertex cover problem in the hypergraph $\Hvertexcell$, the vertices of which are the line intersections, and the hyperedges are vertices of a cell. Analogously, we consider the problem of touching the lines with a minimum subset of the cells of the arrangement, which we identify as the minimum vertex cover problem in the $\Hcellzone$ hypergraph.


Introduction
While dual transformations may allow converting a combinatorial geometry problem about a configuration of points into a problem about an arrangement of lines, or reversely, the truth is that most mathematical questions appear to be much cleaner and natural in only one of the settings. In many cases, the dual version is considered solely when, besides making sense, it is additionally useful. Both kinds of geometric objects have inspired many problems and attracted much attention. For finite point sets the Erdős-Szekeres problem on finding large subsets in convex position, or the repeated distances problem on how many times can a single distance appear between pairs of points, are examples of famous questions that have been pursued for decades and are still open. Many research problems of this kind are described in Chapter 8 in [2]. Concerning arrangements of lines, possibly the most prevalent problems consist of studying the number of cells of each size, say triangles, that appear in every arrangement, but many other issues have been considered (see [3,6,7]). There are also problems that combine both kinds of objects, like counting incidences between points and lines, or studying the arrangements of lines spanned by point sets, which includes the celebrated Sylvester-Gallai problem on ordinary lines (those that only contain two of the points) [2].
In the first class of problems, substantial attention has been focusing on colored pointsets, i.e., configurations of points that belong to several classes, the colors, including chromatic variants of the repeated distances problem and the Erdős-Szekeres problem, and colored versions of Tverberg's Theorem and Helly's Theorem. In particular there is a vast body of research on problems involving a set of red points and a set of blue points. Refer to [11] for a survey on red-blue problems, or to [2] for a more generic account.
Somehow surprisingly, there is not a comparable set of questions that have been posed for colored arrangements of lines. There is a series of papers on the problem of taking bicolored sets of lines, calling monochromatic vertex an intersection point contained only in lines of one of the colors, and discussing their existence and number [8,9,14]. Another series of papers study the colorings of the so called arrangement graphs, in which vertices are the intersection points and edges are the segments between any two that are consecutive on one of the lines [1,4].
However, many other natural questions can be asked. For example, is it true that every bicolored arrangement of lines has a monochromatic cell? We prove in this paper that the generic answer is no, but that it is yes when the colors are slightly unbalanced. This leads immediately to another question that we discuss in our work: How many colors are always sufficient, and occasionally necessary, to color any set of n lines in such a way that the induced arrangement contains no monochromatic cell?
The last question brings manifestly the flavor of Art Gallery Problems [15][16][17]. We also consider for line arrangements several issues on this topic that apparently have not been studied before: How many vertices of an arrangement suffice to guard all its cells? How many lines are enough to guard (touch) all the cells?
While coloring and guarding arrangements of lines may appear at first glance as unrelated problems, there is a clean unifying framework provided by considering appropriate geometric hypergraphs. For example, minimally coloring an arrangement while avoiding monochromatic cells can be reformulated as follows: Let H line−cell be the geometric hypergraph where vertices are lines and edges represent cells of the arrangement. What is the chromatic number of the hypergraph? Here a proper coloring is one where no hyperedge is monochromatic.
In this work we consider several questions as the ones described in the preceding paragraphs, which arise as quite fundamental in terms of coloring and guarding arrangements of lines, and translate consistently into problems on geometric hypergraphs, like size of a maximal independent set, size of a vertex cover, or some coloring parameter.
The terminology for hypergraphs on arrangements is introduced in Section 2, where we also provide a table summarizing our results. Coloring problems are then discussed in Section 3 and guarding problems in Section 4. We conclude with some observations and open problems.

Definitions and Summary of Results
Let A be an arrangement of a set of lines L in R 2 . We say that an arrangement of lines A is simple if every two lines intersect, and no three lines have a common intersection point. From now on, we only consider simple arrangements of lines 1 .
Any arrangement A decomposes the plane into different cells, where a cell is a maximal connected component of R 2 \ L. We define H line−cell = (L, C) as the geometric hypergraph  An independent set of a hypergraph H = (V, E) is a set S ⊆ V such that ∀e ∈ E : e ⊆ S. This definition is the natural extension from the graph variant, and requires that no hyperedge is completely contained in S. Analogously, a vertex cover of H is a set S ⊆ V such that ∀e ∈ E : e ∩ S = ∅. The chromatic number χ(H) of H is the minimum number of colors that can be assigned to the vertices v ∈ V so that ∀e ∈ E : ∃v 1 , v 2 ∈ e : col(v 1 ) = col(v 2 ); that is, no hyperedge is monochromatic.
In the forthcoming sections we give upper and lower bounds on the worst-case values for these quantities on the three hypergraphs defined from a line arrangement. Our results are summarized in Table 1. Note that the maximum independent set and minimum vertex cover are complementary problems. As a result, any lower bound on one gives an upper bound on the other and vice versa. This property, along with the facts that |L| = n, |V | = n 2 , and |C| = n(n+1)

Coloring Lines, and Related Results
We first consider the chromatic number of the line-cell hypergraph of an arrangement, that is, the number of colors required for coloring the lines so that no cell has a monochromatic boundary. At the end of the section we include some similar results.

Two-colorability
We say that a set of lines L is k-colorable if we can color L with k-colors such that no cell is monochromatic (in other words, the corresponding H line−cell hyper graph has chromatic number k). Any coloring c : L → {0, . . . , k} that satisfies such a property is said to be proper. We first tackle the (simple) question of whether the two-colorable H line−cell hypergraphs have bounded size: Theorem 1. There are arbitrarily large two-colorable sets of lines. (c) The marked intersections form a vertex cover of the H vertex−cell hypergraph: every cell has at least one such intersection on its boundary. That is, these vertices guard the cells.
(d) The two marked cells form a vertex cover of the H cell−zone hypergraph: every line has a segment that lies on the boundary of one of those cells. That is, these two cells guard the lines. Proof. An infinite family of such examples are provided by a set of 2q +1 lines in convex position (for any q ∈ N, see Figure ??).Observe that in such arrangement, each cell is either bounded by (1) two consecutive lines, (2) the first and the last line or (3) all lines of the arrangement. It is easy to check that, if we color the lines alternatively red and blue by order of slope, no cell will be monochromatic.
The coloring used in Theorem 1 uses essentially the same number of lines of each color. We prove next that the result cannot hold when the numbers are unbalanced to a small extent. Proof. Let R be the set of lines that are assigned color 0, and B the set of lines whose color is 1. Let A R denote the arrangement of the lines in R. As R does not completely define a cell of A, each cell of A R must be traversed by a line in B.
We proceed iteratively: we start with A R , and add the lines in B one at a time. When adding a line , some cells of A R will be split into two parts by a line segment induced by . A connected component of segments inside a cell of A R is a set of segments whose intersection graph is connected.
To each cell c of A R , we assign a number, representing the number of connected components defined by the segments inside c. Let f (c, i) denote the number of connected components inside the cell c after adding the When the first line 1 ∈ B is added, f (c, 1) = 1 for each cell c crossed by 1 , and remains zero for every other cell. Therefore, What we also know, is that at the end of the process, each cell of A R should contain at least one component, otherwise the cell is monochromatic. Thus f (A R , |B|) should be bigger or equal to the number of cells in A R .
We get: which concludes the proof.

Independent lines in H line−cell
Recall that an independent set of lines in an arrangement is defined as a subset of lines S so that no cell of the arrangement is only adjacent to lines in S.
Theorem 3. For any set L of n lines, the corresponding H line−cell hypergraph has an independent set of size √ n/2.
Proof. We prove that any (inclusionwise) maximal independent set has size Ω( √ n). Consider such a maximal independent set I ⊂ L of size i. By maximality, each line ∈ L \ I can be associated with at least one cell of L whose boundary consists only of one segment of , and segments of lines in I. We choose one such cell for each line ∈ L \ I, and call this cell c . Then, we consider the set Q of quadrants defined by the intersections of the lines in I, each intersection defining 4 quadrants. If c has size at least 3 for some ∈ L \ I, then we charge to one of the quadrant of Q formed by the intersection of two lines of I on the boundary of c . If c has size two, then we charge to c . Note that, by definition of c , no quadrant can be charged more than once. Similarly, no cell of size two can be charged more than once. Hence the number of lines in L \ I cannot exceed the sum of the number of quadrants and the number of cells of size two: n ≥ 3|S| 2 + 1 |S| + 1 and therefore we conclude that |S| < 2n/3.

Chromatic number of H line−cell
In this section, we study the problem of coloring the H line−cell hypergraph. That is, we want to color the set L so that no cell is monochromatic. We start by giving an upper bound on the required number of colors. Proof. Our coloring scheme is as follows: select the largest independent set I, color all the lines of I with the same color, remove I from L. We now iterate on the remaining lines, where in each step of the algorithm a different color is assigned to the lines we remove. The algorithm stops whenever the number of non-colored lines is at most n 0 (the exact value of n 0 will be determined afterwards). Whenever n 0 or fewer lines remain, we complete the coloring by adding a new color to each of the remaining lines.
In order to show that this method provides a proper coloring, first observe that any independent set of L ⊆ L is also an independent set of L. That is, any set of lines with the same color assigned form an independent set of L. In particular, there cannot exist a cell c in which all lines adjacent to c have the same color assigned.
Let c(n) be the maximum number of colors needed for an arrangement of n lines. We will prove that c(n) = 2 √ n + O(1) using induction. Recall that, by Theorem 3, the size of a maximal independent set is at least √ n/2. Let n 0 be the smallest integer such that √ n 0 > 1 + n 0 − √ n 0 /2. Our coloring strategy gives the following recursion for any n ≥ n 0 .
We now construct a slightly sublogarithmic lower bound for the chromatic number of H line−cell : Theorem 6. There exists an arrangement of n lines whose corresponding hypergraph H line−cell has chromatic number Ω(log n/ log log n).
The proof of this claim is constructive. In the following we construct a set of (roughly) k k lines, in which any k-coloring will contain a monochromatic cell (for any k > 0). Since we are interested in the asymptotic behavior, it suffices to prove for the case in which k + 1 is a power of two (that is, k + 1 = 2 q for some q ≥ 0). In order to proceed with the proof, we first introduce some definitions and helpful results.
For any x 0 ∈ R we consider the order in which we traverse the lines of L in the vertical line x = x 0 from top to bottom. Although the permutation obtained will depend on L and x 0 , there will be exactly n 2 different permutations in any set L of n lines. Let A L be the set of different permutations that we can obtain. Each of these permutations is called a snapshot of L.
With this definition we can give an intuitive idea of our construction. Consider any coloring with k colors of a set of k + 1 lines. By the pigeonhole principle there will be two lines with the same assigned color. Moreover, since the two lines must cross, these two lines must be consecutive in the ordering given by some snapshot. Our approach is to cross these two lines with a second pair of lines with the same color assigned, hence obtaining a monochromatic quadrilateral. The main difficulty of the proof is that the line set must satisfy this property for any k-coloring of L. In particular, we do not know at which snapshot will the two lines of the same color meet.
We say that a set of snapshots W ⊆ A L is a witness set of L if, for any two lines , ∈ L, there exists a snapshot π ∈ W in which the two lines appear consecutively in π. It is easy to see that the whole set A L is a witness sets of quadratic size for any set of lines. Since the size of the witness set has a direct impact on our bound, we first show how to construct a witness set of smaller size: Lemma 7. For any q ≥ 0 there exists a set L of 2 q lines and a witness set W such that |W| ≤ 2 q+1 .
Proof. We construct the arrangement by induction on q (recall that we assumed k + 1 = 2 q for some q ≥ 0). For q = 0 our base gadget G 1 simply consists of a single line. Note that the witness property is trivially true, since there don't exist two distinct lines in G 1 , hence we define Figure 2: Induction step in the gadget G 2 q construction (left). The additional snapshots are also shown (dashed vertical lines). The generated arrangement for q = 8 and its witness set is shown in the right. For clarity lines of G 8 have been depicted as pseudolines.
As we are only interested in the ordering in which lines are crossed, we can do any transformation to a set L of lines, provided that transformation preserves the permutations in the set A L . If we update the coordinates of the snapshots in the witness set accordingly, the witness property will still hold. In particular, we can transform a set L of lines so that they become almost parallel and have any desired slope. We call this operation the flattening of L.
With this operation in mind we can do the induction step as follows: for any q > 0 generate a copy of gadget G 2 q−1 and flatten the lines so that they all have small positive slope and all crossings between lines occur below the horizontal line y = 0. Let G be the transformed set of lines and G be the reflexion of G with respect to line y = 0. Gadget G 2 q is defined as the union of G and G (see Figure 2).
Observe that G q satisfies the following properties: (i) Gadget G 2 q has size exactly 2 q . Moreover, any two lines cross exactly once.
(ii) The witness set W 2 q−1 of G also acts as witness set of G .
(iii) The lines of G and G intersect in a grid-like fashion, forming cells of size 4 and 2.
Observe that property (i) certifies that the construction is a valid set of lines, while properties (ii) and (iii) help us obtain a witness set W 2 q of small size; the crossing between lines of different gadgets can be guarded with n−2 = 2 q −2 lines (see Figure 2). Moreover, the crossings between lines of the same gadget can be guarded by the witness set W 2 q−1 (which by induction satisfies To finish the proof we must show that W 2 q is indeed a witness set of L: Let , be any two lines of L. If these lines belong to the same sub-gadget, we can apply induction and obtain that they must be consecutive in one of the first snapshots. Otherwise, the two lines belong to different sub-gadgets of G 2 q , hence they will be consecutive at the latter snapshots.
With the preceding result we can now prove Theorem 6: Proof. Let L (0) be the set of lines constructed in Lemma 7 and let W be the witness set of L (0) (recall that we have |L (0) | = k + 1 = 2 q and |W| = m for some m ≤ 2(k + 1)). Also, let π 1 , . . . , π m be the snapshots of W, sorted from left to right. Consider now any coloring of L (0) with k colors. By the pigeonhole principle, there must exist two lines , with the same color assigned. Since W is a witness set, these two lines must be consecutive at some snapshot π ∈ W. Whenever this happens, we say that and form a monochromatic consecutive pair at snapshot π.
In the following, we generalize the above construction to a set L (i) of size (k + 1) i+1 for any i ∈ {0, . . . , m}. The key property is that in any k-coloring of the set L (i) , either there is a monochromatic cell or there exist two lines that form a monochromatic consecutive pair at some snapshot π j (for m ≤ j > i). In particular, notice that the second condition cannot occur for set L (m) , hence there must exist a monochromatic cell in any k-coloring of L (m) .
We construct the set L (i) by induction on i. For i = 0 the claim is true by Lemma 7, hence we can focus on the inductive step. For any i > 0, we construct L (i) with k + 1 different copies of set L (i−1) flattened so that they satisfy the following properties: • (i) For any j ∈ {i, . . . m}, The snapshot of each copy L (i−1) at coordinate x = j is π j .
• (ii) No two lines of the same copy of L (i−1) cross in the vertical strip {−m < x < i}. In particular, the snapshot taken at any coordinate of the strip is π i .
• (iii) Lines of two different copies of L (i−1) cross in the vertical strip {0 < x < i} in a grid-like fashion. In particular any two lines that are consecutive in π i form a quadrilateral with other two consecutive lines of another copy of L (i−1) .
This construction can be done by flattening all the copies of L (i−1) so that each copy essentially becomes a thick line, and placing the different copies in convex position(see Figure ??). We define the set W (i) as the set {π i+1 , . . . , π m } (that is, we remove π i from W i−1 ). Observe that, since L (i) is composed of k + 1 different copies of L (i−1) , we indeed have |L (i) | = (k + 1)|L (i−1) | = (k + 1) i+1 .Moreover, the size of W (i) decreases by one in each iteration, hence |W (i) | = m − i.
In order to complete the proof we must show that, in any coloring c of L (i) , we either have a monochromatic cell or a monochromatic consecutive pair in π j (for some m ≤ j > i). Apply induction to the different copies of L (i−1) : if at least one of the copies has a monochromatic cell or has its monochromatic consecutive pairs at snapshot π j (for some j > i) we are done, since the same property will hold for L (i) . The other case occurs when all copies of L (i−1) have their monochromatic consecutive pair at snapshot π i . Let j , j be the monochromatic consecutive pair of the j-th copy of L (i−1) and let c j be its color. By the pigeonhole principle, there must be two distinct indices u, v ≤ k such that c u = c v . By property (iii) of our construction, the lines u , u , v , v form a quadrilateral in the arrangement of lines of L (i) . The quadrilateral will be monochromatic, since by definition the four lines have the same color assigned.

Other coloring results
For the sake of completeness, we end this section by stating two easy results on coloring vertices or cells instead of lines. Remark that cells of size two only have one vertex, hence cannot be polychromatic. Therefore, we only consider cells of size at least 3.
Proof. It is known that the graph obtained from an Euclidean arrangement of lines by taking only the bounded edges of the arrangement has chromatic number 3 [4]: Sweep the arrangement with a line from left to right. In this ordering, every vertex in the arrangement is adjacent to exactly two predecessors and hence we can assign the colors greedily, such that each vertex has a color different from at least one of its predecessors. Finally, we can identify two of the three colors, and no cell which is at least a triangle can be monochromatic.
The following well-known result considers the coloring of cells so that no line is only adjacent to cells of a single color class: Theorem 9 (Folk.). The chromatic number of H cell−zone is 2.
Proof. This claim is equivalent to the fact that the dual graph of the arrangement (where vertices are faces, and there is an edge between two faces if they are adjacent) is bipartite. This result has appeared in recreational texts and concited some research as well [10,13].

Guarding Arrangements
We now consider the vertex cover problem of the above hypergraphs. That is, we would like to select the minimum number of vertices so that any hyperedge is adjacent to the selected subset. Geometrically speaking, we would like to select the minimum number of vertices (or cells or lines), so that each cell (or line or cell, respectively) contains at least one of the selected items. Recall that this problem is the complementary of the independent set problem. Hence, for each case we will study the easiest of the two problems.

Guarding cells with vertices
We first consider the following problem: given an arrangement of lines A, how many vertices do we need to pick in order to guard the whole arrangement when lines act as obstacles blocking visibility? This can be rephrased as finding the smallest subset of vertices V so that each cell contains a vertex in V , and thus we are looking for bounds on the size of a vertex cover for H vertex−cell .
Theorem 10. For any set L of n lines, a vertex cover of the corresponding H vertex−cell hypergraph has size at most n 2 /6 + 2n. Furthermore, n 2 /6 vertices might be necessary.
Proof. First notice that any arrangement can have at most 2n cells of size exactly 2. Hence, these cells can be easily guarded with 2n guards. Thus, we focus our attention to cells of size 3 or more. We will guard these cells via a 3-coloring of the vertices of the arrangement. We sweep the arrangement in a fixed direction, and color the vertices in order.
Observe that the graph of the arrangement is 4-regular, and when a vertex v is encountered, it has exactly two neighbors (say u, w) that have already been colored. If u and w have distinct colors, then we assign the third color to v. If they have the same color, then we consider the colors assigned to the vertices of the cell having the segments uv and wv on its boundary. If only two colors are present in the cell, we assign the third one to v. Otherwise, we assign arbitrarily one of the two possible colors to v. With this construction, it is easy to check that all cells of size at least 3 have vertices of three distinct colors on their boundary. In particular, the vertices of any color can guard all cells of size 3 or more. Since we used three colors and the total number of vertices is n 2 /3, there will be a color class with at most n 2 /6 vertices.
For the lower bound we will use the construction of Furedi et al. [5]. This construction creates a family of arrangements that has n 2 /3 triangles in which any vertex of the arrangement is incident to at most two of these triangles. In particular, any vertex cover of the triangles will need at least n 2 /6 vertices.
Recall that the hypergraph H vertex−cell has n 2 = n 2 2 − n 2 vertices. Combining this fact with the preceding bounds on the size of a vertex cover allow us to get similar bounds for the independent set problem: Corollary 11. For any set L of n lines, a maximum independent set of the corresponding H vertex−cell hypergraph has size at least n 2 /3 − O(n). Furthermore, there exists sets of lines whose largest independent set has size at most n 2 3 − n 2 .

Guarding lines with cells
Here we consider the problem of touching all lines of L with a smallest subset of cells, i.e., we look for bounds on the size of a vertex cover for H cell−zone . We begin with a simple proof that a minimal vertex cover of H cell−zone hypergraph has size at most n 2 , that we will improve below.
Theorem 12. Given a set L of n lines, a minimal vertex cover of the corresponding H cell−zone hypergraph has size at most n 2 .
Proof. We describe a greedy algorithm to find a vertex cover of size n 2 ; we start with an empty set L. We find a pair p, q of lines that we still have to cover. Since every two lines cross, there must exist a cell c adjacent to both p and q. We add that cell c to the set L, and proceed with the unguarded cells. In the last step, if a single line remains to be covered we add to L any cell touching . Since each cell (except the last one) of L guards at least two lines, at most n 2 cells will be added into L.
We next provide a lower bound, and improve as well on the upper bound, for large values of n.
Theorem 13. Given any set L of n lines, a minimal vertex cover of the corresponding H cell−zone hypergraph has size at most 19n 48 + o(n). Moreover, there exists a set L of n lines, such that every vertex cover of the corresponding H cell−zone hypergraph has size at least n 4 .
Proof. The lower bound is proved by the fact that there exist arrangements where the largest cell has size 4 (see [12]). This implies that each cell touches at most 4 lines, and therefore n/4 cells are required to touch them all. The proof of the upper bound claim is a refined version of the method in the preceding theorem: we first select cells of size four or more and add them to L, until any remaining cell that we add to our set is not guaranteed to cover more than three new lines. We then continue adding cells that cover at least three lines in the same fashion. Finally, we complete our construction with cells that cover two lines as in Theorem 12.
The first iterations of the algorithm select cells that each cover four new lines. We iteratively select a cell covering four lines as long as the average number of segments of uncovered lines bounding a cell is strictly greater than three. The total number of segments is n 2 , and each contribute to two cells. Every selected cell discards four lines, and exactly 4 × 2n = 8n segments of those. If the cell is bounded by more than four lines, we only discard exactly four of them, arbitrarily. The total number of cells after the ith iteration is |C| − i. The number of iterations is the largest value i that satisfies: Hence we can select roughly n 16 cells, covering together n 4 lines. In the second phase of the algorithm, we iteratively select cells covering three new lines. Following the same reasoning, and taking into account the i n/16 previously selected cells,