Journal of Graph Algorithms and Applications the Unit Bar Visibility Number of a Graph

A t-unit-bar representation of a graph G is an assignment of sets of at most t horizontal unit-length segments in the plane to the vertices of G so that (1) all of the segments are pairwise nonintersecting, and (2) two vertices x and y are adjacent if and only if there is a vertical channel of positive width connecting a segment assigned to x and a segment assigned to y that intersects no other segment. The unit bar visibility number of a graph G, denoted ub(G), is the minimum t such that G has a t-unit-bar visibility representation. Our results include a linear time algorithm that determines ub(T) when T is a tree, bounds on ub(Km,n) that determine ub(Km,n) asymptotically when n and m are asymptotically equal, and bounds on ub(Kn) that determine ub(Kn) exactly when n ≡ 1, 2 (mod 6).


Introduction
Motivated by the challenges of very-large-scale integration (VLSI), significant study has focused on graphs with representations having nice geometric descriptions. A visibility representation of a graph G consists of an assignment of pairwise disjoint geometric objects (typical examples include segments, Cartesian products of segments, or spheres) to the vertices of G so that two vertices are adjacent if and only if there is an uninterrupted "line of sight" (generally a line segment or channel of positive width) joining the objects assigned to those vertices.
A bar visibility representation of a graph G is an assignment of distinct horizontal line segments (henceforth called bars) in the plane to the vertices of G so that two vertices are adjacent if and only if there is an uninterrupted channel of positive width that joins the bars ∆(G) for all G, where ∆(G) denotes the maximum degree of G. Thus ub(G) is well-defined. Since a t-unit-bar visibility representation of G is also a t-bar visibility representation of G, it follows that b(T ) ≤ ub(T ). We study the unit bar visibility number of graphs in various families. In Section 3, we present a linear-time algorithm that determines the unit bar visibility number of trees and generates an optimal representation. In Section 4 we give bounds for the unit bar visibility number of complete bipartite graphs that are asymptotically tight when the partite sets are of asymptotically equal sizes. In Section 5 we study the unit bar visibility number of complete graphs, proving that ⌈ n 6 ⌉ ≤ ub(K n ) ≤ ⌈ n+4 6 ⌉. Section 6 contains open questions and conjectures.
Throughout the paper, all graphs are finite. We let d G (v) denote the degree of a vertex v in a graph G; when the graph is clear, we simply write d(v). Given a positive integer n, we let [n] denote the set {1, . . . , n}. We let K n denote the complete graph on n vertices and let K m,n denote the complete bipartite graph with partite sets of order m and m.

Preliminaries
When an arrangement of unit bars in the plane is given without it being identified as a representation of a specific graph, we refer to it as a unit bar visibility layout. When we refer to a bar in a t-unit-bar visibility representation or layout we are referring to one of the unit bars in one of the t-unit-bars. Since all bars are assumed to have length 1 we may describe each bar by the coordinates of its left endpoint; we denote the left endpoint of a bar b by (x b , y b ). If y b < y b ′ then we say that b is below b ′ and b ′ is above b. If x b < x b ′ then we say that b is to the left of b ′ and b ′ is to the right of b.
We say that two bars see each other if there is an uninterrupted vertical channel of positive width between the bars. When such a channel exists, we also say that the corresponding t-unit-bars and the corresponding vertices see each other. If two bars b and b ′ see each other and b is below b ′ , then we say that b sees b ′ above and that b ′ sees b below. Let R be a t-unit-bar visibility layout. We define G(R) to be the unit bar visibility graph that is represented by R when all bars represent distinct vertices. Given a bar b in R, define proj(b) to be the projection of b onto the x-axis. Similarly, for a set of bars S, define proj(S) to be b∈S proj(b). Two bars b and b ′ in R are said to overlap if proj(b) and proj(b ′ ) have an intersection of positive measure. The components of R are the sets of bars in R that correspond to the components of G(R). Thus distinct components of R have disjoint projections onto the x-axis.
Let R and R ′ be two unit bar visibility layouts. The disjoint union of R and R ′ is the unit bar visibility layout obtained by arranging R and R ′ in the plane so that proj(R)∩proj(R ′ ) = ∅ and (without loss of generality) x b < x b ′ for all b ∈ R and b ′ ∈ R ′ . With this terminology, every unit bar visibility layout is the disjoint union of its components. For convenience we label the components of R as R 1 , . . . , R ℓ so that for i < j we have that Lemma 1. Every graph G has an optimal t-unit-bar visibility representation in which all bars have distinct y-coordinates.
Proof. Let R be an optimal representation of G in which there are the fewest pairs of bars that share their y-coordinate. Suppose b and b ′ are two bars that share their y-coordinate. Since G is finite, there exists ǫ > 0 such that no bar has its y-coordinate in (y b − ǫ, y b ) ∪ (y b , y b + ǫ).
Increase the y-coordinate of b by ǫ/2 to obtain the t-unit-bar visibility layout R ′ . It is clear that R ′ is also a t-unit bar visibility representation of G, contradicting the minimality of R.

Trees
A tree that is a unit bar visibility graph is a unit bar visibility tree; we abbreviate unit bar visibility tree as UBVT. In [6], Dean and Veytsel characterized unit bar visibility trees. A caterpillar is a tree in which all vertices with degree at least 2 lie on a single path.

