• Keine Ergebnisse gefunden

Drawings with Uniform Edge Lengths

Im Dokument Constrained Graph Drawing (Seite 77-82)

Angles and Distances

4.3 Drawings with Uniform Edge Lengths

Orthogonal-order preserving equal edge lengths drawing problem:

Given a graph in the plane, we want to decide whether we can draw each edge with length 1 changing neither the horizontal nor the vertical order of the edges’ vertices.

The constraint that all edges have equal length, w.l.o.g. length 1, may also be exploited to force some of them to be drawn horizontally or vertically. We can use the concept of linking edges like in the previous sections. Edge ei in Fig. 4.14 forces ej to be drawn horizontally because otherwise ej would not be short enough to have the same length as ei. We can also define decision units.

In the example in Fig. 4.15 the path P = (e1, e2, e3) of literal edges must have length 3 and the only possibility of achieving this is to draw the framing edges horizontally and vertically to give the path the room of a 1×2-rectangle in which the longest possible path monotone in x1- and x2- direction has length 3. It is easy to see that one edge of P must be drawn horizontally and the other two edges vertically.

Let a horizontal decision unit be a 3-edge-path monotone in x1- and x2 -direction contained within a 1 ×2-rectangle while a vertical decision unit is also a 3-edge-path monotone in x1- and x2- direction, but contained within a 2×1-rectangle.

Figure 4.16: The union of paths for the instanceI from Sect. 4.1.1

4.3.1 Unions of Paths

We now use these edge-dependency elements to create a gadget for a given instance of MONOTONE 3-SAT to prove the following theorem:

Theorem 14. The orthogonal-order preserving equal edge lengths drawing prob-lem is N P-hard for unions of paths.

The proof is analogous to Sect. 4.2.1. Figure 4.16 shows a union of paths that has a valid drawing if and only if I is satisfiable.

4.3.2 Single Path

Theorem 15. The orthogonal-order preserving equal edge lengths drawing prob-lem is N P-hard for paths.

Connecting the gadgets to show N P-hardness also for paths is a little bit more complicated then in the previous models. The total lengths of the path-segments connecting the gadgets for the clauses and links are restricted by their count of edges, while the gadgets itself may slightly change their relative position for different direction assignments for the neighbored edges (see Fig. 4.17). We will use path-segments that have flexible rages-sizes to counterbalance this.

(a) (b) (c) Figure 4.17: Difference in relative position

copy

copy intraclause links

(a) basic situation (b) total ordering

Figure 4.18: Intraclause links

To reduce the number of cases, we copy the decision units such that each copy has exactly one link to one copy of another decision unit. The copies are placed diagonally next to each other and linked such that each copy has to be drawn equally (see Fig. 4.18). Figure 4.19 shows one example for two decision units, the corresponding link and a connector that can be used to connect gadgets lying above or under these decision units. The initial situation is shown in Fig. 4.19(a). Figure 4.19(b) and 4.19(c) show how the connecting path-segments adapt for the different relative positions of the decision units and the link. The connected path is drawable if and only if the union of paths was drawable. The orthogonal-order preserving equal edge lengths drawing problem isN P-hard also for paths. Totally ordered vertices can be achieved analogously to the strategy in the previous sections.

(a)

(b) (c)

Figure 4.19: Flexible connection

Chapter 5 Directions

Thetrajectory drawing problem (TDP) generalizes and unifies several well-known others. The input consists of a set of paths, called trajectories, and the task is to determine a (straight-line) drawing such that each trajectory has a certain shape.1 Here we consider versions of the following natural shape requirement:

Definition 1 (Strictly Monotone Trajectory Drawing Problem). Given a set of vertices V and a set of paths P where each path is a sequence of vertices in V. Find geometric positions for the vertices such that each path is strictly monotone increasing in some direction.

Note that strict monotonicity excludes the degenerate solution with all ver-tices in the same position. It also implies that paths do not self-intersect, so that the problem is related to simultaneous graph drawing (Brass, Cenek, Dun-can, Efrat, Erten, Ismailescu, Kobourov, Lubiw, and Mitchell, 2003). While it is more general by allowing partial paths, it is more restrictive because of the direction requirement.

The problem reduces to acyclicity testing if only one direction is allowed.

However, it is already N P-hard for two opposing directions (or, equivalently, if a subset of the paths may be reversed), even for paths of length two (Opatrny, 1979). One might hope that more dimensions and additional directions ease the problem, but we will show that this is not the case.

An important special case is known as internal preference scaling (a vari-ation of matrix biplots (Gabriel, 1971)), where all paths are Hamiltonian and represent complete rankings of individual preferences among a set of items. The typical approach here consists of rank-two approximations of the subject-by-item matrix of ranks using singular value decomposition. While many variations of

1The problem originates from the Dagstuhl Seminar 08191, where it was formulated to-gether with Stephen G. Kobourov, Anna Lubiw, and Dorothea Wagner in response to a chal-lenge from Stephen P. Borgatti. We thank all of them for their valuable input.

the problem have been studied (for an overview see, e.g., Heiser and de Leeuw (1981)), we are unaware of the status of the decision problem.

One may also be reminded of the dimensionality problem for partial orders (which can be decided in polynomial time for one or two dimensions, but is hard for three or more (Yannakakis, 1982)), but we could not establish any relevant correlation.

Furthermore, the TDP is closely related to drawing monotone supports for hypergraphs (Sect. 6.1.1).

We prove that the TDP is N P-hard for the practical cases in which admis-sible directions are either the coordinate axes or unrestricted in two, three or d dimensions. Interesting variants of the problem include restriction to pairwise linearly independent directions and more general shapes. For instance, in the unimodal TDP, paths have to be drawn such that a prefix is strictly increasing and the remaining postfix is strictly decreasing along some direction, where pre-and postfix may be empty. The corresponding ordering problem for one direction can be decided in linear time (Kosub, Maaß, and T¨aubig, 2006).

Im Dokument Constrained Graph Drawing (Seite 77-82)