# Tech Report CS-94-10

## On the Computational Complexity of Upward and Rectilinear Planarity Testing

### Ashim Garg and Roberto Tamassia

#### March 1994

### Abstract:

A directed graph is said to be upward planar if it can be drawn in the plane such that every edge is a monotonically increasing curve in the vertical direction, and no two edges cross. An undirected graph is said to be rectilinear planar if it can be draw in the plane such that every edge is a horizontal or vertical segment, and no two edges cross. Testing upward planarity and rectilinear planarity are fundamental problems in the effective visualization of various graph and network structures. For example, upward planarity is useful for the display of order diagrams and subroutine-call graphs, while rectilinear planarity is useful for the display of circuit schematics and entity-relationship diagrams. In this paper we show that upward planarity testing and rectilinear planarity testing are NP-complete problems. We also show that it is NP-hard to approximate the minimum number of bends in a planar orthogonal drawing of an $n$-vertex graph with an $O(n^{1-\epsilon})$ error, for any $\epsilon> 0$.

(complete text in pdf or gzipped postscript)