Theorem 2. (Dean-Veytsel [2003]) A tree T is a UBVT if and only if ∆(T ) ≤ 3 and T is a subdivision of a caterpillar.
We present a linear time algorithm that determines the unit bar visibility number of trees. With a slight modification, this algorithm will generate an optimal t-unit-bar visibility representation of a tree.
A unit bar visibility forest is a graph in which every component is a UBVT. Given a graph G, let the unit bar visibility arboricity of G, denoted Υ ub (G), be the minimum number of unit bar visibility forests needed to decompose G. Note that a decomposition of a graph into k forests gives a decomposition of G into trees such that no vertex is in more than k of those trees. If T is a tree, then a decomposition of T into trees such that no vertex is in more than k of those trees also yields a decomposition of a T into at most k forests. A decomposition of a tree T into UBVTs such that no vertex is in more than Υ ub (T ) of the UBVTs will be called an optimal decomposition. As a first step towards giving an algorithm that determines ub(T ) for all trees T , we prove that for all trees the unit bar visibility number and unit bar visibility arboricity are equal.
Lemma 3. Let T be a tree, and let R be a unit bar visibility layout. Let f : R → V (T ) be a labeling of the bars in R that induces a homomorphism from G(R) to T . If u, v ∈ V (T ) and bars assigned to u and v lie in some component R ′ of R, then for each edge xy on the unique u, v-path in T there are bars assigned to x and y in R ′ that see each other.
Proof. Let b(u) and b(v) be bars in R ′ that are assigned to u and v, respectively. Since . Every edge on the unique u, v-path in T must lie in the Theorem 4. If T is a tree, then ub(T ) = Υ ub (T ).
Proof. First suppose that Υ ub (T ) = k, and let {T 1 , . . . , T ℓ } be a decomposition of T into UB-VTs such that each vertex in T is in at most k trees in the decomposition. The disjoint union of unit bar visibility representations of T 1 , . . . , T ℓ is a k-unit-bar visibility representation of T , and therefore ub(T ) ≤ Υ ub (T ).
We now show that Υ ub (T ) ≤ ub(T ). By Lemma 1, we know that there is an optimal tunit-bar visibility representation R of T such that every bar in R has a distinct y-coordinate.
Among all such representations of T , let R be chosen so that it has the minimum number of pairs of bars {b, b ′ } such that b and b ′ correspond to the same vertex and lie in the same component of R.
For each v ∈ V (T ), let b 1 (v), . . . , b t (v) be the t bars assigned to v. First assume that b i (v) and b j (v) are in distinct components of R for all v ∈ V (T ) and all i, j ∈ [t] such that i = j. Let R 1 be the first component of R. Since the labels on the bars in R 1 are distinct, the labels induce an isomorphism from G(R 1 ) to the subgraph of T induced by the vertices assigned to the bars in R 1 . Therefore G(R 1 ) is a tree. Removing R 1 from R and applying induction then shows that R is the disjoint union of unit bar visibility representations of and z is not the y-coordinate of any bar in R. Place the horizontal line y = z through R. This immediately partitions R into two sets: A, the set of bars above the line y = z; and B, the set of bars below the line y = z. Further partition A  Figure 1). It follows that H is a bipartite interval graph. Hence H is a forest with a bipartition corresponding to the partition of R into A and B. Let B i be the set that contains b(v) and let A i ′ be the set that contains b ′ (v). Let e = B i A j be the first edge on the path in H from B i to A i ′ . Let R ′ be the union of the elements of P in the component of H − e that contains A i ′ . Finally, let S be the t-unit-bar visibility layout obtained from the disjoint union of R \ R ′ and R ′ . You can picture S as being obtained by "sliding" the bars in R ′ to the right of all other bars in R (see the bottom picture in Figure 1). We claim that S is a t-unit-bar visibility representation of T , contradicting the minimality of R since b(v) and b ′ (v) are no longer in the same component. It is clear that there are no bars that see each other in S that did not see each other in R. Similarly, there are no pairs of bars assigned to the same vertex lying in the same component of S that do not also lie in the same component of R. Therefore it remains to show that every edge in T is a visibility in S. If two bars b(w) and b(w ′ ) can see each other in R but cannot see each other in S, then without loss of generality we can assume that b(w) ∈ B i and b(w ′ ) ∈ A j . Both b(w) and b(w ′ ) lie in components of S that contain bars corresponding to v. Therefore there is a component of S that contains a w, v-walk in T and a component that contains a w ′ , v-walk in T . One of these walks must contain the edge ww ′ , and by Lemma 3, the corresponding component of S contains the edge w ′ w. Therefore S contains every edge of T , contradicting the minimality of R.
An immediate corollary of Theorems 2 and 4 is the following lower bound on the unit bar visibility number of a tree.
Proof. Each UBVT has maximum degree at most 3, and therefore a vertex in T of degree d must be in at least ⌈d/3⌉ elements of a decomposition of T into UBVTs.
We now prove our first upper bound on the unit bar visibility number of trees.
3 elements of the decomposition. Therefore Proof. We proceed by induction on the number of vertices in T . For the base case, we decompose K 1,n into ⌊n/3⌋ copies of K 1,3 and, if n is not divisible by 3, one copy of K 1,r where 1 ≤ r ≤ 2 and r ≡ n (mod 3). Now assume that T is not a star and let v be a vertex in T with exactly one neighbor that is not a leaf. If d(v) ≥ 4, then let T ′ be obtained by deleting three neighbors of v that are leaves. The addition of a copy of K 1,3 to the decomposition of T ′ from the inductive hypothesis yields the desired decomposition of T . If d(v) = 3, then let T ′ be obtained by deleting the two neighbors of v that are leaves. The addition of a copy of K 1,2 to the decomposition of T ′ from the inductive hypothesis yields the desired decomposition of T . If d(v) = 2, then let v ′ be the leaf neighbor of v and let T ′ = T − v ′ . By induction, T ′ has a decomposition into UBVTs where v lies in exactly one UBVT. By adding v ′ and the edge vv ′ to the element of the decomposition that contains v, we obtain the desired decomposition of T .
Corollary 5 and Theorem 6 actually determine the unit bar visibility number of any tree whose maximum degree is not a multiple of 3. However, both Corollary 5 and Theorem 6 can be sharp when ∆(T ) is a multiple of 3. As a simple example, given a tree T with maximum degree 3, ub(T ) = 1 if T is a subdivision of a caterpillar and ub(T ) = 2 otherwise. While it is not difficult to show that both bounds are also sharp for larger maximum degrees that are multiples of 3, we choose to omit such constructions for brevity.
We now present a linear-time algorithm called UNIT BAR TREE that determines if ub(T ) = ⌈∆(T )/3⌉. The algorithm decomposes trees into UBVTs, and in Theorem 9 we prove that each vertex is in at most Υ ub (T ) elements in the decomposition. Therefore, by UBVTs containing the root may be added to the decomposition. After PRUNE is called at v, the algorithm calls COLOR at v. If v is not the root, COLOR either assigns a color to the edge joining v and its parent, or halts and declares The decision to assign a particular color or halt depends complexity of the portion of the tree that remains below v.
We now describe the PRUNE routine in detail. When PRUNE is called at v, COLOR has already been called at all children of v without halting. Consequently each edge joining v to a child has been colored green, yellow, or red (as explained in the COLOR routine below).
Let T ′ be the tree that remains when PRUNE is called at v. The PRUNE routine selects subtrees of T ′ rooted at v and removes their edges and vertices (excluding v) from T ′ ; we say that these subtrees are pruned from T ′ . For each child x of v in T ′ , let T ′ vx denote the subtree of T ′ consisting of v, x, and all descendants of x in T ′ . The choices of the subtrees rooted at v are made greedily according to the following priority ordering of edge colors joining v to its children (this ordering is summarized in Table 1). In the following list, let x, x ′ , and x ′′ be children of v, though it is possible that v does not have three children.

If vx is red and vx
3. If vx and vx ′ are yellow and vx ′′ is green, then prune 5. If vx is yellow and vx ′ and vx ′′ are green, then prune 6. If vx is yellow and vx ′ is green, then prune 9. If vx and vx ′ are green, then prune 10. If vx is green, then prune T ′ vx .
If v is not the root of T , then PRUNE stops when v has no remaining children or ∆(T )  Table 1: Preferred pruning order in PRUNE, and ordering of color types in the proof of Theorem 9.

Most preferred
We now describe COLOR in detail. First, assume that v is not the root of T . Let T ′′ be the subtree of T that remains after PRUNE is called at v, and let u be the parent of v.
The COLOR routine assigns a color to uv or halts and declares ub(T ) = ∆(G)+1 3 as follows (summarized in Table 2).
Edges to remaining children at v after pruning Action None or G color uv G GG, Y, or YG color uv Y YY or R color uv R At least three, RR, RY, or RG declare ub(T ) = ∆(G)+1 3 Table 2: Action of COLOR(v), where u denotes the parent of v.
1) Color uv green (G) if a) v has no children in T ′′ , or b) v has exactly one child x in T ′ and vx is green.
2) Color uv yellow (Y) if a) v has exactly two children x and x ′ in T ′′ , and vx and vx ′ are both green, or b) v has exactly one child x in T ′′ and vx is yellow, or c) v has exactly two children x and x ′ in T ′′ , and vx is yellow and vx ′ is green.
3) Color uv red (R) if a) v has exactly two children x and x ′ in T ′′ , and vx and vx ′ are both yellow, or b) v has exactly one child x in T ′′ and vx is red.
if a) v has at least three children in T ′′ , or b) v has two children x and x ′ in T ′′ and vx is red.
If v is the root of T , then COLOR declares ub(T ) = ∆(T ) 3 if v has no children after PRUNE runs at v, and declares ub(T ) = ∆(T )+1 3 otherwise. We now present UNIT BAR TREE(T) in pseudocode.

Algorithm 7 (UNIT BAR TREE(T)).
Input , then also a decomposition T of T into UBVTs so that every vertex is in at most ⌈∆(T )/3⌉ trees in T . 1. Initialize: Choose a vertex r in T and let T r be T rooted at r. Set T = ∅.

