Top Banner
Join-Reachability Problems in Directed Graphs Loukas Georgiadis University of Western Macedonia, Greece Joint work with Stavros Nikolopoulos and Leonidas Palios University of Ioannina, Greece
44
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Csr2011 june16 11_30_georgiadis

Join-Reachability Problems

in Directed Graphs

Loukas GeorgiadisUniversity of Western Macedonia, Greece

Joint work with

Stavros Nikolopoulos and Leonidas PaliosUniversity of Ioannina, Greece

Page 2: Csr2011 june16 11_30_georgiadis

Graph Reachability

(Is there a path in from to ?)

Is vertex reachable from vertex ?

Reachability Query :

Goal: Construct a Data Structure that answers reachability queries efficiently

(Directed) Graph

Page 3: Csr2011 june16 11_30_georgiadis

Graph Reachability

(Is there a path in from to ?)

Is vertex reachable from vertex ?

Reachability Query :

Goal: Construct a Data Structure that answers reachability queries efficiently

Efficiency of a Data Structure:

storage space

query time

Easy : Efficiency or

Hard : Efficiency close toSo far achieved only for

restricted graph classes

(e.g., trees, planar graphs)

Page 4: Csr2011 june16 11_30_georgiadis

Join-ReachabilityCollection of graphs

Join-Reachability Graph

in all

in

Report all vertices that reach in all graphs

Join-Reachability Query :

Page 5: Csr2011 june16 11_30_georgiadis

Join-ReachabilityCollection of graphs

Join-Reachability Graph

in all

in

Combinatorial Problem : • Compute a of small size

• Compute/approximate smallest

Data Structure Problem : • Compute an efficient data structure for

- report all vertices s.t. for a query vertex

- small space

Report all vertices that reach in all graphs

Join-Reachability Query :

Page 6: Csr2011 june16 11_30_georgiadis

Join-ReachabilityCollection of graphs

Report all vertices that reach in all graphs

Join-Reachability Query :

Ranking 1

1. Item A

2. Item B

3. Item C

...

Ranking λ

1. Item B

2. Item D

3. Item A

...

Applications: Graph Algorithms, Data Bases, Natural Language Processing,…

Example: Rank Aggregation

Given a collection of rankings of some items, we would like to report fast all

items ranked higher than a query item in all rankings.

Page 7: Csr2011 june16 11_30_georgiadis

Motivation

f

Computing frequency dominators [G. ‘08]

Page 8: Csr2011 june16 11_30_georgiadis

Motivation

Applications of Independent Spanning Trees [G. and Tarjan 2005, 2011]

Page 9: Csr2011 june16 11_30_georgiadis

Motivation

Data Structure : Given rooted trees and on the same nodes

(i) Test if contains .

(ii) Return the topmost vertex in .

support the operations:

(iii) Test if and contain a common vertex.

(iv) Find the lowest ancestor of in that is contained in .

(v) Find the highest ancestor of in that is contained in .

Computing Pairs of Disjoint Paths [G. 2010]

Page 10: Csr2011 june16 11_30_georgiadis

Computational Morphological Analysis

Computational Approach: Morphological patterns as graph reachability problems

Απολσμ-

-αιν--αν*-

-θηκ- -θ-

-*σμεν-

-τικ-

-τήριο-ος -η -ο

-ω -α -ομαι-ομοσν -οντας

-της

Page 11: Csr2011 june16 11_30_georgiadis

Join-Reachability

Join-Reachability Graph

in and

in

We consider the case of two digraphs:

Page 12: Csr2011 june16 11_30_georgiadis

Outline

Graph Reachability

Join-Reachability Problems

• Motivation

• Preprocessing

− Layer Decomposition

− Removing Cycles

• Join-Reachability Graph

− Computational Complexity

− Combinatorial Complexity

• Join-Reachability Data Structures

Concluding Remarks

Page 13: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

Reduces digraph reachabiliy to reachability in 2-layered digraphs

Page 14: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

Reduces digraph reachabiliy to reachability in 2-layered digraphs

2-layered digraph : Has a 2-layered spanning tree, i.e. every undirected

root-to-leaf path consists of 2 directed paths

Page 15: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

Reduces digraph reachabiliy to reachability in 2-layered digraphs

arbitrary vertex

chosen as root

Page 16: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

Reduces digraph reachabiliy to reachability in 2-layered digraphs

vertices reachable

from

Page 17: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

Reduces digraph reachabiliy to reachability in 2-layered digraphs

vertices reaching

Page 18: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

Reduces digraph reachabiliy to reachability in 2-layered digraphs

vertices reachable

from

Page 19: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

vertices reaching

Reduces digraph reachabiliy to reachability in 2-layered digraphs

Page 20: Csr2011 june16 11_30_georgiadis

Thorup’s Layer Decomposition

is induced by and

index of layer containing

We can use this method to reduce general join-reachabiliy to

join-reachability in 2-layered digraphs

Reduces digraph reachabiliy to reachability in 2-layered digraphs

