Journal of Graph Algorithms and Applications on K-visibility Graphs

We examine several types of visibility graphs in which sightlines can pass through k objects. For k ≥ 1 we bound the maximum thickness of semi-bar k-visibility graphs between 2 3 (k + 1) and 2k. In addition we show that the maximum number of edges in arc and circle k-visibility graphs on n vertices is at most (k + 1)(3n − k − 2) for n > 4k + 4 and n 2 for n ≤ 4k + 4, while the maximum chromatic number is at most 6k + 6. In semi-arc k-visibility graphs on n vertices, we show that the maximum number of edges is n 2 for n ≤ 3k + 3 and at most (k + 1)(2n − k+2 2) for n > 3k + 3, while the maximum chromatic number is at most 4k + 4.


Introduction
Visibility graphs are graphs for which vertices can be drawn as regions so that two regions are visible to each other if and only if there is an edge between their corresponding vertices. In this paper we study bar, semi-bar, arc, circle, and semi-arc visibility graphs. We also study a variant of visibility graphs represented by drawings in which objects are able to see through exactly k other objects for some positive integer k. These graphs are known as k-visibility graphs.
Dean et al. [1] previously placed upper bounds on the number of edges, the chromatic number, and the thickness of bar k-visibility graphs with n vertices in terms of k and n. Felsner and Massow [3] tightened the upper bound on the number of edges of bar k-visibility graphs and placed bounds on the number of edges, the thickness, and the chromatic number of semibar k-visibility graphs. Hartke et al. [4] found sharp upper bounds on the maximum number of edges in bar k-visibility graphs.
Other research has found classes of graphs which can be represented as bar visibility graphs. For example Lin et al. [7] determined an algorithm for plane triangular graphs G with n vertices which outputs a bar visibility representation of G no wider than 22n−42 15 with bar ends on grid points in time O(n). Luccio et al. [8] proved any bar visibility graph can be transformed into a planar multigraph with all triangular faces by successively duplicating edges, and furthermore that every graph which can be transformed into a planar multigraph with all triangular faces by successively duplicating edges can be represented as a bar visibility graph.
In Section 2 we define each type of k-visibility graph considered in this paper. In Section 3 we bound the maximum thickness of semi-bar k-visibility graphs between 2 3 (k + 1) and 2k. We also bound the maximum number of edges and the chromatic numbers of arc, circle, and semi-arc k-visibility graphs. In Section 4 we show an equation based on skyscraper puzzles for counting the number of edges in any semi-bar k-visibility graph.
After an earlier version of this paper was posted, we found an abstract [11], with no paper, that claimed to bound the maximum thickness of bar k-visibility graphs between 2k+3 3 and 3k + 3 and the maximum thickness of semi-bar k-visibility graphs between 2k+5 6 and 2k. None of the proofs in our paper use the results claimed in [11].

Definitions and assumptions
In this section we define the various types of visibility graphs and cover conditions that we assume throughout the paper. Definition 1. The thickness Θ(G) of a graph G is the minimum number of planar subgraphs whose union is G. That is, Θ(G) is the minimum number of colors needed to color the edges of G such that no two edges with the same color intersect.
Research on bounding graph thickness is motivated by the problem of efficiently designing very large scale integration (VLSI) circuits. VLSI circuits are built in layers to avoid wire crossings which disrupt signals [9]. For each graph G with vertices corresponding to circuit gates and edges corresponding to wires, the thickness of G gives an upper bound on how many layers are needed to build the VLSI circuit without wires crossing in the same layer.
Below are definitions for the different kinds of k-visibility graphs.

Bar k-visibility graphs
Bar visibility graphs are graphs that have the property that the vertices of the graph correspond to the elements of a given set of horizontal segments, called bars, in such a way that two vertices of the graph are adjacent whenever there exists a vertical segment which only intersects the horizontal segments corresponding to those vertices. The set of horizontal segments is said to be the bar visibility representation of the graph. This type of visibility graph was introduced in the 1980s by Duchet et al. [2] and Schlag et al. [10] mainly for its applications in the development of VLSI. Figure 1 gives an example of a set of horizontal line segments and its corresponding bar visibility graph. Sightlines are drawn as dashed lines. Dean et al. [1] extended the definition of bar visibility graphs by allowing visibility through k bars. Vertices u and v have an edge in the graph if and only if there exists a vertical segment intersecting the horizontal bars corresponding to u and v and at most k other horizontal bars. These graphs are called bar k-visibility graphs. In this terminology visibility means 0-visibility and we will use these terms interchangeably. Figure 2 shows an example of a bar 1-visibility graph with a bar 1-visibility representation equivalent to the one in Figure 1. Sightlines that pass through an additional bar are drawn thicker than the original sightlines.