Do a postorder traversal of T r . Let v be the current vertex. a. Run PRUNE(v) and add each UBVT pruned at
Before proving that Algorithm 7 produces an optimal decomposition of T , we present a lemma that allows us to modify UBVTs rooted at the same vertex. Given a tree T with root v, we call each maximal subtree of T that contains v as a leaf a branch of T . We assign a color to each branch B in T depending on its structure as described below. The color that is assigned to B is the same as the color that the COLOR routine would assign to the edge in B that is incident to v. The multiset of the colors of the branches of T at v is the color-type of T , denoted c(T ). For convenience we suppress set notation and record each color-type as a string of Rs followed by Ys followed by Gs. It is clear that a tree is a UBVT if and only if its color-type is RG, R, YYG, YY, YGG, YG, Y, GGG, GG, or G. We rank these strings according to the lexicographic ordering arising from the ordering R ≻ Y ≻ G. This ranking is shown in Table 1.
Let T 1 and T 2 be two trees with a common root v, and let B 1 and B 2 be branches of T 1 and T 2 respectively. A branch-swap of B 1 and B 2 exchanges B 1 and B 2 yielding the trees Proof. In all cases, it is trivial to check that the resulting trees have color-types of UBVTs. while ub(T ) = ⌈∆(T )/3⌉. Note that there is only a discrepancy in these two values if ∆(T ) is a multiple of 3. Thus we assume that ∆(T ) is a multiple of 3. We will write ∆(T ) 3 + 1 for ∆(T )+1 3 and we will suppress the ceiling notation in ∆(T ) 3 . By Theorem 4 we may assume that T has a decomposition into UBVTs so that each vertex is in at most ∆(T )/3 of the UBVTs. Let T = {T 1 , . . . , T ℓ } be the partial decomposition of T into UBVTs when Algorithm 7 halts and declares ub(T ) = ∆(T ) 3 + 1. Order T so that T i is pruned before T j when i < j. Let T be a decomposition of T into UBVTs so that each vertex is in at most ∆(T )/3 elements of T .
First suppose that T ⊆ T . Let y be the vertex where Algorithm 7 halts. If y is the root of T , then y is in ∆(T )/3 trees in T , and not all edges at y are contained in those trees. Hence y is in at least ∆(T ) 3 + 1 elements of T , a contradiction. Now assume that y is not the root of T . After pruning, y has degree at least 3 or is still joined to a child by a red edge. Therefore y has descendants of degree 3, and they do not all lie in a single path with y. It follows that the tree consisting of y, its remaining descendants, and the edge joining y to its parent is not a subgraph of a UBVT. Therefore one y or its descendants is in at least two elements of T that are not in T . Since y and all of its remaining descendants are in ∆(T )/3 − 1 elements of T , some vertex is in at least ∆(T )/3 + 1 elements of T , a contradiction.
We now assume that T ⊆ T . Choose T to maximize k so that T i ∈ T for all i ≤ k; note that k < ℓ. Let v be the vertex where T k+1 is pruned in Algorithm 7. Let T ′ be the subtree of T that remains when Algorithm 7 calls PRUNE at v. Let x 1 , . . . , x m be the children of v, ordered so that when i < j the index of the element of T containing x i is less than or equal to the index of the element of T containing x j .
Let T ′ vx i be the subtree of T ′ consisting of v, x i , and all descendants of lies in at least two elements of T − {T 1 , . . . , T k }. Since x ′ is a descendant of v, Algorithm 7 has already run PRUNE at x ′ when it begins to run PRUNE at v. Since x ′ is not a leaf in T ′ , it follows that ∆(T )/3 − 1 trees are pruned at x ′ by Algorithm 7. Furthermore, the trees that are pruned at x ′ are in the set {T 1 , . . . , T k } and hence are also in T . It follows that x ′ lies in ∆(T )/3 + 1 elements of T , a contradiction. Therefore, for all i ∈ [m], T ′ vx i is a subtree of an element of T .
We now impose an additional extremal condition on T . Since T k+1 is pruned at v, it follows that T k+1 = T ′ vx i ∪ . . . ∪ T ′ vx i+j for some i ∈ [m] and some j ∈ {0, 1, 2}. Order vx i , . . . , vx i+j so that vx i has the highest priority color with respect to the order R ≻ Y ≻ G.
Among all optimal decompositions that contain {T 1 , . . . , T k }, choose T so that T vx i , the element of T that contains vx i , has as many branches in common with T k+1 as possible. We will modify T vx i to obtain a new optimal decomposition of T that contradicts the extremality of T . We proceed by cases depending on the relative color-types of T k+1 and T vx i (refer to Table 1). The specific modifications to T vx i are summarized in Table 3.
In all such cases, by Lemma 8 T vx i can either swap a branch with or absorb a branch from some element of T − {T 1 , . . . , T k } to have more branches in common with T k+1 . This violates the extremality of T .
Case 2: c( T vx i ) ≻ c(T k+1 ), and v has no children after T k+1 is pruned. In this case, T vx i must have a branch that contains the parent of v. Because T k+1 is pruned by Algorithm 7, we conclude that at most ∆(T )/3 − 1 trees are used by the algorithm for the edges joining v to its children. If v is in at most ∆(T )/3 − 1 trees in T , the removing the branch from T vx i that Table 3: Modification to T vx i . The top table is when vx i is red, the middle is when vx i is yellow, and the bottom is when vx i is green. "Give" indicates that a branch of T ′ vx i either becomes its own tree or is absorbed by another tree. "Same" indicates that T vx i = T k+1 .
contains the parent of v and using it as its own element yields an optimal decomposition. In this decomposition, the color-type of the tree that contains vx i is lower ranked than c(T k+1 ), yielding an instance of Case 1. Otherwise v is in ∆(T )/3 trees in T , two of which are in T − {T 1 , . . . , T k }. It is straightforward to check that in all such cases Lemma 8 applies and we can perform branch swaps on T ′ vx i and another element of T − {T 1 , . . . , T k } that contains v to obtain a decomposition that either contains {T 1 , . . . , T k+1 } (violating the extremality of T ) or that is an instance of Case 1.
and v has children after T k+1 is pruned. In this case, c(T k+1 ) ∈ {R, YY, YGG, GGG}. In all of these cases, T vx i has a branch B that does not If v is in less than ∆(T )/3 elements of T , then replacing T vx i with T vx i − B and B yields an optimal decomposition of T that is an instance of Case 1. Thus we assume that v is in ∆(T )/3 elements of T .
If B is green, then c(T k+1 ) ∈ {R, YY}. By Algorithm 7, all remaining branches at v are red or yellow, and the green branch of T vx i contains the parent of v. Therefore all remaining elements of T that contain v have color type R, YY, or Y, and by Lemma 8 any one of these can absorb B from T vx i .
If B is yellow, then c(T k+1 ) ∈ {YGG, GGG}. By Algorithm 7, all remaining branches at v are green. In this case, by Lemma 8 it is possible to perform a branch-swap with B and a green branch of a tree in T − {T 1 , . . . , T k } rooted at v with color type GGG, GG, or G.
If B is red, then c(T k+1 ) = GGG and c( T vx i ) = RG. By Algorithm 7, all remaining branches at v are green. Therefore all remaining elements of T containing v have color type GGG, GG, or G. Because these elements of T contain two branches of T k+1 , we can assume (using branch absorption if necessary) that one of the remaining elements of T that contains v is of color-type GGG or GG. Thus it is possible by Lemma 8 to swap B for two green branches of a tree in T − {T 1 , . . . , T k }. This completes Case 3.
We conclude that for each color of B it is possible to obtain an optimal decomposition that is an instance of Case 1 or that contains We note that UNIT BAR TREE(T ) only provides a decomposition into UBVTs when ub(T ) = ⌈∆(T )/3⌉. If ub(T ) = ∆(T )+1 the root will allow UNIT BAR TREE(T ) to produce an optimal decomposition. This adds O(|V (T )|) additional operations to the algorithm (one more prune at each vertex). Thus an optimal decomposition of such a tree can also be found in linear time, resulting from possibly two iterations of UNIT BAR TREE(T ). In [6], Dean and Veytsel provide a construction of a unit bar visibility representation of a UBVT that is clearly implementable in time linear in the number of vertices. Since the sum of the sizes of the vertex sets in a decomposition of a tree T into UBVTs is at most 2|V (T )| − 2, it follows that an optimal t-unit-bar visibility representation of a tree can be found in linear time.
In [5], Dean et al. introduced unit rectangle visibility graphs, where vertices are assigned to distinct axis-aligned unit rectangles in the plane and edges correspond to uninterrupted vertical or horizontal lines of sight between the rectangles. They proved that a tree T is a unit rectangle visibility graph if and only if Υ ub (T ) ≤ 2. In the conclusion of their paper, they ask if there is an efficient algorithm to determine if an arbitrary graph is a unit rectangle visibility graph, and note that the question is unanswered even for trees. Algorithm 7 answers the question in the affirmative for trees.