Page 21: Csr2011 june16 11_30_georgiadis

Removing Cycles

Reduces digraph (join-)reachabiliy to (join-)reachability in acyclic digraphs

Page 22: Csr2011 june16 11_30_georgiadis

Removing Cycles

Reduces digraph (join-)reachabiliy to (join-)reachability in acyclic digraphs

contract

strong components

Page 23: Csr2011 june16 11_30_georgiadis

Removing Cycles

Reduces digraph (join-)reachabiliy to (join-)reachability in acyclic digraphs

contract

strong components

split to common

subcomponents

Page 24: Csr2011 june16 11_30_georgiadis

Outline

Graph Reachability

Join-Reachability Problems

• Motivation

• Preprocessing

− Layer Decomposition

− Removing Cycles

• Join-Reachability Graph

− Computational Complexity

− Combinatorial Complexity

• Join-Reachability Data Structures

Concluding Remarks

Page 25: Csr2011 june16 11_30_georgiadis

Join-Reachability GraphCollection of graphs

Join-Reachability Graph

in and

in

Page 26: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Computational Complexity

Two cases: • (Steiner vertices not allowed)

• (Steiner vertices allowed)

smallest is polynomial-time computable

smallest is NP-hard to compute

Join-Reachability Graph

in and

in

Collection of graphs

Page 27: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph

Steiner vertices can significantly reduce the size of

Page 28: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

We bound the size of when Steiner vertices are allowed

Join-Reachability Graph

in and

in

Collection of graphs

Main Idea: Geometric representation of join-reachability for paths and trees

Page 29: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Construction of a compact join-reachability graph for paths

Each vertex is mapped to a point

number of vertices reachable from in

Page 30: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Construction of a compact join-reachability graph for paths

Each vertex is mapped to a point

number of vertices reachable from in

Page 31: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

For each , such that add Steiner

vertex with coordinates and arc

Construction of a compact join-reachability graph for paths

Each vertex is mapped to a point

number of vertices reachable from in

Page 32: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Construction of a compact join-reachability graph for paths

Each vertex is mapped to a point

number of vertices reachable from in

Connect Steiner vertices in a bottom-up path

For each , such that add Steiner

vertex with coordinates and arc

Page 33: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

For each , such that add arc

nearest Steiner neighbor with

Construction of a compact join-reachability graph for paths

Each vertex is mapped to a point

number of vertices reachable from in

Connect Steiner vertices in a bottom-up path

For each , such that add Steiner

vertex with coordinates and arc

Page 34: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Use recursion for the sets

and

Construction of a compact join-reachability graph for paths

Each vertex is mapped to a point

number of vertices reachable from in

For each , such that add arc

nearest Steiner neighbor with

Connect Steiner vertices in a bottom-up path

For each , such that

vertex with coordinates and arc

add Steiner

arcs + vertices per recursion levelUpper Bound:

Page 35: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Use recursion for the sets

and

Construction of a compact join-reachability graph for paths

Each vertex is mapped to a point

number of vertices reachable from in

For each , such that add arc

nearest Steiner neighbor with

Connect Steiner vertices in a bottom-up path

For each , such that

vertex with coordinates and arc

add Steiner

arcs + vertices per recursion level

Lower Bound : There are instances for which

Upper Bound:

Page 36: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Construction of a compact join-reachability graph for trees

Each vertex is mapped to a rectangle

depth-first search interval of in

Page 37: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Construction of a compact join-reachability graph for trees

Each vertex is mapped to a rectangle

depth-first search interval of in

out-tree, out-tree :

Page 38: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Construction of a compact join-reachability graph for trees

Each vertex is mapped to a rectangle

depth-first search interval of in

in-tree, in-tree :

Page 39: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Construction of a compact join-reachability graph for trees

Each vertex is mapped to a rectangle

depth-first search interval of in

out-tree, in-tree :

Page 40: Csr2011 june16 11_30_georgiadis

Join-Reachability Graph: Combinatorial Complexity

Page 41: Csr2011 june16 11_30_georgiadis

Outline

Graph Reachability

Join-Reachability Problems

• Motivation

• Preprocessing

− Layer Decomposition

− Removing Cycles

• Join-Reachability Graph

− Computational Complexity

− Combinatorial Complexity

• Join-Reachability Data Structures

Concluding Remarks

Page 42: Csr2011 june16 11_30_georgiadis

Join-Reachability Data Structures

Collection of graphs

(Vertices such that there is a path in all )

Report all vertices that reach in all graphs

Join-Reachability Query :

Efficiency of a Data Structure:

storage space

time to report vertices

Page 43: Csr2011 june16 11_30_georgiadis

Join-Reachability Data Structures

Page 44: Csr2011 june16 11_30_georgiadis

Concluding Remarks

• Complexity of computing smallest for simple graph classes

• Approximate smallest for simple graph classes

• Data structures supporting more general join-reachability queries

e.g., report all such that and

More Problems: