Visualization of bipartite graphs in limited window size

Acta Informatica, Apr 2025

Bipartite graphs are commonly used to visualize objects and their features. An object may possess several features and several objects may share a common feature. The standard visualization of bipartite graphs, with objects and features on two (say horizontal) parallel lines at integer coordinates and edges drawn as line segments, can often be difficult to work with. A common task in visualization of such graphs is to consider one object and all its features. This naturally defines a drawing window, defined as the smallest interval that contains the x-coordinates of the object and all its features. We show that if both objects and features can be reordered, minimizing the average window size is NP-hard. However, if the features are fixed, then we provide an efficient polynomial-time algorithm for arranging the objects, so as to minimize the average window size. Finally, we introduce a different way of visualizing the bipartite graph, by placing the nodes of the two parts on two concentric circles. For this setting we also show NP-hardness for the general case and a polynomial-time algorithm when the features are fixed.

Article PDF cannot be displayed. You can download it here:

https://link.springer.com/content/pdf/10.1007/s00236-025-00483-1.pdf

Visualization of bipartite graphs in limited window size

Acta Informatica (2025) 62:19 https://doi.org/10.1007/s00236-025-00483-1 RESEARCH Visualization of bipartite graphs in limited window size Alon Efrat1 · William Evans2 · Kassian Köck3 · Stephen Kobourov4 · Jacob Miller4 Received: 2 May 2024 / Accepted: 26 February 2025 © The Author(s) 2025 Abstract Bipartite graphs are commonly used to visualize objects and their features. An object may possess several features and several objects may share a common feature. The standard visualization of bipartite graphs, with objects and features on two (say horizontal) parallel lines at integer coordinates and edges drawn as line segments, can often be difficult to work with. A common task in visualization of such graphs is to consider one object and all its features. This naturally defines a drawing window, defined as the smallest interval that contains the x-coordinates of the object and all its features. We show that if both objects and features can be reordered, minimizing the average window size is NP-hard. However, if the features are fixed, then we provide an efficient polynomial-time algorithm for arranging the objects, so as to minimize the average window size. Finally, we introduce a different way of visualizing the bipartite graph, by placing the nodes of the two parts on two concentric circles. For this setting we also show NP-hardness for the general case and a polynomial-time algorithm when the features are fixed. 1 Introduction Bipartite graphs arise in many applications and are usually visualized with 2-layer drawings, where vertices are drawn as points at integer coordinates on two distinct parallel lines, and edges are straight-line segments between their endpoints. Such drawings occur as components B Jacob Miller Alon Efrat William Evans Kassian Köck Stephen Kobourov 1 Department of Computer Science, University of Arizona, Tucson, Arizona, USA 2 Dept. of Computer Science, University of British Columbia, Vancouver, Canada 3 Department of Computer Science, University of Passau, Passau, Germany 4 Technical University of Munich, Munich, Germany 0123456789().: V,-vol 123 19 Page 2 of 18 A. Efrat et al. in layered drawings of directed graphs [23] and also as final drawings, e.g., in tanglegrams for phylogenetic trees [7, 14]. A common task in the exploration of such bipartite graphs G = (P ∪ C, E), where P is the set of parent (object) vertices and C is the set of child (feature) vertices, is to identify the neighbors (children) of a parent vertex of interest. A typical approach is to click on this parent and highlight the edges to its children, while hiding/shading the rest of the graph. Naturally, it is desirable that the highlighted edges fit in the display. This motivates work on placing the vertices at integer coordinates so as to minimize the maximum window, i.e. the smallest x-interval that contains a parent and all its children, over all parents. Bekos et al. [5] show that minimizing the maximum window size can be solved efficiently when the children C are fixed and the parents P can be placed, and is NP-hard when the parents are fixed and the children can be placed. Note that this asymmetry is due to the windows being defined only for parents P. As a side effect of the underlying greedy approach, the algorithm of Bekos et al. [5] often results in a much larger than optimal average window size in order to minimize the max window. So if the max window exceeds the display size, many parents may have windows that exceed that size. In this paper, we instead consider the problem of minimizing the average window size. While related to the minimal maximum window of Bekos et al. [5], the algorithms and reductions do not trivially extend to the setting of average window size. We also introduce the 2-ring drawing variant of the problem, where instead of two lines on which to place vertices, one uses two circles. Unlike our approach, methods for constructing 2-layer drawings often try to minimize the number of edge crossings, which is an NP-hard problem even when the order of one layer is fixed [13]. Vertex splitting provides another alternative approach to reduce the number of crossings, by replacing some vertices on one layer by multiple copies and distributing incident edges among these copies [12]. In bipartite graphs arising in domain applications, such as visualizing relationships between anatomical structures and cell types in the human body [8], vertex splitting makes sense only on one side of the layout. Several variants of optimizing such layouts have been recently studied [2, 3, 21]. Formally, the input consists of a bipartite graph G = (P ∪ C, E). The output is a 2-layer drawing of G in which the vertices in P and in C are located at distinct integer coordinates on two parallel lines  P and C , respectively (w.l.o.g.,  P : y = 1 is the parent layer and C : y = 0 is the child layer). The drawing is specified by a function x : P ∪C → Z≥0 which defines the x-coordinate of each vertex in the drawing. No two parents can have the same x-coordinate and neither can two children; so x is injective when restricted to P or C. The objective is to minimize the average window size of the parents in the drawing (defined by) x. The window w( p) of a parent p ∈ P is the smallest x-interval that contains the locations of p and its neighbors (children) in G. Its size is its length, i.e., maxa,b∈S |x(a) − x(b)| where S = {c | ( p, c) ∈ E} ∪ { p}. Note that the smallest window size is 0 for a parent with no children or one child that shares its parent’s x-coordinate. The span s( p) of a parent p ∈ P is the smallest x-interval that contains the children of p (s( p) ⊆ w( p)). Motivated by common assumptions in layered graph drawing [4, 18] we consider two variants: one when we can choose the x-coordinates of the vertices of both P and C and the other when the x-coordinates of one of them is fixed. The Minimum Average Window Problem takes as input a graph G = (P ∪ C, E) and a value σ and determines if G has a drawing in which the average window size of the parents is at most σ . We focus on the equivalent Minimum Window Sum Problem (MWS) which determines if the sum of the window sizes can be at most some given Σ. We also consider the same problem when the drawing maps parents and children to two concentric circles: parents to the inner circle and children to the outer circle. A 2-ring 123 Visualization of bipartite graphs in limited window size Page 3 of 18 19 Fig. 1 An even cycle represented using a 2-layer drawing with minimum total window sum 14 and using a 2-ring drawing with minimum total window sum 8 drawing of G is specified by an integer size r ≥ 0 and a function x : P ∪ C → Zr (the integers mod r ) which determines the locations of the vertices: The polar coordinates for 2π p ∈ P are (1, 2π r x( p)) and for c ∈ C are (2, r x(c)). Again, we require x to be injective when restricted to P or C (so |P|, |C| ≤ r ). The distance between two vertic (...truncated)


This is a preview of a remote PDF: https://link.springer.com/content/pdf/10.1007/s00236-025-00483-1.pdf
Article home page: https://link.springer.com/article/10.1007/s00236-025-00483-1

Efrat, Alon, Evans, William, Köck, Kassian, Kobourov, Stephen, Miller, Jacob. Visualization of bipartite graphs in limited window size, Acta Informatica, 2025, pp. 1-18, Volume 62, Issue 2, DOI: 10.1007/s00236-025-00483-1