Corollary 10. There is a linear time algorithm that determines if a tree is a unit rectangle visibility graph.
Given our results on trees, it is possible to bound the unit bar visibility number of planar graphs based on their maximum degree.
Proof. Nash-Williams [10] proved that every planar graph has arboricity at most 3, so there is a decomposition of G into trees such that every vertex is in three trees (note that some of these trees may be K 1 ). Let v ∈ V (G) and let T 1 , T 2 , and T 3 be the trees in the decomposition containing v. By Theorem 6, for each i ∈ [3] there is a decomposition of T into UBVTs so that v is in at most elements of the decomposition. Therefore there is a decomposition of G into UBVTs such that v is contained in at most The girth of a graph is the length of its longest cycle. When a planar graph has large girth, we can slightly improve Theorem 11.
Proof. Borodin [3] proved that planar graphs with girth at least 7 are acyclically 3-colorable. That is, V (G) can be partitioned into three sets such that the union of any two of the sets will induce a forest. Each vertex will appear in exactly two of these forests. Hence there is a decomposition of G into trees such that each vertex is in at most two trees. Let v ∈ V (G) and let T 1 and T 2 be the trees that contain v. By Theorem 6, there is a decomposition of G into UBVTs so that v is contained in at most elements of the decomposition. Since 3 + 1, the result follows.

Complete Bipartite Graphs
In [6], Dean and Veytsel characterized the complete bipartite graphs that are unit bar visibility graphs; unsurprisingly there are very few. In this section we study the unit bar visibility number of complete bipartite graphs. Throughout this section, we let K m,n have partite sets Y and X with Y = {y 1 , . . . , y m } and X = {x 1 , . . . , x n }. We will also assume that m ≥ n ≥ 2. Note that the case when n = 1 is handled in Section 3. We begin with two constructions of t-unit-bar visibility representations of K m,n . Construction 1. The construction begins with 2 m 4 + 1 horizontal line segments of length n, each of which will be subdivided into n contiguous unit bars. From bottom to top, the segments are assigned to Y and X in alternating fashion; thus both the top and bottom bars are assigned to Y . For j ∈ [ m 4 + 1], let Y j be the jth segment assigned to Y and for j ∈ [ m 4 ] let X j be the jth segment assigned to X, indexing from bottom to top. For j ∈ [ m 4 + 1], the segment Y j has left endpoint (j − 1, j − 1), and for j ∈ [ m 4 ] the segment X j has left endpoint (j − 1 2 , j − 1 2 ). In each segment, the unit bars from left to right will correspond to n consecutive vertices in the ordering of Y or X. Thus providing the leftmost unit bar in each line segment determines the construction. For j ∈ [ m 4 + 1], the leftmost bar of the segment Y j is assigned to y 3j−2 . For j ∈ [ m 4 ], the leftmost bar of the segment X j is assigned to x 2−j (with the index taken modulo n). See Figure 2.
After constructing the line segments, for each pair (x i , y i ′ ) where no bar of x i sees a bar of y i ′ , to the right of the line segments we add a unit bar for both x i and y i ′ that are visible to each other and no other bars.
If i ≡ 1 − j (mod n), then b i,j is the rightmost bar of X j and sees bars β i+4j−4,j , β i+4j−2,j+1 , and β i+4j−1,j+1 . Therefore, given i ∈ [n], the sets of bars seen by b i,1 , . . . , b i,⌈m/4⌉ correspond to pairwise disjoint sets of vertices in Y . It also follows that given i ∈ [m], the bars in Y 1 , . . . , Y ⌈m/4⌉+1 assigned to y i see bars corresponding to pairwise disjoint sets of vertices in X.
Observe that x i is assigned to the leftmost bar of at most ⌈m/4⌉ n segments.
Similarly, x i is assigned to the rightmost bar of at most ⌈m/4⌉ n segments. Interior bars in the segments see four other bars, and leftmost and rightmost bars see three other bars, so the bars assigned to x i in X 1 ∪ . . . ∪ X ⌈m/4⌉ see at least 4 m 4 − 2 ⌈m/4⌉ n bars, which are assigned to distinct vertices in Y . Thus x i is assigned to at most 2m n + 12 additional bars. Therefore the vertices in X are assigned to at most m 4 + 2m n + 12 bars. Each interior bar of Y j for 2 ≤ j ≤ ⌈m/4⌉ sees four other bars, while the leftmost and rightmost bars see three other bars. The leftmost bar of Y 1 and the rightmost bar of Y ⌈ m 4 ⌉+1 each see one other bar. All other bars in Y 1 and Y ⌈ m 4 ⌉+1 see two other bars. Let y i ∈ Y . Observe that y i is assigned to the leftmost bar of at most two segments and the rightmost bar of at most two segments. Furthermore, there are at most ⌈(m − n)/3⌉ segments that do not contain a bar assigned to y i . Suppose that y i is not assigned to a bar in r of the segments. Since y i is assigned to at most one bar in Y 1 and Y ⌈m/4⌉+1 , it follows that the bars of y i in the segments see at least 4( m 4 + 1 − r) − 8 bars, which are assigned to distinct vertices in X. Thus y i needs at most n − (4( m 4 + 1 − r) − 8) additional bars. Since m 4 it follows that y j is assigned to at most m 4 + 8 bars.
Construction 2. We begin with an array of 2 ⌊n/4⌋ + 1 line segments of length n ⌊m/n⌋. From bottom to top, the segments are assigned to Y and X in alternating fashion. For j ∈ [⌊n/4⌋ + 1], let Y j for be the jth segment assigned to Y and for j ∈ [⌊n/4⌋] let X j be the jth segment assigned to X, indexing from bottom to top. For j ∈ [⌊n/4⌋ + 1], the segment Y j has left endpoint (j − 1, j − 1), and for j ∈ [⌊n/4⌋] the segment X j has left endpoint (j − 1 2 , j − 1 2 ). The segments assigned to X consist of ⌊m/n⌋ sets of bars assigned to the vertices of X in order, up to a cyclic shift. The segments assigned to Y consist of n ⌊m/n⌋ bars assigned to {y 1 , . . . , y n⌊m/n⌋ } up to a cyclic shift. For j ∈ [ n 4 + 1], the leftmost bar of the segment Y j is assigned to y 3j−2 . For j ∈ [ n 4 ], the leftmost bar of the segment X j is assigned to x 2−i . See Figure 3.
After constructing the line segments, for each pair (x i , y i ′ ) where no bar of x i sees a bar of y i ′ , to the right of the line segments we add a unit bar for both x i and y i ′ that are visible to each other and no other bars.
Lemma 15. The unit bar visibility layout of Construction 2 is a t-unit-bar visibiliy representation of K m,n with t ≤ m 4 + n + 1.
Proof. Fix j ∈ [⌊n/4⌋] and i ∈ [n]. By construction, if a bar in X j that is assigned to x i sees a bar that is assigned to y i ′ , then i ′ ∈ [n ⌊m/n⌋] and i ′ ≡ i + 4j − 4, i + 4j − 3, i + 4j − 2, or i + 4j − 1 (mod n). The leftmost and rightmost bars of X j see three other bars, and all other bars of X j see four other bars. Furthermore, the bars in X j that are assigned to x i see pairwise disjoint sets of bars.
Each vertex in X is assigned to the leftmost bar of at most one segment and the rightmost bar of at most one segment. Therefore each vertex in X is assigned at most two additional bars outside of the segments for visibility to vertices in {y 1 , . . . , y n⌊m/n⌋ }. Each vertex in X is also assigned at most n − 1 bars for visibility to vertices in {y n⌊m/n⌋+1 , . . . , y m }. Thus each vertex in X is assigned at most n 4 m n + 2 + n − 1 ≤ m 4 + n + 1 bars. Each vertex in Y is assigned at most n additional bars outside of the segments. Thus each vertex in Y is assigned at most ⌊n/4⌋ + 1 + n bars. Since m ≥ n, it follows that each vertex in Y is assigned at most m 4 + 1 + n bars.
We next prove a general lower bound on the unit bar visibility number of K m,n . We refer to the bars in a t-unit-bar visibility representation of K m,n that correspond to vertices in Y and X as Y -bars and X-bars, respectively.
Theorem 17. For positive integers m and n with m ≥ n ≥ 2, ub(K m,n ) ≥ m 5 .
Proof. Again, we let K m,n have vertex set X ∪ Y , where |X| = n and |Y | = m. Let R be a t-unit-bar visibility representation of K m,n . We will assign the edges in K m,n to the X-bars Type 4: ℓ xy contains an interior point of both b x and b y . It follows that there are bars b y ′ and b x ′ assigned to vertices y ′ ∈ Y and x ′ ∈ X so that b x can see b y ′ , b x ′ and b y ′ are aligned, ℓ xy contains the right endpoints of b y ′ and b x ′ , and ℓ xy is the right edge of a line of sight between b y ′ and b x ′ . Assign xy to b For edges of Types 3 and 4, we say that b x ′ blocks for b x , since the presence of b x ′ allows b x to see two overlapping bars assigned to vertices in Y . For Type 3, we say that b x ′ blocks on the left and for Type 4 we say that b x ′ blocks on the right.
It is clear that b x is assigned at most two edges of Type 1, since the left endpoint of b x can see at most two other bars. It is also clear that b x can block on the left for at most one bar and can block on the right for at most one bar, so it is assigned at most one edge of Type 3 and at most one edge of Type 4. If b x is able to see the left endpoint of two Y -bars above, then those bars must overlap. Therefore, some bar blocks on the left for b x , and that bar is assigned the edge joining x to the Y -bar that is farther to the right (which is also the lower of the two). Thus at most one of the upward visibilities of b x is assigned to it as an edge of Type 2. Similarly, at most one of the downward visibilities of b x is assigned to it as an edge of Type 2. Therefore b x is assigned at most two edges of Type 2. Suppose that b x is assigned an edge of Type 2, and that this edge corresponds to a line of sight to a bar b y above b x . In this case, the left endpoint of b x cannot see the left endpoint of a Y -bar above b x as such a bar would overlap with b y . In this case, xy would be an edge of Type 3 that is assigned to some other bar. Similarly, the right endpoint of b x cannot see the right endpoint of a Y -bar above b x since the right endpoint of b x sees an interior point of b y or a Y -bar that is to the right of and below b y . Therefore, if b x is assigned an edge of Type 2 with a line of sight above b x , then b x cannot be assigned an edge of Type 3 or 4 from an X-bar that is above b x . Similarly, if b x is assigned an edge of Type 2 with a line of sight below b x , then b x cannot be assigned an edge of Type 3 or 4 from an X-bar that is below b x . It follows that if b x is assigned two edges of Type 2, which requires one above and one below b x , then b x cannot be assigned an edge of Type 3 or 4. It follows that b x is assigned at most five edges.
Because R is a t-unit-bar visibility representation of K m,n and each bar corresponding to a vertex in X is assigned at most five edges, it follows that mn ≤ 5nt. Therefore t ≥ m 5 .
When n = 2, the proof of Theorem 17 will actually yield an asymptotically best result.
Proof. The fact that ub(K 2,m ) ≤ m 4 + o(m) is established in Theorem 16. To prove the lower bound we follow the proof of Theorem 17. We claim that each X-bar is assigned at most four edges. Assume to the contrary that b is an X-bar that is assigned five edges. It follows that b is assigned two edges of Type 1, one edge of Type 2, one edge of Type 3, and one edge of Type 4. Since a bar cannot be assigned an edge of Type 2 above (respectively below) and block for a bar that is above (respectively below), it follows that b blocks for two X-bars that are both above or both below b. Without loss of generality, assume that b blocks for two X-bars b ′ and b ′′ that are below b. It follows that b, b ′ , and b ′′ all see the same Y -barb and that bb, b ′b , and b ′′b are all edges that are assigned to b. However, since n = 2, two of these three edges are the same, contradicting the assumption that each edge is assigned to a single pair of bars. Therefore each X-bar in a representation of K 2,n is assigned at most four bars and it follows that ub(K 2,m ) ≥ ⌈m/4⌉.
We now give another lower bound on the unit bar visibility number of complete bipartite graphs. This bound is better than the bound from Theorem 17 when n ≥ 2 3 m and is asymptotically best possible when n = m − o(m). We note that this bound is an immediate consequence of Lemma 4 from [4]; we include the proof because it is conceptually different from those presented so far.
Proof. Let R be a t-unit-bar visibility layout of K m,n . Represent each visibility in R as a line segment joining two bars and then contract each bar to a point. This yields a planar graph. Because R is a representation of a bipartite graph, the resulting planar graph is also bipartite. Since there are at most t(m+ n) bars in the layout, there are at most 2t(m+ n) −4 edges in the representation. Since K m,n has mn edges, it follows that t ≥ mn + 4 2(m + n) Theorems 16 and 19 give an asymptotically sharp result for K m,n when m and n are asymptotic.

Complete Graphs
In [4], Chang et al. proved that b(K n ) = ⌈n/6⌉, using constructions derived from the solution to Heawood's empire problem [7,8,13]. They also provided a simpler construction to prove b(K n ) ≤ ⌈n/6⌉ + 1. Based on this simpler construction we prove the following bound on the unit bar visibility number of K n .
Theorem 21. n 6 ≤ ub(K n ) ≤ n+4 Proof. The lower bound follows from the facts that b(G) ≤ ub(G) for all graphs and b(K n ) = n 6 . For the upper bound, we give a brief description of the construction of an (m + 1)-bar visibility representation of K 6m from [4]. Our only modification is the trivial observation that this construction can be obtained using (m + 1)-unit-bars.
Partition V (K 6m ) into three sets of size 2m, which we call V 1 , V 2 , and V 3 . The complete graph K 2m has a decomposition into m copies of P 2m , which can be obtained by rotating a zig-zag path when the vertices are placed on a circle. The unit bar visibility representation of K 6m is then obtained by decomposing K 6m into 3m copies of P 2m ∨ 2K 1 (the join of two graphs, G ∨ H, is the graph obtained from the disjoint union of G and H by adding all edges joining V (G) and V (H)). Each copy of P 2m ∨ 2K 1 will consist of a copy of P 2m from the path-decomposition of G[V i ] and two vertices from V i−1 (mod 3) for some i ∈ [3]. Provided that the sets of two vertices from V i−1 are pairwise disjoint, each vertex lies in m + 1 of the copies of P 2m ∨ 2K 1 . The disjoint union of 3m copies of the unit bar visibility representation of P 2m ∨2K 1 in Figure 5 with appropriate vertex-labels for the bars completes the construction.
When n is not divisible by 6, a representation of K n can be obtained from the representation of K 6⌈n/6⌉ by deleting the bars assigned to vertices not in K n . Therefore ub(K n ) ≤ ⌈n/6⌉ + 1 for all n. It remains to show that we can do improve this bound by 1 when n ≡ 1 (mod 6) or n ≡ 2 (mod 6). We will assume that n ≡ 2 (mod 6) since a representation of K 6m+1 can be obtained from a representation of K 6m+2 by deleting the bars assigned to the extra vertex. The reader is advised to consult Figure 6 to see an explicit example of the construction. Let n = 6m + 2. We begin with a decomposition of K 6m into 3m copies of P 2m ∨ 2K 1 . For each H i,j we construct a copy of the representation in Figure 5 Note that in Figure 5 the second bar from the bottom is to the left of the top bar, and the second bar from the top is to the right of the bottom bar. Furthermore, it is possible to compress the arrangement so that 1) the second bar from the bottom is to the left of the top bar by exactly 1 12m , and 2) the second bar from the top is to the right of the bottom bar by exactly 1 12m .
To complete the construction, we stack the representations of P 2m ∨ 2K 1 so that every bar in the representation of H i,j is below every bar in the representation of H i ′ ,j ′ when i < i ′ , or i = i ′ and j < j ′ . Furthermore, for i ∈ [3] and j ∈ [m − 1] arrange the representations of H i,j and H i,j+1 so that the second bar from the bottom of H i,j+1 is to the right of the topmost bar of H i,j by exactly 1 12m . Similarly, for i ∈ [2] arrange the representations of H i,m and H i+1,1 so that the second bar from the bottom of H i+1,j is to the right of the topmost bar of H i,m by exactly 1 12m . This yields a representation of K 6m in which a single bar can be added above all other bars that will see the highest and second lowest bars of H i,j for all i ∈ [3] and j ∈ [m]. Similarly a single bar can be added below all other bars that will see the lowest and second highest bars of H i,j for all i ∈ [3] and j ∈ [m]. By construction, these bars will both see bars assigned to each vertex in V 1 ∪ V 2 ∪ V 3 . Letting K n have vertex set V 1 , ∪V 2 ∪ V 3 ∪ {x, y}, we place a bar for x and a bar for y in those positions. The addition of an extra bar for x that sees the bar for y finishes the construction.