Semi-bar k-visibility graphs
A semi-bar k-visibility graph is a bar k-visibility graph where the left endpoints of all the bars have x-coordinates equal to 0. We prove an upper bound of 2k on the thickness of semi-bar k-visibility graphs and show that there exist semi-bar visibility graphs with thickness at least 2 3 (k + 1) . We will assume that all semi-bars have different lengths unless otherwise specified. If any pair of semi-bars had the same length, then the length of one could be changed without deleting any edges.
Every semi-bar k-visibility graph on n vertices, including representations that contain semi-bars of equal lengths, can be represented using semi-bars with integer lengths between 1 and n inclusive. Therefore every semi-bar k-visibility graph can be represented by a sequence of n positive integers between 1 and n inclusive.
Felsner and Massow [3] proved that the maximum number of edges in a semi-bar k-visibility graph with n vertices is (k+1)(2n−2k−3) for n ≥ 2k+2 and n 2 for n ≤ 2k + 2. We give a formula to count the number of edges of an arbitrary semi-bar k-visibility graph based on functions of its semi-bar k-visibility representation.
The method we use is inspired by skyscraper problems, which were also examined using permutations in [6]. A skyscraper puzzle consists of an empty n × n grid with numbers written left or right of some rows and above or below some columns. The solver fills the grid with numbers between 1 and n representing heights of skyscrapers placed in each entry of the grid. The numbers are placed so that no two skyscrapers in the same column or same row have the same height.
If there is a number m above a column in the empty grid, then the numbers 1, . . . , n must be placed in that column so that there are m numbers in the column which are greater than every number above them. If there is a number m below a column in the empty grid, then the numbers 1, . . . , n must be placed in that column so that there are m numbers in the column which are greater than every number below them. The restrictions for the numbers in rows are defined analogously based on the numbers left or right of the row. Then each number m outside the grid corresponds to the number of visible skyscrapers in the row or column adjacent to m which are visible from the location of m.
We consider a visibility representation based on skyscraper puzzles in which there is just a single column in which to place numbers. Any such configuration corresponds to a semi-bar visibility graph. Any numbers above (resp. below) the column are the number of semi-bars which are longer than all semi-bars above (resp. below) them.
We show how to count the number of edges in any semi-bar visibility graph by using the numbers above and below the column in its skyscraper configuration. Furthermore we extend the skyscraper analogy to k-visibility graphs to show a similar result for semi-bar k-visibility representations.

Arc, circle, and semi-arc visibility graphs
An interesting extension of bar visibility graphs is the concept of arc visibility graphs introduced by Hutchinson [5], who defined a non-degenerate cone in the plane to be a 4-sided region of positive area with two opposite sides being arcs of circles concentric about the origin and the other two sides being (possibly intersecting) radial line segments. Two concentric arcs a 1 and a 2 are then said to be radially visible if there exists a cone that intersects only these two arcs and whose two circular ends are subsets of the two arcs.
A graph is then called an arc visibility graph if its vertices can be represented by pairwise disjoint arcs of circles centered at the origin such that two vertices are adjacent in the graph if and only if their corresponding arcs are radially visible. Circle visibility graphs are defined in nearly the same way, with the difference that vertices can be represented as circles as well as arcs. Note that all arc visibility graphs are also circle visibility graphs. Figure 3 shows an arc visibility graph and its arc visibility representation.
In any arc visibility graph, the arcs can be expressed uniquely as a set of We call the endpoints corresponding to the coordinates (r i , α i,1 ) and (r i , α i,2 ) the negative and positive endpoints of arc a i , respectively. We also examine arc k-visibility graphs and circle k-visibility graphs, where cones are allowed to intersect k additional arcs and circles. Figure 4 shows the arc 1-visibility graph of the arc visibility representation shown in Figure 3. We can also define semi-arc k-visibility graphs to be arc k-visibility graphs in which every arc's negative endpoint lies on the x-axis. Like semi-bar k-visibility graphs, every semi-arc k-visibility graph on n vertices can be represented by a sequence of n integers. Start with a line on the x-axis, colored blue on the positive part and red on the negative part, and rotate the line counterclockwise around the origin until it intersects the positive endpoint of a semi-arc. If the blue part of the line intersects the positive endpoints of any semi-arcs, then assign the semi-arcs the integer 1. If the red part of the line intersects the positive endpoints of any semi-arcs, then assign the semi-arcs the integer −1.
Continue rotating the line counterclockwise. If the blue part of the line intersects the positive endpoints of any semi-arcs, then assign those semi-arcs the least positive integer that is greater in absolute value than all integers assigned when the line was in a previous configuration. If the red part of the line intersects the positive endpoints of any semi-arcs, then assign those semi-arcs the greatest negative integer that is greater in absolute value than all integers assigned when the line was in a previous configuration. After the line has rotated by an angle of π, all of the semi-arcs are assigned nonzero integers with magnitude at most n.
It follows by definition that all bar k-visibility graphs are also arc kvisibility graphs and all semi-bar k-visibility graphs are also semi-arc kvisibility graphs. Indeed let G be a graph on n vertices that has a bar kvisibility representation in which the horizontal endpoints of bar i are a i ≥ 0 and b i > a i and the height of bar For each i, draw the arc of radius h i centered at the origin between the angles π a i M and π b i M . Then the resulting drawing is an arc k-visibility representation of G.
When considering arc and circle k-visibility graphs, we make two assumptions.
Assumption 2. If two endpoints of two arcs have the same angular coordinate, then we can move one slightly without deleting any edges in the arc k-visibility graph. So we assume that no two arcs have endpoints with the same angular coordinate since we are maximizing the number of edges. Assumption 3. If there are two arcs that are the same distance from the origin, then we can slightly increase the radius of one so that their radii are different without affecting the arc k-visibility graph. Therefore we also assume that no two arcs are the same distance away from the origin. We then label the arcs with a 1 , a 2 , . . . , and a n , where a i is given to the arc with the i th greatest radius.
Any circle can be turned into an arc without deleting any edges, but this could possibly add edges. As we are interested in upper bounds on the number of edges and the chromatic number of arc and circle k-visibility graphs, then we will prove bounds for arc k-visibility graphs which will also hold for circle k-visibility graphs. Therefore we can assume that arc or circle k-visibility representations only contain arcs.
In the next section we prove an upper bound of (k + 1)(3n − k − 2) for n ≥ 4k + 4 on the number of edges and an upper bound of 6k + 6 on the chromatic number of arc and circle k-visibility graphs. Since K 4k+4 is a bar k-visibility graph [1], then the maximum number of edges in any arc or circle k-visibility graph on n ≤ 4k + 4 vertices is n 2 .

Bounds on edges, chromatic number, and thickness
Dean et al. [1] showed that the thickness of any bar k-visibility graph G k is at most 2k(9k − 1) by coloring the edges based on a vertex-coloring of G k−1 .
The following lemma provides a lower bound on the maximal thickness of bar k-visibility graphs.
Lemma 4. There exist bar k-visibility graphs with thickness at least k + 1 for all k ≥ 0.
To bound the thickness of semi-bar k-visibility graphs, we define a onebend construction as in [3]. We will assume no pair of semi-bars have the same length since we can change the lengths without deleting edges in the k-visibility graph.
Definition 5. The underlying semi-bar k-visibility graph G k of S is the graph with semi-bar k-visibility representation S.
Consider a semi-bar k-visibility representation S of G k in which semi-bars are horizontal with all right endpoints on the same vertical line and all left endpoints on different vertical lines. We construct a one-bend drawing from S as Felsner and Massow did in [3]. In this drawing each edge consists of two segments connected at an endpoint.
To create a one-bend drawing of G k , first widen the bars so that they are rectangles while keeping their lengths constant. Each vertex v in the graph now corresponds to a rectangle R v . Next draw each vertex on the midpoint of the left side of each rectangle. Then take the leftmost endpoint, say u, of each edge e = {u, v}.
Then project v orthogonally onto the nearest side of R u , and call this projection v . Note that the line between v and v is a sightline between R u and R v . Choose to be less than the minimum distance between any two endpoints of bars in S. Take v on the side of R u containing v so that the length of v v is . Let e be the union of the two line segments uv and v v. Note that if two edges are adjacent, then by definition they will not intersect anywhere other than their common endpoint. See Figure 5. Theorem 6. If G is a semi-bar k-visibility graph with k ≥ 1, then Θ(G) ≤ 2k.
Proof. The main idea of this proof is the next lemma: Proof. If there are k + 1 or more longer bars on one side of B with edges crossing B, then the bar farthest from B on that side would have an edge crossing at least k + 1 bars (B and the k bars on that side closest to B), a contradiction of k-visibility. Therefore there are at most k longer bars on each side of B with edges crossing B.
Assume that there are k longer bars on each side of B with edges crossing B. Now consider the top-most and bottom-most bars B 1 and B 2 respectively among those 2k bars. From our assumption there must be bars b 1 and b 2 on the lower and upper sides of B respectively which are shorter than B such that B 1 has an edge with b 1 and B 2 has an edge with b 2 . Assume without loss of generality that b 1 is shorter than b 2 . This implies that the edge from B 1 to b 1 must cross b 2 , so this edge crosses k +1 bars. This is a contradiction, which implies that there are not k longer bars on each side of B with edges crossing B. This completes the proof.
Given a one-bend drawing of G, start coloring the bars and any edges connected to them in decreasing order of bar length using 2k colors. We can use 2k−1 colors to color each of the longest 2k−1 bars. For each bar, color its previously uncolored edges with the same color assigned to the bar. Suppose at least i bars have been colored for i ≥ 2k − 1. Edges from longer bars colored with at most 2k − 1 colors will cross the (i + 1) st longest bar, so we color this bar with a remaining color. Intersections only happen within bars, so the final coloring of edges produces 2k planar subgraphs. This completes the proof of Theorem 6.
We now prove a lower bound on the maximum thickness of semi-bar kvisibility graphs.
The proof of Theorem 8 is analogous to the proof of Theorem 4; the only difference is the sharp upper bound on the number of edges in a semi-bar k-visibility graph with n vertices, which Felsner and Massow [3] proved was (k + 1)(2n − 2k − 3) for n ≥ 2k + 2.

