TU Wien:Graph Drawing Algorithms VU (Nöllenburg)/Zusammenfassung 2024S
Introduction[Bearbeiten | Quelltext bearbeiten]
This is a summary of the Graph Drawing Algorithms lecture by Nöllenburger. It covers all topics presented in the lecture and tries to explain concepts in somewhat "plain" English that were only shown with drawings or math on the slides. In general my colleague and I tried to translate some of the unnecessarily complex language to a version that lends itself better to memorization. We also skipped some things (eg. a few proofs) we did not feel like memorizing, or did not fully understand. You should definitely read the slides (all 1000 of them) at least once, take a good look at the figures and drawings. In some places we reference to them.
Visual Variables[Bearbeiten | Quelltext bearbeiten]
- Size
- Shape
- Orientation
- Color
- Texture
- Value (Opacity)
- Postion → Layout Problem!
Quality Criteria[Bearbeiten | Quelltext bearbeiten]
- Drawing Conventions → required (straight line, orthogonal, grid, crossing free, ...)
- Aesthetics → optimize (#crossings, #bends, edge length, area, ...)
- Local constraints (relative positions, groups of vertices)
Often NP-hard optimization problems & competing criteria.
Tree Layout[Bearbeiten | Quelltext bearbeiten]
Binary Tree[Bearbeiten | Quelltext bearbeiten]
Conventions & Criteria[Bearbeiten | Quelltext bearbeiten]
Drawing conventions
- straight edges & no crossings
- hierarchical
- layers
- symmetric child placement
- isomorphic subtrees (subtrees with same configuration are drawn the same)
Quality criteria
- dimensions (height, width, area)
- balanced subtree placement
Simple: Tree Traversal[Bearbeiten | Quelltext bearbeiten]
Pre-order (P,L,R); In-order (L,P,R); Post-order (L,R,P)
DFS
- Post-order traversal: index(v) → x, depth(v) → y
- running time: O(n)
- drawing area: n * depth(T)
- Edges not uniform & parent/root not centered
Reingold/Tilford (2-Phase-Algorithm)[Bearbeiten | Quelltext bearbeiten]
- Improve the area and center the parent
- Divide & Conquer
- Draw sub trees recursively
- Place subtree drawings with distance 2 or 3 next to each other. Find minimal distance with tighter contour!
Phase 1
- Compute the contour & x-offsets to parents of both subtrees
- Compute distance per level
- Pick maximum distance → round up as distance left & right of root
- Merge contours
Running time: O(n) → Each node compared at most twice (once on left, once on right contour → 2n) Contour stored as linked list with x-offsets for each vertex
Phase 2
- Traverse in Pre-order
- Compute absolute x positions → accumulate offsets of all parents per vertex
Running time:
Area:
Worst case for area is a string of nodes as a line → height = n → n*n area
Theorem: Ordered rooted binary tree → straight line drawing in O(n) time and O(n²) area
Satisfies: parent-child-order, isomorphic subtrees, integer grid
Width can be minimized further, when subtrees are not drawn isomorphicly (dependencies between subtrees) → NP-hard problem
2-Phase-Algorithm can be extended for non-binary trees with still O(n) time
Radial Tree Layout[Bearbeiten | Quelltext bearbeiten]
Concentric rings instead of layers; often for unrooted trees
Conventions & Criteria[Bearbeiten | Quelltext bearbeiten]
- straight edges & no crossings
- concentric rings
- balanced distribution
Planarity[Bearbeiten | Quelltext bearbeiten]
- Put each subtree into its own wedge on the ring
- Distribute the wedges according to size of subtree
- Limit space of children to tangent of parent vertex to prevent edges from crossing over parent rings
Tangent-restricted wedge angle for subtree T(u):
min{proportion by size(wedge), max tangent angle}
Algorithm[Bearbeiten | Quelltext bearbeiten]
- Compute subtree sizes by traversing in post-order (count vertices bottom to up)
- Compute angles recursively in pre-order
Theorem: Rooted tree → planar radial drawing in O(n) time
HV-Layout[Bearbeiten | Quelltext bearbeiten]
Compact Orthogonal Tree Drawing: planar, straight line drawing of rooted unordered binary tree
Subtree bounding boxes are placed either on top of, or next to each other → Can be swapped: 4 possible options, but ordering lost
Right Heavy HV Tree: Place heavier subtree to the right next to the sibling (horizontal combination) → bottom up construction
Height is because we stack the subtrees
Worst case width (single string of nodes) is n →
Theorem: Rooted binary tree → HV drawing in O(n) time and O(n * log(n)) area
Area can be optimized with dynamic programming in O(n²) time
Series Parallel Graphs[Bearbeiten | Quelltext bearbeiten]
Has a source s and sink t, and is composed by connecting two SP graphs in series or in parallel
- Series Composition: , ,
- Parallel Composition: ,
Decomposition Tree[Bearbeiten | Quelltext bearbeiten]
- Q-Node: Single edge
- P-Node: Parallel composition of two sub graphs
- S-Node: Series composition of two sub graphs
Lemma: SP graphs are planar & acyclic
Proof by induction:
- Base case: Q-Node is single edge → planar & acyclic. Source is lower than sink → all edges point upwards
- Induction S-Composition:
- Planarity: all edges point upwards, when stacked on t1=s2 no edges can cross
- Acyclic: A newly created cycle through t1=s2 passes vertex twice, thus would need pre-existing cycles in the subgraphs
- Induction P-Composition:
- Planarity: Subgraphs can be placed next to each other, and edges can be extended to reach s=s1=s2 and t=t1=t2 without crossings
- Acyclic: s=s1=s2 remains as a source and t=t1=t2 remains as a sink → no new cycles
Properties[Bearbeiten | Quelltext bearbeiten]
- Graph can be tested for SP in O(n) time, and decomposition tree can be constructed in O(n) time
- Many NP-hard problems are O(n) on SP graphs (eg. max independent set, ...)
- SP graphs used for flow charts, electrical circuit diagrams, ...
Drawing[Bearbeiten | Quelltext bearbeiten]
Conventions & Criteria[Bearbeiten | Quelltext bearbeiten]
- straight edges & no crossings
- upward edges
- optimize area
Exponential Lower Bound for Area[Bearbeiten | Quelltext bearbeiten]
Theorem: There is a family of SP graphs that require exponential size with straight edges when preserving the ordering.
- Any SP graph is combined with series and parallel combination twice
- The new contour is a triangle of the vertices , , and
- It can be shown when wrapping again, to fit the triangles so that edges do not cross, 4 times the space is necessary
- The area increases exponentially with
- See further details in figure on VL03/38
Polynomial Drawing Area[Bearbeiten | Quelltext bearbeiten]
Divide & conquer algorithm based on decomposition tree
- Draw subgraph in isosceles (cathetes of same length), right-angled triangle
- left (right-angle) vertex always empty
- s & t in lower & upper corner
- parallelogram in corners of s & t to neighboring vertices → always empty
Structure/Composition[Bearbeiten | Quelltext bearbeiten]
- Q node only has single edge from s to t (hypotenuse)
- S node stacks the triangles
- P node puts the triangles next to each other
- Q nodes always have to be pushed to the right (else s and t cannot be connected)
- P node of two Q nodes not allowed on simple (not multi) graph!
- right push changes ordering!
- The tip of the right triangle can be positioned on the hypotenuse of the left one between the left one's parallelograms, even if the space has zero length (because the tip has no vertex, no vertex is put into the parallelograms) (parallelograms may also not/cannot overlap)
Polynomial Area[Bearbeiten | Quelltext bearbeiten]
Theorem: Simple SP graph with m edges → right-pushed drawing (upward planar) in O(m²) area
Proof by induction: (see VL03/54)
- Base case:
- Q-Node is single edge (m=1) with length l →
- on an integer grid l=2 →
- Induction S-Composition:
- Lengths of the hypotenuses add up → each hypotenuse is bounded by →
- Area computation is unchanged → → still m²
- Induction P-Composition:
- By putting triangles next to each other, the sides of the left one are extended to form a larger new one. The lengths of the hypotenuses are again being added up.
- Same as above.
Arbitrary Graphs[Bearbeiten | Quelltext bearbeiten]
Conventions & Criteria[Bearbeiten | Quelltext bearbeiten]
- straight edges & few crossings
- no node overlaps
- group densely connected subgraphs
- bounded edge lengths
- small area
Force Based Model[Bearbeiten | Quelltext bearbeiten]
Spring Embedder[Bearbeiten | Quelltext bearbeiten]
Physical model where...
- edges are simulated springs
- vertices are connected by springs and are simulated particles with forces acting on them (e.g. springs, electrical, magnetic, gravitational)
Definition[Bearbeiten | Quelltext bearbeiten]
Repulsive force (not-connected vertices): Same as electrically charged particles set by a constant and tapers off with distance²
Attractive force (connected vertices): Spring constant scaled by the logarithmic stretch (when compressed the stretch is <1 and the direction inverted due to the log)
For each vertex: sum all forces (fspring when connnected and frep when not)
Algorithm[Bearbeiten | Quelltext bearbeiten]
- While not max iterations & at least one force
- Compute summed force for each vertex v
- For each vertex: Apply the force with damping factor to the position
Run time: The force computation takes O(n²) time per iteration (all vertices interact with each other), with K iterations → O(K * n²)
Advantages & Disadvantages[Bearbeiten | Quelltext bearbeiten]
- (+) simple
- (+) good results for small/medium graphs
- (+) empirically good representation of symmetries & structure
- (-) system not stable at end
- (-) local minima
- (-) computing time (frep in O(|V|²) )
- (-) initial placement has strong influence
Fruchterman & Reingold[Bearbeiten | Quelltext bearbeiten]
Only use particle analogy with attractive and repulsive forces instead of springs. On close distances the repulsive forces overtake the attractive forces similar to compressed springs.
Repulsive force between all vertices:
Attractive force only between connected vertices:
When the distance is optimal the forces cancel out, when the distance is smaller than optimal, the repulsive force takes over.
→
Modifications[Bearbeiten | Quelltext bearbeiten]
- Inertia: force gets scaled by mass (degree of vertex)
- Gravitation: gravitational pull to a barycenter of vertices based on own mass (degree)
- Magnetic: Additional force applied to straighten out edges horizontally or vertically
Adaptive displacement[Bearbeiten | Quelltext bearbeiten]
Change the damping factor for each vertex based on last iteration. Higher temperature means less damping.
When force points in...
- same direction → increase temperature: Let vertex move towards final position quicker
- opposite direction → reduce temperature: Prevent oscillation (moving back and forth)
- orthogonal direction (frequently) → reduce temperature: Prevent rotation around a center point
Advantages & Disadvantages[Bearbeiten | Quelltext bearbeiten]
- (+) still simple
- (+) better layout and faster convergence
- (-) ... same as Spring Embedder
Local Repulsive Force Computation[Bearbeiten | Quelltext bearbeiten]
Repulsive force computation needs quadratic time in respect to the number of vertices → make it faster
Grid[Bearbeiten | Quelltext bearbeiten]
- Subdivide plane into grid of cell-size
- Only check the neighboring grid cells
- Only use vertices within distance
Useful, but quality loss (no long-range forces), and risk of oscillation around
Worst-case no improvement
Quad Tree[Bearbeiten | Quelltext bearbeiten]
- Subdivide the plane into a recursive quad tree (each cell contains max one vertex)
- Compute center of mass and node count for each cell in tree (bottom up)
- For each vertex u:
- Traverse root to u (Top down)
- For all siblings on current level check
- When below approximate with the precomputed center of mass
- Else recurse down the tree
With balanced point distribution → quad tree balanced → traversal time O(n * log(n))
Stress Based Model[Bearbeiten | Quelltext bearbeiten]
Multidimensional Scaling (MDS)[Bearbeiten | Quelltext bearbeiten]
Compute some ideal distances between each vertex pair and come up with a layout that minimizes deviations from these distances. For ideal distances use the shortest path between the vertex pair through the graph .
Stress between two points i and j:
The weight is e.g.: → Ideally far away vertices do matter very little
The overall stress is the sum of each unique pair's stress. →
Stress Minimization[Bearbeiten | Quelltext bearbeiten]
- Compute all pairwise distances (eg. All Pairs Shortest Path)
- minimize stress s(p) (e.g. Stress Majorization)
Scalability[Bearbeiten | Quelltext bearbeiten]
Too slow for large graphs due to super-quadratic run times. Faster approximations:
- PivotMDS
- MaxEnt Stress
- Sparse Stress
Comparison[Bearbeiten | Quelltext bearbeiten]
Force based
- simple
- any input graph
- good layouts for small & sparse graphs
- flexible
- robust & scalable
Stress based
- higher quality (?)
- any input graphs
- optimization with iterative solving of equations or gradient descent
But
- no guaranteed convergence
- dependence on input layout
- stress based needs approximations for large graphs
Straight-Line Planar Graphs[Bearbeiten | Quelltext bearbeiten]
Planar Graphs[Bearbeiten | Quelltext bearbeiten]
Definition: Planar graph → Graph drawable in 2D without crossings
Definition: Plane graph → Planar graph + embedding
Two planar drawings have the same embedding if they have the same rotation scheme and the same external face.
Theorem: Graph is planar iff there is no or minor
Theorem: Simple graph → Testing planarity & creating embedding has O(n) time
Theorem: Planar graph → straight line drawing
Theorem: Planar graph → disk contact representation
Theorem: Connected planar graph →
Theorem: 3 connected planar graph → straight-line convex drawing in O(n) time.
Theorem: Embedded planar graph → straight line drawing on grid.
Triangulation[Bearbeiten | Quelltext bearbeiten]
Many algorithms use maximally planar graphs → triangulated graphs.
- Add all missing edges to triangulate graph (including the outer face!)
- Do the algorithm on the maximally planar/triangulated graph
- Remove the unnecessary edges
Canonical Ordering[Bearbeiten | Quelltext bearbeiten]
As an idea for an drawing algorithm for planar graphs, we could draw the graph incrementally by adding each vertex and connecting it to the rest of the drawing. For this we need an ordering.
Definition: Triangulated planar embedded graph → ordering of vertices is canonical iff
- for the first k vertices induces 2-connected internally triangulated graph
- first edge always on outer face of graph (boundary)
- On the next vertex to connect is outside of , and it connects to vertices on the boundary that all lie next to each other (no skipping)
Lemma: Triangulated planar graph → canonical ordering
Proof using inverse induction:
- Hypothesis: such that all three conditions are met on
- For the next vertex it is sufficient that it is not part of a chord (see VL05/38)
- Inverse induction step: If we can now select that is not part of a chord with being 2-connected → also has to be 2-connected → meets the three conditions
- Assume not 2-connected (see VL05/56)
- Either would not be 2-connected → contradiction
- Or would not be triangulated → contradiction
- Or would be part of chord → contradiction
- Further we can always find a chord free vertex
- Chords form a nesting
- There is always a inner most chord with at least one vertex nested inside (simple graph)
- Assume not 2-connected (see VL05/56)
- The ordering is canonical
Lemma: Canonical ordering can be created in O(n) time.
Shift Algorithm[Bearbeiten | Quelltext bearbeiten]
Draw a planar graph with a canonical ordering on a grid. Invariants:
- is on and is on → width of the drawing
- Boundary is drawn x-monotone (strictly left to right) (except bottom edge)
- All slopes on boundary are 45° (+/-1 )
Algorithm[Bearbeiten | Quelltext bearbeiten]
- Base line for and
- For each vertex in canonical ordering
- Shift the vertices between first and last +1 to the right (with subtree)
- Shift everything beyond and including the last +2 to the right (with subtree)
- Place on the intersection of extended slopes from it's first and last neighbor
- Connect it
- We shift +2 for every vertex except and → width
- The last vertex is x-centered → x coordinate → with slopes 45° → height
- Area: → O(n²)
Planarity Proof[Bearbeiten | Quelltext bearbeiten]
Lemma: On a planar straight-line grid drawing each vertex on the boundary (except , ) is the root of a tree of covered internal vertices. Each tree is x-shifted by to the right with . The resulting grid drawing is still planar and straight-line.
Aka: we can shift all trees without letting them switch places (left ones are never shifted more than right ones) the drawing is still intact.
Proof by induction
- Base case: holds
- Induction: When the lemma holds for and we can shift its subtrees such that it holds for → it holds for all
- On the boundary of there are the vertices . covers the vertices on
- Define the shift of trees in by the shift in
- for all left of (first neighbor of )
- for all between and (covered by )
- for all after (last neighbor of )
- After shifting the trees, we attach to its covered subtrees and now move them together
- Because we can shift in with , we can shift with
- Lemma holds for all
Implementation[Bearbeiten | Quelltext bearbeiten]
Naive implementation runs in O(n²) time
Towards a faster implementation: , and can be computed based on the x-y-coordinates of and
The x-location of vertices can be represented as a relative x-distance tree. There each vertex stores its y coordinate and its relative x-distance to its tree parent. The relative distance tree is binary
- left child is the first child in the cover tree
- right child is the sibling in the cover tree
The x-distance between and can be computed by traversing the right children from to and summing the relative distances.
When attaching a new to the graph, it needs to be inserted into the x-distance tree (see VL05/127)
- becomes right child of (previously it was )
- is left child of (because it is its first covered node)
- is right child of (because it is a sibling of and in ) → right child is now null
Theorem: Embedded graph → straight line planar drawing on grid in area.
Theorem: The shift algorithm can be implemented in O(n) time.
Schnyder Realizer[Bearbeiten | Quelltext bearbeiten]
From Euler’s characteristic it can be derived for triangulated graphs
With the help of a Schnyder realizer coordinates to vertices can be assigned directly based on combinatorial properties of planar drawings.
Barycentric Representation[Bearbeiten | Quelltext bearbeiten]
Barycentric Coordinates: In a triangle a position can be described by a triple where
Barycentric Representation: Is an injective map from each vertex to a triple where
- For every edge both its vertices can be compared to any other vertex . They must both be smaller than in one (same) direction. → is closer to a corner than both and . → As this holds for all other vertices there is a triangle around the edge where no other vertex can be. (known as the no-no-triangle☝)
Weak Barycentric Representation: The same, but can touch the border of the forbidden triangle, but cannot overlap with , or the edge .
Lemma: Graph as barycentric representation + a triangle → planar straight line drawing inside
Proof:
- No vertex inside no-no-triangle for every edge
- Edges cannot cross (see VL06/26)
- For two edges there are four vertices → each vertex has to be larger in one direction than the other edge → e.g. → are one of
- From the formulas it can be seen that certain assignments to cannot be made → only indices of the same edge can be equal → e.g.
- When the indices of the same edge are equal (e.g. ) the edges are separated by a straight line (barycentric coordinates!)
Edge contraction[Bearbeiten | Quelltext bearbeiten]
- Merge two vertices by creating a new one that connects to all of the old neighbors
- Edge is contractible if the edge corners have exactly two common neighbors → graph is still triangulated
- Edge is contractible iff it is not part of a separating triangle
Schnyder Labeling[Bearbeiten | Quelltext bearbeiten]
Definition: Label all internal angles with 1,2,3 such that
- in a face all 1,2,3 exist in counterclockwise order
- around a vertex 1,2,3 are in counterclockwise order without gaps but repetitions are allowed
Lemma: In a triangulated graph with inner vertices, there is an inner vertex connected to a corner that is contractible.
Proof by induction
- Base case: only one inner vertex
- Case 1: The corner is not part of a separating triangle → Take any vertex
- Case 2: Else → Vertices that form the separating triangle are forbidden → Take a vertex from the inside of the separating triangle
- Induction → Separating triangles are not empty → There will be a vertex to pick
The separating triangles get dissolved from inside out.
Theorem: Plane triangulated graph → Schnyder labeling
Proof by induction
- Base case: Empty triangle has labeling
- Reinstate a contracted edge (uncontract) of an inner vertex → resulting triangles can be labeled trivially
- Induction: Repeat inside one of the new triangles on the same corner → same as before → uncontract the whole graph
Schnyder Realizer[Bearbeiten | Quelltext bearbeiten]
Definition: Schnyder realizer of a plane triangulated graph → Partition & orientation of edges into three spanning trees
- Every vertex is part of the trees → single output, multiple inputs
- Ordering of in and out edges → IN1, IN2, IN3 → IN1, out3, IN2, out1, IN3, out2
- From a Schnyder labeling of a plane triangulated graph → obtain edge orientations and labelings (edge color) → Schnyder Realizer
- Each edge has a vertex that has the same label twice → edge label & direction.
- Each vertex must have an outgoing edge of each type/color
Properties[Bearbeiten | Quelltext bearbeiten]
- Outer edges not colored, and only ingoing edges into the corners: inner vertices → outgoing colored edges → +3 uncolored ones → → no more edges left
- Per color there is a connected tree:
- edges per color (not for corners) → on a connected graph with vertices (one corner included) it must be a tree
- No cycles in each color: empty cycle violates face rule, non-empty cycle entraps other color → would mean smaller cycle inside → recursion
- No criss-crossings of paths: Would violate vertex rule on the second crossing back
- From each vertex there is a path per color to the respective corner → The paths segment the graph into three regions
Lemma: If a vertex lies within a segmented region, its own region (of same color) is strictly smaller.
For a vertex with region there are
- faces
- vertices inside including one border
It holds:
- → faces minus single outer face
- → all vertices except self
Planar straight line drawing[Bearbeiten | Quelltext bearbeiten]
Theorem: Plane triangulated graph + Schnyder realizer → barycentric representation with mapping
Proof:
- Property 1:
- Property 2: Not shown?
The required area is . The time is in O(n).
For the weak barycentric representation use the number of vertices instead. (area = )
Sugiyama Framework[Bearbeiten | Quelltext bearbeiten]
For layered graph layout
- Flexible framework
- Sequential optimization of various criteria
- Decomposition into often NP-hard but still practically feasible subproblems → use good heuristics
- Pipeline steps imply restricted solution space
Conventions & Criteria[Bearbeiten | Quelltext bearbeiten]
- many edges pointing upward
- ideally short, straight and vertically edges
- few horizontal layers
- few crossings
- evenly distributed vertices
Steps[Bearbeiten | Quelltext bearbeiten]
- Break cycles: directed input graph → DAG
- Assign layers
- Minimize Crossings (+ dummy vertices)
- Position vertices
- Draw edges: turn back reversed edges
Does not guarantee an optimized drawing → each step depends on its predecessor's output
1. Break cycles[Bearbeiten | Quelltext bearbeiten]
Pick one edge per cycle and flip it → When possible the same edge for multiple cycles
Algorithm idea for Feedback Arc Set:
- Find "max acyclic subgraph"
- Invert the rest
This is NP-hard → find a heuristic.
Heuristic 1[Bearbeiten | Quelltext bearbeiten]
- A is empty set
- Go over all vertices
- More incoming edges → add them to A
- Else More outgoing → add them to A
- Remove vertex and its edges
- The graph with only edges from set A is a DAG → the remaining edges are the feedback set → combine to get D
- For any cycle a first member vertex is picked → Either the incoming or outgoing edges are flipped → the cycle is broken → D is acyclic
- At most half of the edges can be picked per vertex → at most half of all edges get flipped
- Running time O(|V| + |A|)
Heuristic 2[Bearbeiten | Quelltext bearbeiten]
- A is empty set
- While graph not empty take vertex
- Remove all sinks and add their incoming edges to A
- Remove isolated vertices
- Remove all sources and add their outgoing edges to A
- If graphs is still not empty
- Pick vertex with largest (most source-like)
- Remove it and add outgoing edges to A
For step 4: There will always be a source-like vertex with due to handshaking lemma, either all are 0, or one is <0 then there is one with >0
Lemma: Connected directed graph without 2-cycles → Heuristic 2 computes an edge set A with in O(|A|) time
When using buckets to sort vertices by their degree, with buckets for sources, sinks and isolated, we can run the algorithm in O(|A|) time, as removing a vertex can be done in deg(v) time.
2. Assign Layers[Bearbeiten | Quelltext bearbeiten]
DAG as input → disjoint sets of vertices in layers → all edges go strictly upwards (lower to higher layer) → define y-coordinate for each vertex
Optimization Goals:
- Minimize layers
- Minimize width
- Minimize longest edge
- Minimize total edge length
Height Minimization[Bearbeiten | Quelltext bearbeiten]
Idea: Put all predecessors of a vertex in the DAG below it → longest simple path is layer of vertex → total height is minimal
Algorithm
- Assign source vertices to first level
- While graph not empty
- Remove sources and find new source vertices
- Place new sources on next level
Runs in O(|V| + |A|) time
Minimizing total edge length[Bearbeiten | Quelltext bearbeiten]
Formulate as ILP and use a solver. (generally NP-hard problem)
Fixed width layer assignment[Bearbeiten | Quelltext bearbeiten]
Place vertices on minimized number of layers with max width of B → equivalent to job scheduling problem with dependencies between tasks → Use MPCS (Minimum Precedence Constrained Scheduling)
Theorem: Given ...
- n jobs of equal length
- Precedence relation
- B identical machines
... it is NP-complete to decide if a schedule of at most length T exists, even with T= 3.
Proof by reduction:
- Reducing NP-complete problem with T=3 shows MCPS is NP-hard as well
- Lots of math here
Theorem: There is a polynomial time approximation for MCPS that approximates with a ratio of
The MCPS problem can be approximated using the list scheduling algorithm.
- Whenever machine is free assign first feasible job to it
- Else machine remains idle
- Proof uses the fact that at least one machine is never idle
3. Crossing Minimization[Bearbeiten | Quelltext bearbeiten]
- Local optimization by swapping → Output of one layer influences the next
- Layer assignment of DAG → vertex placement per layer with minimized crossings
- NP-hard for only 2 layers (OSCM)
- No polynomial time approach to optimize across multiple layers
- Usually optimize adjacent layers iteratively
- Insert dummy edges for long edges
- Level planarity (is there a crossing free solution?) can be tested in O(n)
One-sided Crossing Minimization (OSCM)[Bearbeiten | Quelltext bearbeiten]
2 layered graph + vertex ordering → vertex ordering with minimal crossings
Observations:
- Crossings only depend on ordering not final position
- Number of crossings between two vertices' edges only depends on which vertex comes first
Definition: Crossing Value → for a vertex pair and in the second layer where count the number of possible pairs of neighbors in the first layer where the ordering is swapped.
Observation:
- Crossing number of graph G with ordering →
- for fixed →
- can be computed in time
Iterative Crossing Minimization[Bearbeiten | Quelltext bearbeiten]
Iteratively optimize a graph with multiple layers
- Random ordering for first layer
- Repeat until no further improvement
- For all layer pairs bottom up: Optimize next upper based on fixed lower
- For all layer pairs top down: Optimize next lower based on fixed upper
- Restart step 1 with different random first layer → Return best
Barycenter OSCM[Bearbeiten | Quelltext bearbeiten]
Idea: Few crossings when vertices are close to their neighbors
→ Average the x positions/ordering indices of all neighbors in the layer below
- simple & fast
- usually very good results
- Can find optimum if it is level planar (aka )
- The solution can be worse than optimal solution for some graphs → Bad because quality/approximation factor is not constant but depends on input size
Proof for approximation factor (see VL07/86):
- Vertex has K neighbors in lower level
- Vertex has K+1 neighbors in lower level where one vertex is placed far out (K²)
- With we would have K crossings due to the far away vertex
- With we would have K² crossings
- Due to the distance K² → we set → this is worse by factor K
- We can see: →
Median OSCM[Bearbeiten | Quelltext bearbeiten]
Idea: Set position to median of the neighbors
- Set position to median of x positions/ordering indices of all neighbors in the lower level
- If no neighbors → place at index 0
- If two vertices at same position and different degree parity → place odd degree to the left
- Else place arbitrary
Run time in O(|E|)
- simple & fast
- mostly good performance
- Can find optimum if it is level planar (aka )
- Constant factor-3 approximation
Approximation factor: lots of math and crazy substituting
ILP OSCM[Bearbeiten | Quelltext bearbeiten]
- Integer Linear Programming Model
- Finds optimal solution
- Possibly not in polynomial time
- Suitable for small/medium graph
- Use binary variables to select orderings between all vertex pairs
- Variables select either or to sum up over all pairs
- Model transitivity ( ) using a linear inequality (like a XNOR)
4. Coordinate assignment[Bearbeiten | Quelltext bearbeiten]
Edge straightening: Minimize deviation from a straight line for edges consisting of dummy vertices
Idea:
- Compute as a straight line from bottom to top vertex → is ideal position on level i
- Minimize the total quadratic deviation ( )
- Ensure minimal spacing between vertices on same layer
Properties
- Solving can be expensive
- Possibly exponential width
5. Draw edges[Bearbeiten | Quelltext bearbeiten]
- Flip edges back to their original direction
- Remove dummy vertices
- Optionally draw Bezier curves for edges
Orthogonal Drawings[Bearbeiten | Quelltext bearbeiten]
Conventions & Criteria[Bearbeiten | Quelltext bearbeiten]
- few crossings
- few bends
- isomorphic sub-structures are drawn the same
TSM Approach[Bearbeiten | Quelltext bearbeiten]
TSM: Topology - Shape - Metrics
- Topology: Reduce crossings → Combinatorial Embedding
- Planarization → Insert dummy nodes for crossings
- Shape: Minimize bends → orthogonal representation
- Metrics: Minimize area → planar orthogonal drawing
Bend Minimization with Fixed Embedding[Bearbeiten | Quelltext bearbeiten]
Geometric Bend Minimization: Planar graph + embedding → orthogonal drawing with same embedding and minimal bends
Combinatorial Bend Minimization: Planar graph + embedding → orthogonal representation with same embedding and minimal bends
Orthogonal Representation[Bearbeiten | Quelltext bearbeiten]
Orthogonal representation of graph G consists of orthogonal representations for all of its faces
Face representation:
- Clockwise ordered set of edge description tuples
- → name of edge
- → String of 0s and 1s describing sequence of bends (0 = right, 1 = left)
- → Counterclockwise angle between this and next edge (90° steps in radiants → )
Setting is useful for turning around on degree 1 vertices
Correctness:
- corresponds to all faces
- For two faces sharing an edge → the bending sequence of common edge is reversed and inverted → because going through the edge in different directions (left turn becomes right turn)
- For an edge representation we compute . The sum of all of an inner face is 4, for the outer one is -4.
- For each vertex the sum of incident angles is
Combinatorial Bend Minimization using Flow Network[Bearbeiten | Quelltext bearbeiten]
- One unit of flow → angle of
- Flow vertex → face: angle in vertex
- Flow face → face: edge bends
General Flow Networks[Bearbeiten | Quelltext bearbeiten]
Inputs:
- directed graph
- lower bound and capacity per edge (min & max flow)
- production/consumption per vertex → sum of all is 0
Valid flow satisfies:
- Flow at each edge is within bounds
- Flow at each vertex is (outgoing - incoming)
Cost function: define cost per edge → Minimum cost flow minimizes total cost
Bend Minimization[Bearbeiten | Quelltext bearbeiten]
Create flow graph N
- Each vertex in G → vertex in N
- Each face in G→ vertex in N
- Each vertex v incident to face f in G → in N edge from v-vertex to f-vertex
- Each two adjacent faces f,g in G → two edges between f- & g-vertices (one per direction)
Creates directed multigraph with productions:
- Every v-vertex → production
- Every inner face f-vertex →
- Outer face f-vertex →
Note: is the count of half-edges along boundary (count degree 1 vertices twice)
Total flow sums up to 0 due to Euler's formula (see VL10/34).
Bounds:
- Flow between face vertices is within and costs 1
- Flow between v-vertex and f-vertex is within and costs 0
Summary[Bearbeiten | Quelltext bearbeiten]
Theorem: Planar embedded graph has valid orthogonal representation with k bends iff the flow network has valid flow with cost k.
Proof: valid flow → valid representation:
- All faces are represented in flow graph
- Use construction of bending sequence as and
- Sequence only contains 1s or 0s → Reversing ✅
- Sequence is inverted on the other face
- Math
- Set angle to
- Production of each vertex is 4 → sum is
Proof: valid representation → valid flow:
- Use the same constructions
- Just works?
Results
- Use min-cost-flow to solve bend minimization
- Planar min-cost-flow solvable in
- Without embedding → bend minimization NP-hard
Compaction[Bearbeiten | Quelltext bearbeiten]
Find compact orthogonal layout that realizes an orthogonal representation
Rectangular faces[Bearbeiten | Quelltext bearbeiten]
Special case with only rectangles → guarantees for min total edge length, min area
Flow Network[Bearbeiten | Quelltext bearbeiten]
Use horizontal flow network to minimize edge length
- Each face in G → vertex in N + one source & one sink vertex
- For each horizontal segment of adjacent faces where f is below g → edge from f-vertex to g-vertex
- Connect source and sink vertex to bottom and top segments
- Form loop from sink to source
Set bounds for N:
- Each edge has flow within → lower bound enforces flow > 0
- Each edge has cost 1
- Each vertex has production/consumption of 0 → All flow goes in a loop
Flow per edge in N describes the length of the respective segment between faces in G.
Same for vertical flow network
Compute total area/lengths[Bearbeiten | Quelltext bearbeiten]
- Total edge length is the sum of all individual flows in and minus flow through the t-s-edges
- Total area is . The length per side is the flow through the t-s-edge.
Theorem: Minimum cost flow induces a valid orthogonal layout → Area and total edge length can be computed from the flows.
Rectangularization[Bearbeiten | Quelltext bearbeiten]
Convert a non rectangular face into a set of rectangles. Extend each edge to the closest orthogonal opposite edge → project vertex and subdivide the face.
Inner faces:
- Replace bends with dummy vertices
- Assign value to bends: left= 1, right= -1, straight= 0
- For each edge
- Sum up bend values
- Stop when reaching 1 → select edge following last bend
- Project a new vertex on to selected edge
Outer face:
- Same setup as above
- Add outer rectangle that envelopes the face
- For each edge
- Same as above
- If no edge is found (traversed full boundary with < 1) → project to outer rectangle
All faces are rectangles → Apply flow network → But area not minimal → NP-hard
Complexity of Layout Compaction[Bearbeiten | Quelltext bearbeiten]
Theorem: Graph + orthogonal representation → NP-hard to test for layout of area at most K.
Proof: Reduce SAT → Layout compaction
- Create pistons for all variables
- Create common border → Restrict piston movement to up and down
- Create belt that restricts pistons to top or bottom position → binary value
- Connect pistons horizontally for each equation
- Create gadgets for each variable in each equation → , ,
- Route a chain of "A"s through the equation tunnels
- The graph has a minimal area of if there is a satisfying assignment for the equations → herby solving the SAT problem
Lower Bounds for Planar Grid Drawings[Bearbeiten | Quelltext bearbeiten]
Determine tight upper and lower bounds for the drawing area → Upper bounds
Lower bounds: Trivial lower bound → n
Path width[Bearbeiten | Quelltext bearbeiten]
Definition: Vertex ordering → Split into left group of increasing size and right group of shrinking size → Every time count the number of vertices with connections from left to right set → Maximum is the vertex separation number
Definition: Graph has pathwidth iff graph has a vertex ordering with .
Theorem: Planar graph → grid drawing height pathwidth pw(G)
Testing whether a graph has pathwidth k is NP-hard.
Visibility Representation[Bearbeiten | Quelltext bearbeiten]
Definition: Graph G → Each vertex is represented as a horizontal box. Each edge is a vertical or horizontal segment connecting its vertex-boxes. No intersections.
Lemma 1: Graph planar grid drawing of height h → Visibility representation of height h
Lemma 2: Graph with visibility representation of height h →
Proof: Find a vertex ordering with in visibility representation of height
- Construct ordering of boxes/vertices: left-to-right and top-to-bottom
- Draw line anywhere through a box
- At most one vertex/box per row can connect across the line → at most h vertices connect →
Theorem: Planar graph G with → every grid drawing has height
Proof: Using Lemma 1 and 2
- Assume there is a drawing with height
- with Lemma 1 there is a visibility representation with height
- with Lemma 2
- contradiction
Special Case: Trees[Bearbeiten | Quelltext bearbeiten]
Observation: Rooted tree with height →
Proof: By induction
- Base case: Single vertex → ,
- Induction: Each subtree has height and therefore
Every root has its subtrees to the right → h (subtree-)roots have to go from left to right half of the ordering → Splitting in the middle has separation h (see VL12/27)
Lemma 3: Tree T has vertex v → removing v decomposes T into subtrees → each subtree has → original T has
Proof:
- trivially → because the subtrees already have
- But assume
- Therefore there is an ordering with
- When reintroducing the vertex → anywhere it is placed for the subtree in the middle the separation goes up to
- Contradiction → separation is at least →
By combining the observation () and Lemma 3 () → for these trees it holds
Theorem: Tree has iff you can delete a path of vertices such that every tree in the resulting forest has . This path is called "main path"
Proof: skipped
Theorem: Rooted tree → Planar grid drawing with height
Proof: skipped
Summary[Bearbeiten | Quelltext bearbeiten]
- Every planar grid drawing has height
- For every rooted tree there is a planar grid drawing with height
- Pathwidth gives only for trees a tight lower bound.
Octolinear Graph Drawing: Metro Map Layout[Bearbeiten | Quelltext bearbeiten]
- Goal: easy-to-use visual navigation aid for train passengers
- Topology over topography
- Distorts scale and geometry
- Computationally challenging → Still manual process
Task[Bearbeiten | Quelltext bearbeiten]
Subtasks:
- Rendering and design choices (colors, symbols, ...)
- Network layout (geometry, placement, ...)
- Station labeling (where to position labels)
- Metro line routing (route the metro lines through the network)
Formalized problem:
- Geometrically embedded graph of the railway network
- Station = vertices, Edges = rail links
- Set of paths on G
- Metro lines
Design Rules[Bearbeiten | Quelltext bearbeiten]
- Do not change network topology
- No new crossings
- No change in circular vertex order
- Restrict edge orientation → e.g. octolinear
- Draw metro lines simple & monotone
- Avoid bends
- Prefer obtuse angles
- Lines pass straight through interchanges
- Use large angular resolution in station
- Distribute edges evenly for balanced appearance
- Minimize geometric distortion and displacement
- Try to maintain geographic topography
- Use uniform edge lengths
- Geographic distance less important
- Station "hop-distance" more important
- Keep unrelated features apart → Minimum clearance
- Avoid large empty spaces
- Balance feature density
- Possibly fill gaps with legends
Rules conflict with each other and need priorities
Theorem: Embedded graph (vertex degrees ) → bend minimization with preserving topology & octolinearity is NP-hard
Schematization Approaches[Bearbeiten | Quelltext bearbeiten]
Path-Based[Bearbeiten | Quelltext bearbeiten]
Constraints:
- (R2) Oriented edges
- (R6) Displacement within bounds
Optimize:
- (R3) Minimize number of segments along edge
Theorem: Path with length n + orientation set C → Heuristic schematization in time.
Theorem: Monotone path + orientation set → schematization in O(n²) + solve(LP) time that...
- Preserves orthogonal order (relative north-south-east-west relationship vertices),
- Minimum slope deviation and total length
Thorem: Non-monotone route sketch with orientation set where angles <90° → NP-hard
Pros:
- Polynomial running time
- Orientations and displacement bounds guaranteed
- Bend minimization
- Works with metro maps → Schematize each line individually
Cons:
- (R1) No guarantee on network topology
- Too little distortion/displacement for metro maps
Force-Based[Bearbeiten | Quelltext bearbeiten]
Octolinear[Bearbeiten | Quelltext bearbeiten]
Charged particles model with additional forces for design rules
Setup:
- (R1) Only apply vertex moves that preserve topology
- (R2) Define octolinear magnetic field attracting edges
- (R3) Contract degree-2 vertices into weighted edges
- (R7) Spring lengths model uniform edge lengths
- (R8) Vertex repulsion model feature clearance
Labels are placed in an unrelated second step
- (R1) Guarantees topology
- Slower than path based (but still ok)
- No strict octolinearity
- Unbalanced edge lengths
- Bends in interchanges
- No restriction on distortion
Bezier[Bearbeiten | Quelltext bearbeiten]
- (R1) Guarantees topology
- Considers almost all rules
- Good for small and medium sized instances
- Difficult for complex networks
Local[Bearbeiten | Quelltext bearbeiten]
- Define layout quality function (like loss function)
- Improve layout iteratively by optimizing quality function
- Move vertices individually on the grid
- Optimize with: hill climbing, simulated annealing, ant colony, ...
Pros:
- Flexible framework (can integrate new criteria)
- New methods show improved visual layout quality (aka they are better?)
- Integrates both layouting & labeling
Cons:
- Optimizes criteria but does not enforce
- Local minima
- Slow
Mixed-Integer Linear Programming[Bearbeiten | Quelltext bearbeiten]
- Find exact optimal solution
- Split design rules into hard and soft constraints
- Hard → Constraints (linear inequalities)
- Soft → Loss/Objective function (linear function)
- Integrate labeling
- Use existing solver programs
Hard Constraints[Bearbeiten | Quelltext bearbeiten]
- (R1) Preserve topology & planarity
- (R2) Octolinearity
- (R7) Minimum edge length
- (R8) Minimum feature separation
Soft Constraints[Bearbeiten | Quelltext bearbeiten]
- (R3+R4) Minimize bends
- (R6) Minimize distortion
- (R7) Minimize edge length
Linear Programming[Bearbeiten | Quelltext bearbeiten]
Linear programming (LP) is an efficient optimization method for
- Linear constraints
- Linear objective function
- Real valued variables
Mixed-Integer Programming (MIP)
- Include binary & integer valued variables
- NP-hard
- Often used
Theorem: Metro map can be modeled as MIP → as described previously.
Model[Bearbeiten | Quelltext bearbeiten]
Definition
- 8 angle sectors per vertex
- 2 euclidean coordinate systems (with 0° and 45° rotation)
Hard Constraints:
- Select direction only from original sector or its direct neighbors
- Define inequality formulas for each sector
- Binary variable either selects a specific value or on the right side → enables the constraint
- The formulas enforce max and min x/y movement on the two coordinate systems
- Enforces slope/direction and edge length
Number of constraint variables in O(n²).
Objective function to optimize:
- Cost of bends
- In each vertex compare incoming/outgoing sector
- Acute angles are more expensive
- Sum for all edges over all vertices
- Cost of length
- Cost of relative position deviation
Labeling[Bearbeiten | Quelltext bearbeiten]
- Prevent labels from overlapping
- NP-hard problem
- Integrate it into the layout problem
- Define "keep out zone" as parallelogram → flipping allowed
- Put labels inside the zone after layouting
Pros/Cons[Bearbeiten | Quelltext bearbeiten]
Pros:
- Flexible but hard to adapt
- Includes labeling
- High quality
- Theoretical guarantees
Cons:
- Slow (unpredictably so)
- No proof for optimality with large labeled networks
- Quality depends on model specification
Least-Squares[Bearbeiten | Quelltext bearbeiten]
- Compute squared energy terms (deviation) for vertex position & slopes
- Iteratively optimize/minimize energy
- Very fast & good quality
- Constraints only guaranteed when deviation/energy is zeroed
Grid-Based[Bearbeiten | Quelltext bearbeiten]
- Place vertices on octolinear grid
- Route edges via shortest paths
- Bends and path lengths → edge costs
- Very fast & good quality
- No labeling
Summary[Bearbeiten | Quelltext bearbeiten]
- 2 decades of research
- tradeoff: speed vs quality
- can help human designers → semi-automated process
- better special-purpose maps
Constrained Planarity[Bearbeiten | Quelltext bearbeiten]
Edge crossings are bad for readability
Drawing planar graphs with additional information to visualize → Constrained planarity drawing
Level Planarity[Bearbeiten | Quelltext bearbeiten]
Graph with level assignment, draw planar with
- place vertices on their level
- edges are (strictly) y-monotone
Properties
- Proper: No edges across level (use dummy nodes)
- Single-Source: Graph has only one node with no nodes under it → one common source at lowest level
PC- & PQ-Trees[Bearbeiten | Quelltext bearbeiten]
PC-Trees represent a circular ordering of their leaves.
Consecutive Ones[Bearbeiten | Quelltext bearbeiten]
- Matrix with all zeros
- Columns named by the variables
- Each row is a constraint → every variable sets a one in its column
- Reorder the columns such that in each row the ones are next to each other
Circular Consecutive Ones: Columns can wrap around to fulfill the consecutiveness
PC-Tree Update[Bearbeiten | Quelltext bearbeiten]
- Leaves
- P-Node: Children ordered arbitrarily → All possible permutations
- C-Node: Children ordered circularly → Children has fixed prede-/successor
Update: Find a new tree where red leaves are consecutive
Definition: Terminal Edge → Both subtrees contain red and black leaves
Lemma: PC-Tree has consecutive ordering → Terminal edges form path
- Compute path of terminal edges
- Order path with black and red nodes on opposite sides of the path
- Replace path with single C-Node → Duplicates nodes on the path
- Contract C-Nodes into central node
- Contract nodes of degree 2
Run time of update is upper bounded by number of red nodes.
PC-Tree solves circular consecutive ones problem → Insert an all zero column (s-node) to solve regular consecutive ones.
PQ-Trees[Bearbeiten | Quelltext bearbeiten]
- Represent a linear ordering of leaves → Similar P and Q nodes
- Rooted
- Time equivalent with PC-Trees
Both types can simulate each other
Testing Level Planarity[Bearbeiten | Quelltext bearbeiten]
Lemma: Lower/Upper neighbors must be consecutive → planar drawing
The nodes needed to be consecutive can be represented as restrictions → consecutive ones problem
Theorem: Single source graph → Test level planarity in O(n) time
Theorem: General graph → Test level planarity (presumably) in O(n) time
Clustered Planarity[Bearbeiten | Quelltext bearbeiten]
Graph with clustering → planar drawing with
- Clusters represented by hole-free region
- Clusters do not cross unrelated edges/clusters → Single blob with in/outputs
Application: UML
Level Planarity Reduction[Bearbeiten | Quelltext bearbeiten]
Theorem: Level planarity → reducible to Cluster Planarity
Proof:
- Level is sandwiched by and
- Duplicate every level and make parallel connections between the copied vertices
- All lower levels from & including lower copy of is part of cluster A
- All upper levels form & including upper copy of is part of cluster B
- Now everything is inside clusters except the border region across to
- Run cluster planarity → Same as level planarity for &
Cluster Decomposition Tree[Bearbeiten | Quelltext bearbeiten]
- Outside: Represent clusters as single vertices
- In each cluster: Point all outgoing edges into a single vertex
- Same rotation order → Like a portal
- Inside the cluster the portal vertex can be represented by a PC-Tree
- Convert PC-Tree to a constrained embedding (see example VL13/124)
- Replace the cluster in the original graph with the embedding
- Check for planarity → Cluster planarity
Theorem: Graph is cluster planar iff there is a planar cluster embedding where rotations line up
Theorem: Clustered Planarity of c-connected graphs can be tested in O(n) time.
Level und Cluster Planarity are in P. SEFE-3 is NP. SEFE-2 is ?.
Contact Graphs[Bearbeiten | Quelltext bearbeiten]
Definition: Area cartogram → map where areas of regions represent an external value (e.g. population)
Conventions & Criteria[Bearbeiten | Quelltext bearbeiten]
- Shapes recognizable
- Comparable
- Relative positions
- Correct adjacencies
- Small area error
Rectangular[Bearbeiten | Quelltext bearbeiten]
- Regions are represented as rectangles
- Goal: rectangles should have specified area
- Trade-off between adjacencies/area
Input:
- Adjacencies between regions
- Some value of region → influences area
Output:
- Distorted map
- Area-proportional contact representation
Note: It is not always possible to guarantee correct areas and adjacencies.
Contact Graphs[Bearbeiten | Quelltext bearbeiten]
- Every planar graph has disk contact representation
- Every contact graph of non-overlapping shapes is planar
- Testing if planar graph has disk contact representation with preset areas → NP-hard
- Planar graph can be represented by rectangular contacts iff
- 4-connected → No separating triangles → would require L-shapes
- Internally triangulated
Theorem: There are plane triangulated graphs that need T-shapes (rectilinear polygon with at least 8 corners)
Proof:
- Very specific graph with
- 7 separating triangles with each a vertex inside
- 6 regular vertices
- Each vertex inside a separating triangle forces an L-shape with an additional inset
- 7 triangles → 7 insets → only 6 regular vertices
- One vertex represented by a box with 2 additional insets
- T-shape with 4 additional corners → 8 corners
Canonical Order & Schnyder Realizer[Bearbeiten | Quelltext bearbeiten]
Convert Canonical Order to Schnyder Realizer:
- For each vertex in the order
- Point edge to first neighbor in
- Point edge to last neighbor in
- Point edge to successor with highest index
Convert Schnyder Realizer to Canonical Order:
- Invert edges from 2 of the 3 spanning trees
- Compute topological order of the DAG (consume & remove the sources)
8-sided Rectilinear Cartograms[Bearbeiten | Quelltext bearbeiten]
Definition: Area Universality: Combinatorially equivalent layout can be used for any assigned area values → correct area and adjacencies guaranteed
Theorem: Rectangular layout is area-universal iff one-sided
Definition: One-Sided layout: Every line touches a full-single rectangle on at least one side
3-Phase algorithm:
- Create contact representation made of Ts
- Convert Ts to T-shaped polygons
- Stretch polygons to fill holes
1. Phase: T-contact representation[Bearbeiten | Quelltext bearbeiten]
- Create Schnyder Realizer + Canonical Ordering
- For every vertex in canonical order
- Draw flipped T on new level where
- Horizontal line touches vertical lines of both spanning tree parents
- Vertical line to level of third spanning tree parent
2. Phase: Lambda-fattening[Bearbeiten | Quelltext bearbeiten]
Grow the T-Lines into T-shaped polygons with thickness within
3. Phase: Remove Holes[Bearbeiten | Quelltext bearbeiten]
- Frame everything with a box
- For every hole find an inset/concave corner of a T-polygon → Select this polygon
- Stretch the select polygon to fill the hole
Area Universality[Bearbeiten | Quelltext bearbeiten]
Theorem: The resulting layout is area universal and has only polygons with complexity 8
Proof:
- Split T-polygon into 4 rectangles
- Those 4 rectangles are one-sided → area universal
- Distribute are of each region arbitrarily among its 4 rectangles
Opening Question[Bearbeiten | Quelltext bearbeiten]
In previous years Prof. Nöllenburg often began the exam with an opening question like "What is a graph?", "What do you know about the graph drawing problem?".
- What is a graph?
- Tuple of vertices and edges
- Set of vertices
- Set of edges -> Connect vertices
- Represent as set, adjacency list, adjacency matrix, drawing
- Layout Problem / Graph visualization problem
- Based on graph find drawing that
- ...complies with conventions (hard constraints)
- ...optimizes aesthetics/quality (soft constraints)
- ...satisfies partial/local constraints
- Quality Criteria
- Conventions
- straight-lines
- orthogonal edges
- grid drawing
- crossing free
- Aesthetics/Quality
- Number of crossings
- Number of bends
- Uniform edge length
- Total area/length
- Symmetries...
- Partial/Local constraints
- Constraint (relative) position of some vertices
- Group vertices
- Conventions