Open Questions
We conclude with some final remarks and open questions. The first questions come from [6] and [5]. In [4], Chang et al. proved that if G is an n-vertex graph, then b(G) ≤ ⌈n/6⌉+2. Lovász [9] proved that every n-vertex graph can be decomposed into at most ⌊n/2⌋ paths and cycles, and since paths and cycles are both unit bar visibility graphs, we have the following general bound.
Proposition 23. If G is an n-vertex graph, then ub(G) ≤ ⌊n/2⌋. Among n-vertex graphs, the largest unit bar visibility number that we have found is for K 1,n−1 , where ub(K 1,n−1 ) = ⌈(n − 1)/3⌉. This leads to the following question.
Question 3. What is the largest value that ub(G) can take when G is an n-vertex graph? In particular, is there an n-vertex graph G for which ub(G) > ⌈(n − 1)/3⌉?
We note that Algorithm 7 does not try to minimize the number of trees used in the decomposition. It is natural to seek a decomposition into unit bar visibility forests that is in some sense more efficient. Moving in a direction analogous to the idea of total interval numbers (see [1]), we might seek unit bar visibility representations of graphs in which the total number of unit bars is minimized.
Question 5. Given a graph G, what is the minimum number bars in a unit bar visibility layout where the bars can be labeled by V (G) giving a visibility representation of G?