1. Introduction
Classical network representations are usually global in nature. In order to derive a useful piece of information, one must access to a global data structure representing the entire network even if the needed information only concerns few nodes. Nowadays, with networks getting bigger and bigger, the need for locality is more important than ever. Indeed, in several cases, global representations are impractical and network representation must be distributed. The notion of (distributed) labeling scheme has been introduced [18, 46, 55, 56, 40] in order to meet this need. A (distributed) labeling scheme is a scheme maintaining global information on a network using local data structures (or labels) assigned to nodes of the network. Their goal is to locally store some useful information about the network in order to answer specific query concerning a pair of nodes by only inspecting the labels of the two nodes. Motivation of such localized data structure in distributed computing is surveyed and widely discussed in [55]. The predefined queries can be of various types such as distance, adjacency, or routing. The quality of a labeling scheme is measured by the size of the labels of nodes and the time required to answer queries. Trees with vertices admit adjacency and routing labeling schemes with size of labels and query time and distance labeling schemes with size of labels and query time , and this is asymptotically optimal. Finding natural classes of graphs admitting distance and/or routing labeling schemes with labels of polylogarithmic size is an important and challenging problem.
In this paper, we design distance and routing schemes for the subclass of median graphs containing no cubes (hypercube graphs of dimension three). In our schemes, the labels have bits^{1}^{1}1All logarithms in this paper are in base 2 and the time complexity of the queries is in . Median graphs constitutes the most important class in metric graph theory [9]. This importance is explained by the bijections between median graphs and discrete structures arising and playing important roles in completely different areas of research in mathematics and theoretical computer science: in fact, median graphs, 1skeletons of CAT(0) cube complexes from geometric group theory [44, 58], domains of event structures from concurrency [64], median algebras from universal algebra [11], and solution sets of 2SAT formulae from complexity theory [51, 59] are all the same.
The remaining part of this note is organized in the following way. In the next Section 2 we introduce the most important and general notions used in this paper. In Section 3 we review the main results on distance and routing labeling schemes and the main results on median graphs related to the paper. In Section 4 we recall or establish some properties of general median graphs used in our labeling schemes. In Section 5 we present the most important geometric and structural properties of cubefree median graphs, which are the essence of our distance and routing schemes and which do not hold for general median graphs. Sections 6 and 7 describe our distance and routing labeling schemes for cubefree median graphs and analyse their size, time complexity of queries, and the complexity of their construction.
2. Preliminaries
2.1. Basic notions
In this subsection, we recall some basic notions from graph theory. All graphs occurring in this note are undirected, simple, and connected. In our algorithmic results we will also suppose that they are finite. The closed neighborhood of a vertex is denoted by and consists of and the vertices adjacent to . The (open) neighborhood of is the set . The degree of is the number of vertices in its open neighborhood. We will write if two vertices and are adjacent and if and are not adjacent. We will denote by the subgraph of induced by a subset of vertices of . If it is clear from the context, we will use the same notation for the set and the subgraph induced by .
The distance between two vertices and is the length of a shortest path, and the interval between and consists of all the vertices on shortest –paths, that is, of all vertices (metrically) between and :
A subgraph of (or the corresponding vertex set) is called convex if it includes the interval of between any pair of its vertices. A subgraph of is said to be gated if for every vertex , there exists a vertex such that for all , ( is called the gate of in ). For a vertex of a gated subgraph of , the set (or the subgraph induced by this set) is called the fiber of with respect to . From the definition it follows that the fibers define a partition of the vertex set of . Notice also that gated sets of a graph enjoy the finite Helly property, that is, every finite family of gated sets that pairwise intersect has a nonempty intersection.
A graph is isometrically embeddable into a graph if there exists a mapping such that for all vertices .
The dimensional hypercube is the graph whose vertexset consists of all subsets of an set and in which two vertices and are linked by an edge if and only if .
For a vertex of a graph , let . A vertex minimizing the function is called a median vertex of . It is well known that any tree has either a single median vertex or two adjacent median vertices. Moreover, a vertex is a median vertex of if and only if any subtree of contains at most a half of vertices of . For this reason, a median vertex of a tree is often called a centroid.
A graph is called median if the intersection is a singleton for each triplet of vertices. The unique vertex is called the median of . Median graphs are bipartite. Basic examples of median graphs are trees, hypercubes, rectangular grids, and Hasse diagrams of distributive lattices and of median semilattices [9]. The star of a vertex of a median graph is the union of all hypercubes of containing . If is a tree and has degree , then is the closed neighborhood of and is isomorphic to . The dimension of a median graph is the largest dimension of a hypercube of .
A cubefree median graph is a median graph of dimension , i.e., a median graph not containing 3cubes as isometric subgraphs. Two illustrations of cubefree median graphs are given in Figure 1. The left figure will be used as a running example to illustrate the main definitions. Even if cubefree median graphs are the skeletons of 2dimensional CAT(0) cube complexes, their combinatorial structure is rather intricate. For example, cubefree median graphs are not necessarily planar: for this, take the Cartesian product of the stars and for .
2.2. Distance and routing labeling schemes
Let be a finite graph. The ports of a vertex are the unique (with respect to ) numbers given to the oriented edges around , i.e., the edges with . If , then the port from to , denoted , is the number given to . More generally, for arbitrary vertices of , denote any value such that and . A graph with ports is a graph to which vertices and edges are given ports. All the graphs in this paper are supposed to be graphs with ports.
A labeling scheme on a graph family consists of an encoding function and a decoding function. The encoding function is given a total knowledge of a graph and gives labels to its vertices in order to allow the decoding function to answer a predefined question (query) with knowledge of a restricted number of labels only. The encoding and decoding functions highly depend on the family and on the type of queries: adjacency, distance, or routing queries.
More formally, a distance labeling scheme on a graph family consists of an encoding function that gives to every vertex of a graph of a label, and of a decoding function that, given the labels of two vertices and of , can compute efficiently the distance between them. In a routing labeling scheme, the encoding function gives labels such that the decoding function is able, given the labels of a source and a target , to decide which port of to take to get closer to .
We continue by recalling the distance labeling scheme for trees proposed by Peleg in [55]. First, as we noticed above, if is a tree with vertices and is a median vertex of , then the removal of splits in subtrees with at most vertices each. The distance between any two vertices and from different subtrees of is . Therefore, each vertex of can keep in its label the distance to . Hence, it remains to recover the information necessary to compute the distance between two vertices in the same subtree of . This can be done by recursively applying to each subtree of the same procedure as for . Consequently, the label of each vertex of consists of the distances from to the roots of all subtrees occurring in the recursive calls and containing . Since from step to step the size of such subtrees is divided by at least 2, belongs to subtrees, thus the label of each vertex of has size .
3. Related work
In this section we review some known results on distance and routing labeling schemes and on median graphs.
3.1. Distance and routing labeling schemes
3.1.1. Distance labeling schemes
The notion of Distance Labeling Schemes (DLS) was first introduced in a series of papers by Peleg et al. [55, 56, 40]. Before these works, some closely related notions already existed such as embeddings in a squashed cube [62] (equivalent to distance labeling schemes with labels of size times the dimension of the cube) or implicit representation of graphs [46] (labeling schemes for adjacency requests).
One of the main results for DLS is that general graphs support distance labeling schemes with labels of size bits [62, 40, 5]. This scheme is asymptotically optimal since it is easy to show that bits labels are needed for general graphs. Another important result is that there exists a distance labeling scheme for the class of trees with bits labels [55, 6]. Several classes of graphs containing trees also enjoy a distance labeling scheme with bit labels such as bounded treewidth graphs [40], distancehereditary graphs [38], bounded cliquewidth graphs [30], and nonpositively curved plane graphs [26]. A lower bound of bits on the label length is known for trees [40, 6], implying that all the results mentioned above are optimal as well. Other families of graphs have been considered such as interval graphs, permutation graphs, and their generalizations [14, 39] for which an optimal bound of bits was given, and planar graphs for which there is a lower bound of bits [40] and an upper bound of bits [42].
Other results concern approximate distance labeling schemes, i.e., schemes that gives an approximation of the distance up to an additive factor and/or a mutiplicative factor (often called stretch). For arbitrary graphs, the most impactful result is due to Thorup and Zwick [61]. They proposed a multiplicative distance labeling scheme, for each integer , with labels of bits. In [37], it is proved that trees (and bounded treewidth graphs as well) admit a multiplicative DLS with labels of bits, and this is tight in terms of label length and approximation. They also design some additive DLS with bit labels for several families of graphs, including the graphs with bounded longest induced cycle, and, more generally, the graphs of bounded tree–length. For hyperbolic graph, there is a additive scheme with bit labels [25]. Finally, some works deal with affine approximation that combines a mutiplicative factor and an additive factor [1]. Notice that graphs of bounded treelength have bounded hyperbolicity and, more importantly, they can be embedded into trees with bounded distortion, depending of the treelength. This provides an alternative view on the last result of [37]. Interestingly, one can easily show that every exact DLS for all those families of graphs needs labels of bits in the worstcase [37]. This can be explained by the fact that such properties as hyperbolicity, treelength, and quasiisometricity to a tree are global (coarse) geometric properties, thus allowing an arbitrary local behavior, and therefore, arbitrary errors for reporting small distances.
An alternative to approximate all distances is to report exact distance only for some subsets of all pairs of nodes. This work was mainly concentrated on reporting all large distances (i.e., distances larger than ) or of all small distances (distances smaller than ) for a threshold . For example, Bollobàs et al. [17] introduced the notion of preserving DLS, which is a DLS that reports exact distances only for pairs of nodes at distance at least (notice also that the existing distance labeling schemes for hyperbolic graphs report large distances with a much better accuracy than small distances for a threshold value related to and ). They presented such labeling schemes with labels of size . This was later improved to and a lower bound of was also provided [4]. For rooted trees, [47] introduced the notion of DLS for short distances, i.e., that reports the distance to the common ancestor, and so the distance, for nodes at distance at most . The best known upper bound for the size of labels of such scheme is [36] and for there is a lower bound of [3].
3.1.2. Routing labeling scheme
Routing is one of the basic tasks that a distributed network must be able to perform. The design of efficient Routing Labeling Scheme (RLS) is a well studied subject. For a general overview of this area, we refer the reader to the book [54]. One trivial way to produce an exact RLS, i.e., a routing via shortest path, is to store a complete routing table at each node of the network. This table specifies, for any destination, the port leading to a shortest path to that destination. This gives an exact RLS with labels of size bits for graphs of maximum degree that is optimal for general graphs [41]. For trees, there exists exact RLS with labels of size [35, 60]. Exact RLS with labels of polylogarithmic size also exist for graphs of bounded treewidth, cliquewidth or chordality [33] and for nonpositively curved plane graphs [26]. For the families of graph excluding a fixed minor (including planar and bounded genus graphs), there is an exact RLS with labels of size [33].
To obtain RLS for general graphs with bits label, one has to abandon the requirement that packets are always routed via shortest paths, and settle instead for the requirement that packets are routed on paths which are close to optimal like the results for DLS [31, 34, 60]. A multiplicative RLS that uses labels of size was obtained in [31], and a multiplicative RLS with labels of size was obtained in [34]. The authors of [60] later improved these results by giving a multiplicative RLS with only bit labels, for every . There are also some results on affine stretch RLS [1].
3.2. Median graphs
Median graphs and related median structures (median algebras and median complexes) have an extensive literature. The term of median graphs was introduced by [52] while the concept have arisen before in works on distributed lattices [16, 7]. These structures have been investigated in several contexts by quite a number of authors for more than half a century. Median structures are still being rediscovered in various disguises and several surveys exist listing their numerous characterizations and their properties [9, 48, 49]. In this subsection we briefly review some characterizations of median graphs and the bijection between median graphs and CAT(0) cube complexes. We also recall some results, related to the subject of this paper, about the distance and shortest path problems in median graphs and CAT(0) cube complexes. For a survey of results on median graphs and their bijections with median algebras, median semilattices, and solution spaces of 2SAT formulae, see [9, 49]. For a comprehensive presentation of median graphs and CAT(0) cube complexes as domains of event structures, see the long version of [20].
3.2.1. Characterizations and properties of median graphs
A median graph is a graph in which every triplet of vertices has a unique median, i.e., a vertex simultaneously lying on shortest paths between any pair of the triplet. It is not immediately clear from the definition, but median graphs are intimately related to hypercubes: median graphs can be obtained from hypercubes by amalgams and median graphs are themselves isometric subgraphs of hypercubes [12, 50]. Even more, by a nice result of Bandelt [8], median graphs are exactly the retracts of hypercubes.
The canonical isometric embedding of a median graph into a (smallest) hypercube can be determined by the so called DjokovićWinkler (“parallelism”) relation on the edges of [32, 63]. For median graphs, the equivalence relation can be defined as follows. First say that two edges and are in relation if they are opposite edges of a cycle in . Then let be the reflexive and transitive closure of . Any equivalence class of constitutes a cutset of the median graph , which determines one factor of the canonical hypercube [50]. The cutset (equivalence class) containing an edge defines a convex split of [50], where and (we call the complementary convex sets and halfspaces). Conversely, for every convex split of a median graph there exists at least one edge such that is the given split. We denote by the equivalence classes of the relation (in [13], they were called parallelism classes). For an equivalence class , we denote by the associated convex split. We say that separates the vertices and if or . Then the isometric embedding of into a hypercube is obtained by taking a basepoint , setting and for any other vertex , letting be all parallelism classes of which separate from .
Notice that this embeddings into a hypercube can be performed for all bipartite graphs for which for every edge , the sets and are convex. In fact, this completely characterizes the graphs isometrically embeddable into hypercubes due to a result of Djoković [32]. The difference between median graphs and general isometric subgraphs of hypercubes is that in median graphs the convex sets are gated (we will provide the simple proof of this folklore result below). Therefore, all halfspaces of a median graph are gated and therefore satisfy the Helly property. In fact, this Helly property of halfspaces characterizes median graphs [51].
In median graphs not only halfspaces are convex (and gated) but also their boundaries are convex [50], where consists of all vertices having a neighbor in . Then clearly and such neighbor of is unique.
3.2.2. Median graphs and CAT(0) cube complexes
Due to the abundance of hypercubes, to each median graph one can associate a cube complex and expect that has strong structural properties. is obtained by replacing every subgraph of which is a hypercube by a solid unit cube of the same dimension. Then can be recovered as the 1skeleton of , i.e., as the graph having the 0cubes of as vertices and the 1cubes of as edges. The cube complex can be endowed with several intrinsic metrics. The intrinsic metric of extends the standard graph metric of . Another important metric on a cube complex is the intrinsic metric defined by letting the distance between two points be equal to the greatest lower bound on the length of the paths joining them. Here a path in from to is a sequence such that any two consecutive points belong to a common cube of . Then endowed with the metric is a geodesic metric space.
An important class of cube complexes studied in geometric group theory and combinatorics is the class of CAT(0) cube complexes. CAT(0) geodesic metric spaces are usually defined via the nonpositive curvature comparison axiom of Cartan–Alexandrov–Toponogov [19]. However for cube complexes (and more generally for cell complexes) the CAT(0) property can be defined in a very simple and intuitive way by the property that geodesics between any two points are unique. CAT(0) spaces can be characterized in several different natural ways and have many strong geometric and topological properties, see for example [19]. Gromov [44] gave a beautiful combinatorial characterization of CAT(0) cube complexes, which can be also taken as their definition: A cube complex endowed with the metric is CAT(0) if and only if is simply connected and whenever three cubes of share a common cube containing and pairwise share common cubes, then they are contained in a –cube of .
We continue with the promised bijection between CAT(0) cube complexes and median graphs established in [24, 57]: Median graphs are exactly the 1skeletons of CAT(0) cube complexes. The proof of this result presented in [24] is based on the following localtoglobal characterization of median graphs: A graph is a median graph if and only if its cube complex is simply connected and satisfies the 3cube condition: if three squares of pairwise intersect in an edge and all three intersect in a vertex, then they belong to a 3cube.
3.2.3. Distance problems in median graphs and CAT(0) cube complexes
Gromov’s characterization was used to show that several cube complexes arising in applications are CAT(0). Billera, Holmes, and Vogtmann [15] proved that the space of trees (encoding all tree topologies with a given set of leaves) is a CAT(0) cube complex. The spaces of trees are particular bouquets (stars) of cubes. Abrams, Ghrist and Peterson [2, 43] considered the continuous space of all possible positions of a reconfigurable system, called a state complex, and showed that in many cases this state complex is CAT(0). Billera et al. [15] formulated the problem of computing the geodesic (the unique shortest path) between two points in the space of trees. In the robotics literature, geodesics in the CAT(0) state complex correspond to the motion planning to get the robot from one position to another one with minimal power consumption. A polynomialtime algorithm for geodesic problem in the space of trees was provided in [53]. A lineartime algorithm for computing distances in CAT(0) square complexes (2dimensional cube complexes) was proposed in [29]. Finally, very recently Hayashi [45] designed the first polynomialtime algorithm for geodesic problem in all CAT(0) cube complexes.
Returning to median graphs, computing the distance or a shortest path between two vertices constitute more tractable problems and, to our knowledge, no special algorithms were designed. If we come to labeling schemes for median graphs, the following is known. First, any median graph on vertices has at most edges, thus its arboricity is at most . As a consequence, median graphs admit adjacency schemes of size per vertex. As we noticed in [28], one factor can be replaced by the dimension of the largest cube of . Compact distance and routing labeling schemes can be obtained for some subclasses of cubefree median graphs. One particular class is that of squaregraphs: these are plane graphs in which all inner vertices have degree . For squaregraphs, distance and routing labeling schemes with labels of size follow from a more general result of [26] for plane graphs of nonpositive curvature. Another such class of graphs is that of partial double trees [10]. Those are exactly the median graphs which can be isometrically embedded into a Cartesian product of two trees and can be characterized as the cubefree median graphs in which all links are bipartite graphs. The isometric embedding of partial double trees into a product of two trees immediately leads to distance labeling schemes with labels. Finally, with a technically involved proof, it was shown in [27] that there exists a constant such that any cubefree median graph with maximum degree can be isometrically embedded into a Cartesian product of at most trees. This immediately shows that cubefree median graph admit distance labeling schemes with labels of length . Compared with the labeling scheme obtained in the current paper, the disadvantage of the labeling scheme is the dependence from the maximum degree of .
However, the situation is even worse for high dimensional median graphs: the paper [27] presents an example of a 5dimensional median graph/CAT(0) cube complex with uniformly bounded degrees which cannot be embedded into a Cartesian product of a finite number of trees. Therefore, for general finite median graphs the function does not exist. This in some sense explains the difficulty of designing polylogarithmic distance labeling schemes for general median graphs. Nevertheless, we do not have any indication to believe that such schemes do not exist.
4. Fibers in median graphs
In this section, we recall the properties of median graphs and of the fibers of their gated subgraphs. They will be used in our labeling schemes and some of them could be potentially useful for designing distance labeling schemes for general median graphs. Since all those results are dispersed in the literature and time, we present them with (usually, short and unified) proofs. To motivate the investigation of fibers, in the next subsection we present two approaches for designing distance schemes in median graphs.
4.1. Two ideas of distance schemes for median graphs
Let be a median graph with vertices. Similarly to trees, one can first envisage the following recursive approach. Let be a median vertex of and for each vertex of let’s keep in its label the distance to . For any neighbor of , the halfspace (which we can call a halfspace at ) contains at most vertices and induces a gated (and thus median) subgraph of . (For a tree and a neighbor of , is the subtree of containing .) Thus, we can recursively call the algorithm to the subgraph induced by each halfspaces at . There are levels of recursion calls, however the size of labels of vertices is no longer polylogarithmic and, even worse, the resulting labels do not provide a distance labeling scheme for . This is due to the fact that, differently from the subtrees of , the halfspaces at are not pairwise disjoint. Therefore, the separation of vertices for which can be computed as or via a recursive call is not longer done via a membership test to different halfspaces.
To circumvent this difficulty, instead of considering the halfspaces at , we can consider the fibers of the star of the median vertex . One can show that is gated, moreover, all fibers are also gated. As a result, the fibers of partition the vertexset of into gated (and thus median) subgraphs of . In case of trees , this is exactly the partition into subtrees of plus the vertex . Since is a median vertex of , each fiber has at most vertices. Consequently, for each vertex of one can keep in its label the distance and make a recursive call to the (gated and thus median) subgraphs induced by the fibers of . This way, each vertex belongs to at most subgraphs occurring in recursive calls, thus the labels of vertices have size . However, this is not yet a distance labeling scheme because the distance between two vertices and belonging to distinct fibers and of is not always . One can show that if the cubes and in spanned by the pairs and intersect only in the vertex , however can be arbitrarily smaller than if and intersect in a cube of dimension . It is not clear how to manage this problem for general median graphs, however the additional properties of fibers of cubefree median graphs established in the next Section 5 allow us to complete this labeling scheme to a distance labeling scheme of size .
4.2. Properties of median graphs
In this subsection we recall some wellknown properties of median graphs.
Lemma 1.
Any median graph satisfies the following quadrangle condition:
For any vertices such that , , and , there is a unique vertex such that .
Proof.
Let be the median of the triplet . Then must be adjacent to and . Since , necessarily . Since any vertex adjacent to and having distance to is a median of , we conclude that , concluding the proof. ∎
The following result is a particular case of the localtoglobal characterization of convexity and gatedness in weakly modular graphs established in [23]:
Lemma 2.
For a median graph and a subset of vertices of , the following properties are equivalent:

is connected and is locally convex, i.e., if and , then ;

is convex;

is gated.
Proof.
(i)(ii): Let and be any two vertices of . We show that by induction on the distance between and in . If , then the property holds by local convexity of . Let and suppose that for any two vertices such that . Pick any vertex . Let be the neighbor of on a shortest path of passing via . Let also be the neighbor of on a shortest path of . Since , by induction hypothesis, . Since is bipartite and , . If , then and we are done. Now, let and . By quadrangle condition there exists a vertex at distance from . Since and , by local convexity of we deduce that belongs to . Since , by induction hypothesis, . Since , belongs to and we are done.
(ii)(iii): Assume by way of contradiction that is convex but not gated. Then there exists a vertex which does not have a gate in . Let be a closest to vertex of . Since is not the gate of , there exists a vertex such that . Let be the median of the triplet . Since , . Since and is convex, belongs to . Since and , , contrary to the choice of .
(iii)(i): Any gated set induces a connected subgraph. To prove that a gated set is locally convex, pick with and a common neighbor of . If , then obviously does not have a gate in because and . ∎
4.3. Properties of fibers in median graphs
We continue with properties of stars and fibers of stars of median graphs.
Combinatorially, the stars of median graphs may have quite an arbitrary structure: by a result of [12], there is a bijection between the stars of median graphs and arbitrary graphs. Namely, given an arbitrary graph , the simplex graph of has a vertex for each clique of (i.e., empty set, vertices, edges, triangles, etc.) and two vertices and are adjacent in if and only if the cliques and differ only in a vertex. It was shown in [12] that the simplex graph of any graph is a median graph. Moreover, one can easily show that the star in of the vertex coincides with the whole graph . Viceversa, any star of a median graph can be realized as the simplex graph of the graph having the neighbors of as the set of vertices and two such neighbors of are adjacent in if and only if belong to a common square of .
Next, we consider stars of median graphs from the metric point of view.
Lemma 3.
For any vertex of a median graph , the star is a gated subgraph of .
Proof.
We will only sketch the proof (for a complete proof, see Theorem 6.17 of [21] and its proof for a more general class of graphs). By Lemma 2 it suffices to show that is locally convex. Let be two vertices at distance two and let . Then and are two cubes of . We can suppose without loss of generality that . This implies that , i.e., we can suppose that and . By quadrangle condition, there exists such that and . Necessarily is a cube included in the cubes and . Therefore has a neighbor such that is a cube disjoint from and which together with gives . Analogously, has a neighbor such that is a cube disjoint from and which together with gives . By quadrangle condition there exists at distance to . Then one can show that induces a cube, which together with the cubes and define the cube . This establishes that belongs to . ∎
The following property of median graphs is also wellknown in more general contexts. The graphs satisfying this property are called fibercomplemented [22].
Lemma 4.
For any gated subgraph of a median graph , the fibers , are gated.
Proof.
Each fiber induces a connected subgraph of , thus it suffices to show that is locally convex. Pick with and let be any common neighbor of and . Suppose by way of contradiction that for . Then and . This implies in particular that , , and . By quadrangle condition, there exists , one step closer to than and . Then and by quadrangle condition there exists a vertex one step closer to than and . But then the vertices induce a , which is a forbidden subgraph of median graphs. ∎
Corollary 1.
For any vertex of a median graph , the fibers of the star are gated.
Since edges of a median graph are gated, applying Lemma 4 for edges of , we obtain:
Corollary 2.
For any edge of a median graph , the halfspaces and are gated.
That the halfspaces of a median graph are convex was established first by Mulder [50]. He also proved that the boundaries of halfspaces are convex (the boundary of the halfspace is the set ). We will prove this property for boundaries of fibers of arbitrary gated subgraphs of a median graph.
Let be a gated subgraph of a median graph and let be the partition of into the fibers of . We will call two fibers and neighboring (notation ) if there exists an edge of with one end in and another end in . If and are neighboring fibers of , then denote by the set of all vertices having a neighbor in and call the boundary of relative to .
Lemma 5.
Let be a gated subgraph of a median graph . Two fibers and of are neighboring if and only if . If , then the boundary of relative to induces a gated subgraph of of dimension .
Proof.
If , then clearly . Conversely, suppose that , i.e., there exists an edge of such that and . Since and are convex and is bipartite, necessarily and . Since and is gated, we deduce that and . From all this we conclude that and that . This establishes the first assertion.
To prove the second assertion, let and we have to prove that is gated. First by induction on , we can show that for any vertex of . For this it suffices to show that any neighbor of in belongs to . Let be the neighbor of in . Then , , and , thus by quadrangle condition there exists a vertex at distance from . Since , we conclude that . Thus , yielding that the subgraph induced by is connected.
By Lemma 2 it remains to show that is locally convex. Pick at distance two and let . Since is convex, . Let and be the neighbors of and , respectively, in . Let be the gate of in (by Lemma 4, is gated). Since (because is bipartite) and , we conclude that is adjacent to and . Hence , yielding . This finishes the proof that is gated. If , then contains a dimensional cube . Then the neighbors in of induce a cube . But then together with induce a cube of , a contradiction. Thus . ∎
For a vertex of a gated subgraph of and its fiber , the union of all boundaries over all , is called the total boundary of the fiber and is denoted by . The boundaries constituting are called branches of .
Lemma 6.
Let be a gated subgraph of a median graph of dimension . Then the total boundary of any fiber of does not contain dimensional cubes.
Proof.
Suppose by way of contradiction that contains a dimensional cube . Since is a gated subgraph of , we can consider the gate of in and the furthest from vertex of (this is the vertex of opposite to ). Denote this furthest from vertex of by . Suppose that . Since is gated (Lemma 5) and , is included in the boundary . This contradicts Lemma 5 that has dimension . ∎
Lemma 7.
Let be a gated subgraph of a median graph . Then the total boundary of any fiber of is an isometric subgraph of .
Proof.
Pick , say and . Let be the median of the triplet . Since we deduce that . Analogously, we can show that . Since and , the vertices and can be connected in by a shortest path passing via . ∎
We conclude this section with an additional property of fibers of stars of median vertices of . Recall, that is a median vertex of if minimizes the function
Lemma 8.
Let be a median vertex of a median graph with vertices. Then any fiber of the star of has at most vertices.
Proof.
Suppose by way of contradiction that for some vertex . Let be a neighbor of in . If , then and , and we conclude that . Consequently, , whence . Therefore . But this contradicts the fact that is a median of . Indeed, since , one can easily show that . ∎
Unfortunately, the total boundary of a fiber does not always induce a median subgraph. Therefore, even if is an isometric subgraph of of dimension , one cannot recursively apply the algorithm to the subgraphs induced by the total boundaries . However, if is 2dimensional (i.e., is cubefree), then the total boundaries of fibers are isometric subtrees of and one can use for them distance and routing schemes for trees. Even in this case, we still need an additional property of total boundaries, which we will establish in the next section.
5. Fibers in cubefree median graphs
In this section, we establish additional properties of fibers of stars and of their total boundaries in cubefree median graphs . Using them we can show that for any pair of vertices of , the following trichotomy holds: the distance either can be computed as , or as the sum of distances from to appropriate vertices of plus the distance between in , or via a recursive call to the fiber containing and .
5.1. Classification of fibers
From now on, let be a cubefree median graph. Then the star of any vertex of is the union of all squares and edges containing . Specifying the bijection between stars of median graphs and simplex graphs of arbitrary graphs mentioned above, the stars of cubefree median graphs correspond to simplex graphs of trianglefree graphs.
Let be an arbitrary vertex of and let denote the partition of into the fibers of . We distinguish two types of fibers: the fiber is called a panel if is adjacent to and is called a cone if has distance two to . The interval is the edge if is a panel and is a square if is a cone. In the second case, since and are the only neighbors of in , by Lemma 5 we deduce that the cone is adjacent to the panels and and that is not adjacent to any other panel or cone. By the same lemma, any panel is not adjacent to any other panel, but is adjacent to all cones such that the square contains the edge . For an illustration, see Figure 4.
5.2. Total boundaries of fibers are quasigated
For a set , an imprint of a vertex on is a vertex such that . Denote by the set of all imprints of on . The most important property of imprints is that for any vertex , there exists a shortest path passing via an imprint, i.e., that . Therefore, if the set has constant size, one can store in the label of the distances to the vertices of . Using this, for any , one can compute as . Note that a set is gated if and only if any vertex has a unique imprint on . Following this, we will say that a set is gated if for any vertex , . In particular, we will say that a set is quasigated if for any vertex . The main goal of this subsection is to show that the total boundaries of fibers are quasigated.
Let be a tree with a distinguished vertex in . The vertex is called the root of and is called a rooted tree. We will say that a rooted tree has gated branches if for any vertex of the unique path of connecting to the root is a gated subgraph of .
Lemma 9.
For every fiber of a star of a cubefree median graph , the total boundary is an isometric tree with gated branches.
Comments
There are no comments yet.