We consider the problem of embedding undirected graphs G = (V, E) with n vertices of maximum degree 4 (4-graphs) into rectangular grids. The problems of minimizing the grid area (Kramer and van Leeuwen, 1984; Formann and Wagner, 1991) as well as minimizing the total number of bends are NP-hard (Storer, 1984). It is well known that such a graph can be embedded in a rectangular grid with at most 2n columns and 2n rows such that any edge is embedded with at most 5 bends (Lengauer, 1990, p. 249). We present an /oO(n2)-algorithm constructing an embedding for arbitrary 4-graphs with n vertices in a rectangular grid with at most 2n columns and 2n rows bending every edge at most twice. Note that two is a lower bound on the maximum number of bends per embedded edge since the graph K5 cannot be embedded with less than 2 bends per embedded edge. © 1995.
Schäffter, M. (1995). Drawing graphs on rectangular grids. Discrete Applied Mathematics, 63(1), 75–89. https://doi.org/10.1016/0166-218X(94)00020-E