Simplified External memory Algorithms for Planar DAGs. July 2004



Similar documents
Social Media Mining. Graph Essentials

Part 2: Community Detection

Finding and counting given length cycles

CIS 700: algorithms for Big Data

SCAN: A Structural Clustering Algorithm for Networks

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina

5.1 Bipartite Matching

Scheduling Shop Scheduling. Tim Nieberg

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

Labeling outerplanar graphs with maximum degree three

Distance Degree Sequences for Network Analysis

The Goldberg Rao Algorithm for the Maximum Flow Problem

From Point Cloud to Grid DEM: A Scalable Approach

Course on Social Network Analysis Graphs and Networks

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

Total colorings of planar graphs with small maximum degree

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis

Data Structures and Algorithms Written Examination

Lecture 1: Course overview, circuits, and formulas

Algorithm Design and Analysis

Shortest Path Algorithms

Connectivity and cuts

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Problem Set 7 Solutions

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis. Contents. Introduction. Maarten van Steen. Version: April 28, 2014

Mining Social Network Graphs

Linear Programming I

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

Graph/Network Visualization

The Clar Structure of Fullerenes

Arrangements And Duality

Midterm Practice Problems

Disjoint Compatible Geometric Matchings

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

Introduction to Graph Theory

Graph Mining and Social Network Analysis

Strictly Localized Construction of Planar Bounded-Degree Spanners of Unit Disk Graphs

On the independence number of graphs with maximum degree 3

UPPER BOUNDS ON THE L(2, 1)-LABELING NUMBER OF GRAPHS WITH MAXIMUM DEGREE

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72.

CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin

THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM

Solutions to Homework 6

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Bargaining Solutions in a Social Network

Social Media Mining. Network Measures

SGL: Stata graph library for network analysis

GRAPH THEORY LECTURE 4: TREES

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Every tree contains a large induced subgraph with all degrees odd

Triangle deletion. Ernie Croot. February 3, 2010

Network File Storage with Graceful Performance Degradation

Network Algorithms for Homeland Security

Global secure sets of trees and grid-like graphs. Yiu Yu Ho

Discrete Mathematics Problems

Exam study sheet for CS2711. List of topics

DATA ANALYSIS II. Matrix Algorithms

An Introduction to The A* Algorithm

Big Graph Processing: Some Background

Cpt S 223. School of EECS, WSU

Distributed Computing over Communication Networks: Topology. (with an excursion to P2P)

8.1 Min Degree Spanning Tree

Data Mining. Cluster Analysis: Advanced Concepts and Algorithms

Three Effective Top-Down Clustering Algorithms for Location Database Systems

1 Introduction. Dr. T. Srinivas Department of Mathematics Kakatiya University Warangal , AP, INDIA

The Binary Blocking Flow Algorithm. Andrew V. Goldberg Microsoft Research Silicon Valley goldberg/

Removing Even Crossings

Asking Hard Graph Questions. Paul Burkhardt. February 3, 2014

! E6893 Big Data Analytics Lecture 10:! Linked Big Data Graph Computing (II)

On the k-path cover problem for cacti

Simple Graphs Degrees, Isomorphism, Paths

Persistent Data Structures

Network Design with Coverage Costs

On Integer Additive Set-Indexers of Graphs

Mining Social-Network Graphs

The PageRank Citation Ranking: Bring Order to the Web

6.852: Distributed Algorithms Fall, Class 2

CSE 4351/5351 Notes 7: Task Scheduling & Load Balancing

Shortcut sets for plane Euclidean networks (Extended abstract) 1

5 Directed acyclic graphs

Parallel Simplification of Large Meshes on PC Clusters

2.8 An application of Dynamic Programming to machine renewal

An Introduction to APGL

Applied Algorithm Design Lecture 5

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010

CMPSCI611: Approximating MAX-CUT Lecture 20

Single machine parallel batch scheduling with unbounded capacity

Dimitris Chatzidimitriou. Corelab NTUA. June 28, 2013

A Review And Evaluations Of Shortest Path Algorithms

Transcription:

Simplified External Memory Algorithms for Planar DAGs Lars Arge Duke University Laura Toma Bowdoin College July 2004

Graph Problems Graph G = (V, E) with V vertices and E edges DAG: directed acyclic graph G is planar if it can be drawn in the plane so no edges cross Some fundamental problems: BFS, DFS Single-source shortest path (SSSP) Topological order of a DAG A labeling of vertices such that if (v,u) in E then µ(v)< µ(u) 4 3 5 6 1 9 7 2 12 10 11 8

Massive graphs Massive planar graphs appear frequently in GIS Terrains are stored as grids or triangulations Example: modeling flow on terrain Each point is assigned a flow direction such that the resulting graph is directed and acyclic To trace the amount of flow must topologically sort this graph Massive graphs stored on disk Assume edge-list representation stored on disk Adj(v1) Adj(v2) Adj(v3) G I/O can be severe bottleneck