Arc and circle k-visibility graphs
Dean et al. found upper bounds on the number of edges and the chromatic number of bar k-visibility graphs [1]. Here we set upper bounds on these properties for arc, circle, and semi-arc k-visibility graphs.
It will suffice to find an upper bound on the number of edges of arc kvisibility graphs since any circles can be turned into arcs without deleting any edges. Consider an edge {u, v} in the arc k-visibility graph, and let U and V be the arcs corresponding to u and v.
We define the angular coordinate of a line of sight in the following manner. Previously we assigned unique angular coordinates to the points on each arc. Now we can associate each line of sight with the smallest angular coordinate of its two endpoints. We will call this number the angular coordinate of the line of sight. Note that the angular coordinate of a line of sight can vary between 0 and 3π.
Let ({u, v}) denote the radial line segment between U and V whose angular coordinate is the infimum of the angular coordinates of all lines of sight between U and V . If ({u, v}) contains the negative endpoint of U (respectively V ) then we call {u, v} a negative edge of U (respectively V ).
If ({u, v}) does not contain the negative endpoint of U or V , then it must contain the positive endpoint of some arc B that blocks the k-visibility between U and V before the endpoint. In this case we call ({u, v}) a positive edge of B.
Lemma 9. By definition, there are at most k + 1 positive edges and at most 2k + 2 negative edges corresponding to each arc. Therefore, there are at most (3k + 3)n edges in a circle or arc k-visibility graph with n vertices.
Theorem 10. In a circle or arc k-visibility graph with n vertices, there are at most (k + 1)(3n − k − 2) edges for n > 4k + 4 and n 2 edges for n ≤ 4k + 4. Proof. Suppose that n > 4k + 4, since the maximum number of edges is n 2 for n ≤ 4k + 4. Since we may assume that the circle k-visibility graph is an arc k-visibility graph, then name the arcs a 1 , a 2 , . . . , a n in increasing order of distance from the center of the circle.
Lemma 9 gives an upper bound of 3n(k +1) edges. However arcs a n , a n−1 , . . ., a n−k have at most k + 1, k + 2, . . ., 2k + 1 negative edges respectively and 0, 1, . . ., k positive edges respectively. Therefore the upper bound on edges can be improved to Remark 11. Note that letting k = 0 produces an upper bound of 3n − 2 on the number of edges that a circle or arc visibility graph can have.
These upper bounds on the number of edges of circle k-visibility graphs give an upper bound on their chromatic numbers.
The proof of the last corollary is nearly identical to the proof for bar k-visibility graphs by Dean et al. since every subgraph of G has a vertex of degree at most 6k + 5 [1].
Proof. If n ≤ 3k + 3, then K n is a semi-arc k-visibility graph (see Figure 6). If n > 3k + 3, then let G be a graph on n vertices with semi-arc k-visibility representation S. Every edge in G can be drawn as a visibility segment in S intersecting the positive endpoint of at least one of the semi-arcs in the edge. Since edges in the representation can cross at most k arcs that are not in the edge, then at most 2k + 2 edges can be drawn intersecting the positive endpoint of each arc. However the k + 1 outermost arcs have at most k + 1, k + 2, . . . , 2k + 1 edges respectively that can be drawn intersecting their positive endpoint, which implies the upper bound.
Again, the proof of the last corollary is like the proof for bar k-visibility graphs since every subgraph of G has a vertex of degree at most 4k + 3 [1]. The construction in Figure 6 implies the next lower bound.

