
A poset-based approach to embedding median graphs in hypercubes and lattices Christine T. Cheng∗ Department of Computer Science University of Wisconsin{Milwaukee Email: [email protected] July 7, 2010 Abstract A median graph G is a graph where, for any three vertices u; v and w, there is a unique node that lies on a shortest path from u to v, from u to w, and from v to w. While not obvious from the definition, median graphs are partial cubes; that is, they can be isometrically embedded in hypercubes and, consequently, in integer lattices. The isometric and lattice dimensions of G, de- noted as dimI (G) and dimZ (G), are the smallest integers k and r so that G can be isometrically embedded in the k-dimensional hypercube and the r-dimensional lattice respectively. Motivated by recent results on the cover graphs of distributive lattices, we study these parameters through median semilattices, a class of ordered structures related to median graphs. We show that not only does this approach provide new combinatorial characterizations for dimI (G) and dimZ (G), they also have nice algorithmic consequences. Assume G has n vertices and m edges. We prove that dimI (G) can be computed in O(n + m) time and an isometric embedding of G on a hypercube with dimension dimI (G) can be constructed in O(n × dimI (G)) time. The algorithms are extremely simple and the running times are optimal. We also show that dimZ (G) can be computed and an isometric embedding 2:5 of G on a lattice with dimension dimZ (G) can be constructed in O(n × dimI (G) + dimI (G) ) time by using an existing algorithm of Eppstein's that performs the same tasks for partial cubes. We are able to speed up his algorithm by using our framework to provide a new \interpretation" to the algorithm. In particular, we note that its main part is essentially a generalization of Fulkerson's method for finding a smallest-sized chain decomposition of a poset. ∗Supported by NSF Award No. CCF-0830678. 1 1 Introduction A median graph is a graph where, for any three vertices u; v and w, there is a unique node that lies on a shortest path from u to v, from u to w, and from v to w. For example, trees and hypercubes are median graphs. Median graphs have been studied extensively ([15, 2, 17]) and arise quite naturally in practice. It is known, for instance, that the solutions of a (solvable) 2-satisfiability instance with no equivalent variables as well as the stable matchings of a (solvable) stable roommates problem form median graphs [11, 5]. We say that a graph G is an isometric subgraph of another graph H (or G can be isometrically embedded in H) if there is a function α : V (G) ! V (H) that is distance-preserving; that is, for any two vertices u and v, dG(u; v) = dH (α(u); α(v)). Graphs which can be isometrically embedded in a hypercube are called partial cubes. While not obvious from the definition, median graphs are in fact partial cubes, and it is this property that is of interest to us. When G is a partial cube, the isometric dimension of G, dimI (G), is the smallest dimension k so that G is an isometric subgraph of Qk, the k-dimensional hypercube. Since partial cubes can also be isometrically embedded in integer lattices, the lattice dimension of G, dimL(G), is defined as the smallest dimension r so that G is an isometric subgraph of Zr, the r-dimensional lattice. For example, when T is a tree with n vertices and l leaves, dimI (T ) = n−1 while dimZ (T ) = dl=2e [19]. We shall say that an isometric hypercube or lattice embedding of G is optimal if it is embedded in a hypercube or a lattice whose dimension is equal to dimI (G) or dimZ (G) respectively. Recently, together with a colleague I. Suzuki [6], we proved that when L is a distributive lattice, H(L) its Hasse diagram, and G(L) its cover graph, dimI (G(L)) is equal to the diameter of G(L) while dimZ (G(L)) is equal to the maximum outdegree of H(L). Cover graphs of distributive lattices form a small subclass of median graphs. Yet, as we shall show, the techniques we used for them generalizes in a straightforward fashion to median graphs. Consequently, we obtain new characterizations for the isometric and lattice dimensions of a median graph. These results in turn lead to simpler if not faster algorithms that compute these dimensions and embed the graph in a hypercube and in a lattice with the said dimensions. A fundamental result in distributive lattices is Birkhoff's representation theorem [4] which implies that every distributive lattice L can be encoded by its subposet of join-irreducible elements PL; in particular, every element of L can be represented by a subset of join-irreducible elements of the lattice. Our main insight is that every chain decomposition of PL of size r gives rise to an isometric lattice embedding of G(L) in Zr. In [1], Avann noted that median graphs are intimately related to a class of of posets called median semilattices, which are generalizations of distributive lattices. In particular, if we start with a median graph and one of its node u, transform the graph into a directed graph by directing all its edges away from u (i.e., if vw is an edge, direct the edge from v to w when u is closer to v than to w), then the directed graph is the Hasse diagram of a median semilattice. Results similar to Birkhoff's theorem exist for median semilattices [3, 5]; we use the one found in [5]: for every ∗ median semilattice M, there is also a poset PM constructed from the join-irreducible elements ∗ of M that encodes M. What makes PM different from PL is that each join-irreducible element ∗ of M is represented by two elements in PM. To generalize the embedding result for distributive ∗ lattices, we shall use a special type of chain decomposition of PM, which we refer to as a twin chain decomposition, and show that such a decomposition gives rise to an isometric lattice embedding of the cover graph of M in Zr, where r is again the size of the twin chain decomposition. Current approaches to obtaining an optimal isometric hypercube or lattice embedding for me- dian graphs and partial cubes rely on a very different tool: the Djokovi´c-Winklerrelation Θ on the the edge set of a graph [9, 21], where two edges uv and u0v0 are related if and only if 2 d(u; u0) + d(v; v0) 6= d(u; v0) + d(u0; v). It is known that when G is a partial cube, Θ is an equiv- alence relation on E(G), and dimI (G) = jE(Θ)j, where E(Θ) contains all the equivalence classes induced by Θ. Once E(Θ) has been computed, it is easy to construct an optimal isometric hyper- cube embedding of G (that is, assign each vertex of G a point of QdimI (G)) in O(n × dimI (G)) time (see step 4 of Algorithm 2.2. in [15] for example).1 For median graphs, the fastest algorithms for computing E(Θ) is due to Hagauer, et.al. [14] and Imrich and Klavzar [15]. The first one is a recur- sive algorithm while the second one involves the listing of all the squares (i.e., 4-cycles) of a median graph. Both algorithms take O(m log n) time. Thus, the current fastest algorithm for constructing an optimal isometric hypercube embedding for a median graph takes O(m log n + n × dimI (G)) time. Eppstein [10] was the first to show that the lattice dimension of a partial cube and an optimal isometric lattice embedding of a the partial cube can be computed in polynomial time. Given G and an optimal isometric hypercube embedding of G, the algorithm first constructs what Eppstein calls the semicube graph of G, Sc(G). It then finds a maximum matching Fmax of Sc(G) and transforms this matching into a set of paths. These paths are then used to construct an optimal isometric lattice embedding of G. Eppstein proved that dimZ (G) = dimI (G) − jFmaxj, which is also the 2 number of paths generated from Fmax. Eppstein's algorithm runs in O(n × dimI (G) ) time. While faster algorithms for trees exist [16], the best one for median graphs is still Eppstein's algorithm. We are ready to describe our main results. Let us now assume that G is a median graph with n vertices and m edges. Let M(G) be the median semilattice derived from G and one of its nodes u. Let k^ denote the number of join-irreducible elements of M(G) andr ^ the size of a smallest twin ∗ chain decomposition of PM(G). It is known that m ≤ n log2 n and log2 n ≤ dimI (G) ≤ n [15]. ^ • First, we prove that dimI (G) = k. Additionally, we show that the join-irreducible elements of M(G) can be identified and, therefore, counted in O(n + m) time and that G can be ^ isometrically embedded in Qk^ in O(nk) time. The running times are not only optimal but the algorithms themselves are extremely simple { the first one consists of a single run of BFS (the breadth-first search algorithm) together with some post-processing while the second one requires an additional step of topological sorting.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages13 Page
-
File Size-