Chapter 9 (Layered drawings of digraphs) By: Waldo & Ludo uv.

Slides:



Advertisements
Similar presentations
Bellman-Ford algorithm
Advertisements

CS1022 Computer Programming & Principles Lecture 8.1 Digraphs (1)
Chapter 6. Relaxation (1) Superstring Ding-Zhu Du.
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Seminar Graph Drawing H : Introduction to Graph Drawing Jesper Nederlof Roeland Luitwieler.
The Cartesian Coordinate System
Directed Graphs. Given vertices u and v of a digraph G , we say that u reaches v (and v is reachable from u ) if G  has a directed path from u to.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
Lecture 16 CSE 331 Oct 9, Announcements Hand in your HW4 Solutions to HW4 next week Remember next week I will not be here so.
Chapter 9 Graph algorithms Lec 21 Dec 1, Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
Shortest Path Algorithm By Weston Vu CS 146. What is Shortest Paths? Shortest Paths is a part of the graph algorithm. It is used to calculate the shortest.
2-Layer Crossing Minimisation Johan van Rooij. Overview Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer:
Discrete Math for CS Chapter 8: Directed Graphs. Discrete Math for CS digraph: A digraph is a graph G = (V,E) where V is a finite set of vertices and.
CS2420: Lecture 36 Vladimir Kulyukin Computer Science Department Utah State University.
Lesson Topic: Drawing the Coordinate Plane and Points on the Plane
I NTRODUCTION TO G RAPH DRAWING Fall 2010 Battista, G. D., Eades, P., Tamassia, R., and Tollis, I. G Graph Drawing: Algorithms for the Visualization.
Flow and Upward Planarity
Crossing Minimisation (1) Ronald Kieft. Global contents Specific 2-layer Crossing Minimisation techniques After the break, by Johan Crossing Minimisation.
System of Linear Equations with One Solution Solve the given system of linear equations by graphing both equations on the same integer screen. 1. The point.
1 Orthogonal Drawing (continued)  Sections 8.3 – 8.5 from the book  Bert Spaan.
A split&push approach to 3D orthogonal drawings giuseppe di battista univ. rome III maurizio patrignani univ. rome III francesco vargiu aipa.
Chapter 1 Section 1.1Functions. Functions A Notation of Dependence ◦ What does that mean? Rule which takes certain values as inputs and assigns them exactly.
Visual C++ Programming: Concepts and Projects Chapter 11B: Pointers (Tutorial)
Paradigms for Graph Drawing Graph Drawing: Algorithms for the Visualization of Graphs - Chapter 2 Presented by Liana Diesendruck.
© 2004 Goodrich, Tamasia Recall: Digraphs A digraph is a graph whose edges are all directed Short for “directed graph” Applications one-way streets flights.
Graph.
3-3 The Coordinate Plane ► Standard (P5) I will be able to plot points in the coordinate plane ► Fold and cut ordered pair and coordinate plane foldable,
SOLVING SIMULTANEOUS EQUATIONS GRAPHICALLY Slideshow 32, Mathematics Mr Richard Sasaki, Room 307.
Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms.
Graph Concepts and Algorithms Using LEDA By Caroline Moore and Carmen Frerichs (252a-at and 252a-ao) each graph in the presentation was created using gw_basic_graph_algorithms.
Graph Concepts Elif Tosun 252a-aa (All graphics created by using demo/graphwin/gw*)
Graph Concepts Illustrated Using The Leda Library Amanuel Lemma CS252 Algorithms.
Graphing Linear Equations Chapter 7.2. Graphing an equation using 3 points 1. Make a table for x and y to find 3 ordered pairs. 2. I choose 3 integers.
CSC 252: Algorithms October 28, 2000 Homework #5: Graphs Victoria Manfredi (252a-ad) notes: -Definitions for each of the graph concepts are those presented.
Hw. 6: Algorithm for finding strongly connected components. Original digraph as drawn in our book and in class: Preorder label : Postorder label Nodes:
1 Schnyder’s Method. 2 Motivation Given a planar graph, we want to embed it in a grid We want the grid to be relatively small And we want an efficient.
Graph Terms By Susan Ott. Vertices Here are 7 vertices without any edges Each Vertex is labeled a different color and number.
Spanning Trees Alyce Brady CS 510: Computer Algorithms.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
Computer Graphics (fall,2010) School of Computer Science University of Seoul Minho Kim.
To find the solution of simultaneous equations graphically: 1)
Chapter 2 Organizing and Summarizing Data
Standard Form I can identify intercepts from an equation.
Lecture 12 Graph Algorithms
ASSIGNMENT NO.-2.
Graphing Linear Equations in Standard Form
Points, Lines, and Their Graphs
The Coordinate Plane By: Christine Berg Edited By:VTHamilton.
Biogeochemical Cycles
CS223 Advanced Data Structures and Algorithms
The Slope-Intercept Form of a Linear Equation
Topological Sort CSE 373 Data Structures Lecture 19.
Chapter 9: Graphs Basic Concepts
What is the x-intercept?
Label Name Label Name Label Name Label Name Label Name Label Name
The Coordinate Plane By: Christine Berg Edited By:VTHamilton.
EDLC(Embedded system Development Life Cycle ).
Graphs Examples on some basic graph concepts and definitions All graphics are taken from the LEDA demos: basic_graph_algorithms, gw_shortest_paths, graphwin.
Review Node Voltage Method
Which photo is the cross section?
Chapter Seven Constructions and Scale Drawings
Acyclic k-Coloring. Acyclic k-Coloring Acyclic Coloring with Division Vertices.
Graphs of Polynomials Functions
Objective: To write equations of lines.
2.7 Dilations Essential Question: How do you dilate a figure to create a reduction or enlargement?
11.7 Dilations/Rotation Objective: Students will be able to explain if a figure’s dilation will be an increase or decrease based on the scale factor.
EQUATIONS OF LINES IN STANDARD FORM
Lecture 11 Graph Algorithms
Chapter 9: Graphs Basic Concepts
Chapter 23: Minimum Spanning Trees: A graph optimization problem
Presentation transcript:

Chapter 9 (Layered drawings of digraphs) By: Waldo & Ludo uv

Chapter 9 (Graphically) 1.The hierarchical approach: Cyclic aCyclic Layered drawing of G DiGraph G Cycle Removal (9.4) Layer assignment Crossing reduction X coordinate assignment (9.1) (9.2) (9.3) Waldo Ludo Waldo Handled by :

Important requirements of layering: 1.The layered digraph should be compact. 2.The layering should be proper. 3.The number of dummy vertices should be small

The layering algorithm: 1.No labels are set 2.Assign labels (integer), such that s < v < t 3.Assign vertices to a layer, such that layer of t <= v <= s

selecting vertices to label 1.When choosing a vertex v all preceding vertices u (u,v) should be labeled and minimized. Minimization is accomplished by looking at the most significant labels. Example {6} < {3,7}; {1,2,9} < {2,3,9}; etc. For more on this definition see page 274 of the book

Phase one (assign labels)

selecting vertices to add to a layer 1.When choosing a vertex u all vertices v (u,v) should be placed in a layer lower than u.

Phase two (assign layers)

Input: Reduced digraph G=(V,E) and a positive integer W Output: Layering of G of width at most W Algorithm (Coffman-Graham layering) Initially, all vertices are unlabeled (trivial, as we’ve seen) For (i = 1 to |V|) perform a. Choose an unlabeled vertex v, such that {lbl(u) : (u,v) element of E } is minimized b. Lbl(v) = i K=1; L1=null; U=null. While U != V loop a. Choose u element of (V-U), such that every vertex in {v : (u,v) element of E} is in U, and lbl(u) is maximized b. If not |Lk| < W and for every edge (u,w), w is element of preceding levels then k++; add u to Lk c. Add u to U.

Phase two (adjusted)

Algorithm (Coffman-Graham layering) adjusted 1)Exercise.. (only for phase two – previous slide) A. Describe the adjusted algorithm B. Draw the iterational steps of the adjusted algorithm one by one.

Crossing Reduction Input: proper layered digraph Layer-by-Layer Sweep Two-Layer Crossing Problem

Each vertex in the two layers gets a unique x-coordinate, purely for ordering purposes: Two-Layer Crossing Problem

uv Crossing Numbers

uv

pur q pqur p0211 q5063 u6906 r2320

pur q pqur p0211 q5063 u6906 r2320

pur q pqur p0211 q5063 u6906 r2320

pur q pqur p0211 q5063 u6906 r2320

pur q pqur p0211 q5063 u6906 r2320

Algorithms for minimizing Adjacent Exchange  Similar to Bubble-sort Split  Similar to Quick-sort Barycenter Method Median Method Quadratic time Linear time

Adjacent-Exchange uv

uv

uv

uv

Split ap

ap

pb

pb

p

apb

u Barycenter Method 7 If same barycenter: seperate arbitrarily by small amount

u Median Method 7 X-coordinate of u is the median of its neighbours If no neighbours, then med(u) = 0 Special case, if med(u) = med(v)...odd degree left, even right Median ???

Not always optimal 7 Barycenter Median 89 10

Bends occur at dummy vertices Objective is to: – Reduce angles of bends (minimal width) – Keep ordering of crossing reduction step Horizontal Coordinate Assignment

X 2 3

Cycle Removal Vertex sequence for G : Dashed edges are the leftward edges Leftward edges form feedback set R Reversing R makes G acyclic

Cycle Removal Problem: – Minimizing leftward edges / feedback set R How? – Greedy Cycle Removal Algorithm

Cycle Removal Iterate: prepend sinks to S r and remove them from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G Iterate: append sources to S l and remove them from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G Iterate: append sources to S l and remove them from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G Iterate: append sources to S l and remove them from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G Iterate: append sources to S l and remove them from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G Iterate: append sources to S l and remove them from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G Iterate: append sources to S l and remove them from G Choose vertex u such the outdegree(u) – indegree(u) is max, append to S l and remove from G

Cycle Removal Iterate: prepend sinks to S r and remove them from G Iterate: append sources to S l and remove them from G Choose vertex u such the outdegree(u) – indegree(u) is max, append to S l and remove from G Concatenate S l and S r to obtain S

Cycle Removal

Chapter 9 (in a nutshell) The hierarchical approach: Layer assignment Crossing reduction Horizontal coordinate assignment

Exercise 1)Prove Theorem 9.1 (Exercise 3 in book)