I/O Model [AV 88] Parameters: N = V+E B = disk block size M = memory size Block I/O M I/O-operation: movement of one block of data from/to disk Fundamental bounds: Scanning: scan(n) = O( N B ) I/Os N N Sorting: sort(n) = O log M ) I/Os ( B B B In practice B and M are big N B < log M << N B B N B N

Previous esults Lower bound: Ω(min{ V,sort( V )}) (practically sort(v)) Not matched for most general graph problems, e.g. General undirected graphs BFS: VE O ( + sort( E)) B VE W SSSP: O ( log + sort( E)) B w E DFS: O (( V+ )logv + sort( E)) B [MM 02] [MZ 03] [KS 96] General directed graphs BFS, DFS, SSSP, topological order (DAG) E O (( V+ )logv + sort( E)) [BVWB 00] B Sparse graphs E=O(V) Directed BFS, DFS, SSSP: O(V) I/Os

Previous esults Improved algorithms for special classes of (sparse) graphs Planar undirected graphs solved using O(sort(N)) reductions DFS [AMTZ01] BFS [ABT01] Multi-way separation [ABT01] SSSP O(sort(N)) multi-way separation algorithm [MZ 02] Generalized to planar directed graphs BFS, SSSP: O(sort(N)) [ATZ 03] DFS: O(sort(N) log N) [AZ 03] Planar DAG topological sort : O(sort(N)) [ATZ 03] Computed using a DED of the dual graph

Our esults Simplified algorithms for planar DAGs O(scan(N)) I/Os separation ============> top order, BFS, SSSP This does not improve the O(sort(N)) known upper bound since computing the separation takes O(sort(N)) I//Os Previous algorithms take O(sort(N)) even if separation is given

Planar graph separation: -partition A partition of a planar graph using a set S of separator vertices into subgraphs (clusters) of at most vertices each such that: O( N ) O( N ) separators vertices in total Each cluster is adjacent to separator vertices O( ) In external memory choose = B 2 O(N/B) separator vertices O(N/B 2 ) clusters, O(B 2 ) vertices each and O(B) boundary vertices Can be computed in O(sor(N)) I/Os [MZ 02]

1. Compute a B 2 -partition of G Planar SSSP 2. Construct a substitute graph G on the separator vertices such that it preserves SP in G between any u,v in S replace each subgraph G i with a complete graph on boundary of G i for any u, v on boundary of G i, the weight of edge (u,v) is δ Gi (u,v) 3. Solve SSSP on G 4. Find SSSP to vertices inside clusters s B 2 t Computed efficiently using G has O(N/B) vertices and O(N) edges Properties of the B 2 -partition

A Topological Sort Algorithm Compute indegree of each vertex Maintain list Z of indegree-zero vertices epeatedly Number an indegree-zero vertex v Consider all edges (v,u) and decrement indegree of u If indegree(u) becomes 0 insert u in list Z v O(1) I/O per edge ==> O(N) I/Os

Topological Sort using B 2 -partition 1. Construct a substitute graph G using B 2 -partition edge from v to u on boundary of G i iff exists path from v to u in G i B 2 Lemma: for any separator vertices u,v if u is reachable from v in G, then u is reachable from v in G 2. Topologically sort G (separator vertices in G) Lemma: A topological order on G is a topological order on G. 3. Compute topological order inside clusters

Topological Sort using B 2 -partition Problem: Not clear how to incorporate removed vertices from G in topological order of separator vertices (G ) E D A 5 4 3 F C B 1 2 Solution (assuming only one in-degree zero vertex s for simplicity): Longest-path-from-s order is a topological order Longest paths to removed vertices locally computable from longest-paths to boundary vertices s B 2 t

Topological Sort using B 2 -partition 1. Construct substitute graph G Weight of edge between v and u on boundary of G i equal to length of longest path from v to u in G i 2. Topologically sort G 3. Compute longest path to each vertex in G (same as in G): Maintain list L of longest paths seen to each vertex epeatedly: Obtain longest path for the next vertex v in topological order Consider all edges (v,u) and update longest path to u in L 4. Find longest path to vertices inside clusters v

Longest path to vertices inside a cluster must cross the boundary of the cluster _ s u v LP(v) = max u Bnd(Gi) {LP(u) + LP Gi (u,v)} G j

Analysis Topologically sort G Maintain a list L with the indegree of each vertex Maintain list Z of indegree-zero vertices epeatedly Number an indegree-zero vertex v from Z Consider all edges (v,u) and decrement indegree of u in L If indegree(u) becomes 0 insert u in list Z v G has O(N/B) vertices and O(N/B 2 x B 2 ) = O(N) edges Each vertex: access its adjacency list ==> O(N/B) I/Os Each edge (v,u): update L ==> O(N) I/Os Can be reduced to O(N/B) using boundary set property

Analysis Boundary set in the B 2 -partition (Maximal) set of separator vertices adjacent to the same clusters A boundary set is of size O(B) There are O(N/B 2 ) boundary sets [F 87] (ass. bounded degree) We store L so that vertices in the same boundary set are consecutive Vertices in same boundary set have same O(B) neighbors in G Each boundary set is accessed once by each neighbor in G Each boundary set has size O(B) O(N/B 2 ) x O(B) = O(N/B) I/Os

Conclusion and Open Problems Given a B 2 -partition topological order can be computed in O(scan)N)) I/Os Longest path idea can also be used to compute SSSP and BFS in the same bound Open problems: Improved DFS on DAGs? (exploiting acyclicity) Planar directed DFS O(sort(N) log N)

Analysis Compute longest path to each vertex in G (same as in G): Maintain list L of longest paths seen to each vertex epeatedly: Obtain longest path for next vertex v in topological order Consider all edges (v,u) and update longest path to u We store L so that vertices in the same boundary set are consecutive Vertices in same boundary set have same O(B) neighbors in G Each boundary set is accessed once by each neighbor in G Each boundary set has size O(B) O(N/B 2 ) x O(B) = O(N/B) I/Os v