scribe - UBC Computer Science

CPSC 536: RECTANGULAR CONTACT REPRESENTATIONS
SCRIBE: KRISTINA NELSON
1. Rectangular Contact Representations
A rectangular graph is a planar graph with rectilinear edges and four-sided (rectangular)
faces. We will also require that the graph be a tiling of some containing rectangle (so that
is outer face is again a rectangle). Given such a graph we can then obtain its rectangular
dual by interpreting the rectangles as vertices and their contacts as edges. We refer to this
dual as a rectangular contact representation of G [1].
Figure 1. A rectangular graph (left) with dual overlaid (right).
Observe that if a graph G’s rectangular contact representation has only ‘T ’-corners, then
G itself must be a triangulation. We will consider only graphs of this form.
The general problem is to find a rectangular contact representation / dual of a given
graph with the constraint that all rectangles must fit tile some larger rectangle. We will
also seek representations with 4 bounding rectangles (as in figure 2), this corresponding
to an outer 4-cycle in the original graph and simplifies the dual (eg. removes the risk of
double edges).
1
2
SCRIBE: KRISTINA NELSON
Figure 2. An example rectangular contact representation with 4 bounding rectangles
Theorem: A planar triangulation G has a rectangular dual with 4 bounding rectangles
if and only if G is a 4-connected with an outer 4-cycle.
We use that for a planar triangulation, being 4-connected is equivalent to having no
separating triangle.
Proof: For the forward direction simply consider taking the dual of any rectangular
contact representation. Immediately the outer 4 rectangles become an outer 4-cycle. A
rectangle contact representation can have no separating triangle (of rectangles) and so,
since G a triangulation, we have 4-connectedness.
The reverse direction is more complex. The general idea is to:
(1) construct a regular edge labelling (REL, see below for definition).
(2) construct a rectangular dual from the regular edge labelling.
(For a more detailed presentation of the algorithm and its correctness see [2])
Definition: a regular edge labelling is a colouring (red/blue) and orientation of edges of
G such that:
(i) for every interior vertex v ∈ V we have the following edge configuration (at least one
edge appearing of each type):
(ii) While outer vertices have all edges conforming to:
CPSC 536: RECTANGULAR CONTACT REPRESENTATIONS
3
Step 1: Use a ‘super’ canonical ordering to get a regular edge labelling:
If G is a 4-connected, planar triangulation with u, v, w as the outer face then there exists
a numbering of the vertices v1 = u, v2 = v, ..., vn = w such that:
(i) Gk−1 (i.e the graph G with vertices {v1 , .., vk } already removed) is biconnected and
bounded by outer cycle Ck−1 with edge (u, v) on it.
(ii) vk is in the exterior face of Gk−1 , neighbours of vk in Gk−1 are consecutive on Ck−1
and if k ≤ n − 2 then vk has ≥ 2 neighbours in G − Gk−1 .
Figure 3. an example partially constructed super canonical ordering
If we have a 4-cycle as the outer face we can add one more to give ourselves a 3-cycle
and then run the above canonical ordering on that (afterwards deleting the excess node).
Once all nodes have been numbered direct the edges so that all run from low to high:
4
SCRIBE: KRISTINA NELSON
Figure 4. example graph with canonical ordering and corresponding directions applied to all edges
Now we begin colouring the edges. Consider any node and all its incoming neighbours.
A base edge (grey) is the incoming edge from the (incoming) neighbour with smallest
canonical number. A left edge (blue) is the left-most outgoing edge, and a right edge (red)
naturally the right-most outgoing edge.
Figure 5. our example graph now with coloured edges
CPSC 536: RECTANGULAR CONTACT REPRESENTATIONS
5
Claim: every edge is named and interior edges are uniquely named.
Now we wish to turn our red-blue-grey colouring into a proper REL. We do by recolouring
the grey edges purple and turquoise. Note that there can (by definition) be only 1 base
edge incoming to each node, if it is to the right of a blue outgoing edge we label it purple,
and if it is to the left of a red outgoing edge turquoise. (Implicitly we are claiming there
will be no contradictions here).
Figure 6. the graph now fully blue (&turquoise) and red (&purple) coloured
We now claim that the Red+Violet and Blue+Turquoise edges form our REL. From this
we construct 2 st-graphs (each st-graph being simply all edges of one colour plus a single
edge running through the outer face, see figure 7). We then take the dual of each st-graph
(figure 8) with the direction of the dual edges as shown in the figure.
Step (2) (finally) is to construct a rectangular dual from the REL:
(i) assign the longest path distance (from the left/bottom outer face) to each dual node.
(ii) use these distances to assign coordinates to our rectangles (see figure 10)
6
SCRIBE: KRISTINA NELSON
Figure 7. the st-graphs corresponding to our example graph
Figure 8. the st-graphs with their duals overlaid
CPSC 536: RECTANGULAR CONTACT REPRESENTATIONS
Figure 9. the st-duals with vertices now labelled according to distance
from the left/bottom outer face
7
8
SCRIBE: KRISTINA NELSON
Figure 10. st-node/rectangle coordinate assignment based on face numbering of the st-duals
Figure 11. the completed rectangle contact representation of our graph
CPSC 536: RECTANGULAR CONTACT REPRESENTATIONS
9
References
[1] Stefan Felsner, Rectangle and Square Representations of Planar Graphs. Institut fr Mathematik,
Technische Universitt Berlin.
[2] Goos Kant, Xin He, Two algorithms for finding rectangular duals of planar graphs. Department of
Computer Science, Utrecht University, 1994.