Counting edges in semi-bar k-visibility graphs
In this section we derive a formula for counting the number of edges in semibar k-visibility graphs. For the final formula semi-bars are allowed to have the same lengths, but we first consider the case when the lengths are different. Figure 6: A semi-arc k-visibility representation with n vertices and (k + 1)(2n − 3k+6 2 ) edges for n ≥ 3k + 3.
Let G = (V, E) be a semi-bar 0-visibility graph with n vertices. Then G has some semi-bar visibility representation S G = {s v } v∈V of disjoint horizontal segments with left endpoints on the y-axis (semi-bars) such that for all a, b ∈ V all semi-bars between s a and s b are shorter than both s a and s b if and only if {a, b} ∈ E.
Let the function A(S) be the number of semi-bars in S which are taller than all semi-bars above them, and U (S) be the number of semi-bars in S which are taller than all semi-bars under them. These are analogous to the numbers above and below each column in skyscraper puzzles. Moreover if all semi-bars have different lengths, then S G corresponds to a permutation of the integers {1, . . . , n} with the topmost bar of S G representing the first term of the permutation. The function A(S) corresponds to the number of leftto-right maxima in the permutation, while U (S) corresponds to the number of right-to-left maxima in the permutation.
For each s ∈ S let a(s) = 1 if s is taller than all semi-bars above it and let a(s) = 0 otherwise. So a(s) = 1 precisely when the term in the permutation corresponding to s is a left-to-right maximum. Let u(s) = 1 if s is taller than all semi-bars under it and let u(s) = 0 otherwise. Then A(S) = s∈S a(s) and U (S) = s∈S u(s).
Lemma 16. If S G is any semi-bar visibility representation of G and all semi-bars in S G have different lengths, then the number of edges in G is Proof. Pick an arbitrary semi-bar visibility representation S G of G. For each v ∈ V , count how many edges in E include v and some w for which s w is taller than s v . Then each v contributes 2 − a(s v ) − u(s v ) edges, so there are 2n − A(S G ) − U (S G ) total edges.
We now extend this formula to all semi-bar k-visibility graphs. Let G k = (V, E) be a semi-bar k-visibility graph. Then G k has a semi-bar kvisibility representation S G k = {s v } v∈V of disjoint horizontal semi-bars with left endpoints on the y-axis such that for all a, b ∈ V , all but at most k semi-bars between s a and s b are shorter than both s a and s b if and only if {a, b} ∈ E. Define {s a , s b } to be a j-visibility edge if all but exactly j semi-bars between s a and s b are shorter than both s a and s b .
Let the function A j (S) be the number of semi-bars in S which are taller than all but at most j semi-bars above them, and U j (S) be the number of semi-bars in S which are taller than all but at most j semi-bars under them. For each s ∈ S let a j (s) = 1 if s is taller than all but at most j semi-bars above it and let a j (s) = 0 otherwise. Let u j (s) = 1 if s is taller than all but at most j semi-bars under it and let u j (s) = 0 otherwise. Then A j (S) = s∈S a j (s) and U j (S) = s∈S u j (s).
Call an unordered pair of semi-bars {s a , s b } a j-bridge if s a is the same height as s b and all but exactly j semi-bars between s a and s b are shorter than s a . A semi-bar can be contained in at most two j-bridges for each j. Let Br j (S) denote the number of j-bridges in S.
Theorem 17. If S G k is any semi-bar k-visibility representation of G k , then the number of edges in G k is 2(k + 1)n − k j=0 Corollary 18. If S G k is any semi-bar k-visibility representation of G with n ≥ 2k + 2 vertices, then k j=0 (A j (S G k ) + U j (S G k ) + Br j (S G k )) ≥ (k + 1)(2k + 3).

Open Problems
The results in this paper leave open questions beyond the ones mentioned in [1,3,4].
Question 19. What is the maximum number of edges in a semi-arc kvisibility graph on n vertices for n > 3k + 3?
We conjecture that the bound in Theorem 15 is tight.
Conjecture 20. The maximum number of edges in a semi-arc k-visibility graph on n vertices is (k + 1)(2n − 3k+6 2 ) for n ≥ 3k + 3. This conjecture would also imply the next conjecture.
Question 22. What is the maximum number of edges in an arc k-visibility graph on n > 4k + 4 vertices?
Question 23. What is the largest complete arc k-visibility graph?