Docsity

Graph Processing: A Comprehensive Guide to Graph Representations, Algorithms, and Tools - , Study notes of Physics

Partial preview of the text

Download Graph Processing: A Comprehensive Guide to Graph Representations, Algorithms, and Tools - and more Study notes Physics in PDF only on Docsity!

  • Graph Processing ISTVÁN ALBERTBIOINFORMATICS CENTERHUCK INSTITUTES FOR THE LIFE SCIENCESSPRING -

Covering introductory conceptsGraph RepresentationsGraph AlgorithmsSoftware Tools for Visualization

Typical Graph Processing Problems^ y^ Compute some static value of thegraph -

degree distribution, clusteringcoefficient

y^ Identify some subset of edges orvertices

  • shortest path, spanning tree,connected components

Implementation: more difficult than it seems^ y^ The Challenge of Binary Search - it tookmore than 10 years to publish the firstcorrect binary search^ y^ Graph algorithms are notoriously difficultto test for correctness

Travelling Salesman

Given a list of cities and their pair-wise distances,find a shortest possible tour that visits each cityexactly once.

Clearly a network problem. One of the most intensively studied problems in

optimization

Graph algorithms can be hardSome are NP Hard - proven to have no efficientsolutions - better than O(N

k^ )^ k = constant Traveling salesman: O(N!)15!/5! = 10 billionMany others are unknown Luckily problems can often be greatly simplified

Representations

V - number of vertices (nodes), E- number of edgesEdge array - size: EAdjacency matrix -

size: V * V

Adjacency lists - size: V + E

“pure” representations

Adjacency matrix^ a^ b^

c^ d^ e

f^ g^

h

a^0

0 0

1 0 1

0

b^1

1 0

0 0 0

1

c^0

0 1

0 1 1

0

d^0

1 0

1 0 0

0

e^1

0 1

0 0 0

0

f^0

1 0

0 0 1

0

g^1

1 0

0 0 0

0

h^0

0 0

0 0 0

0

Representation properties V - number of vertices

E - number of edges matrix list^

edge array

space^

2 V
V+E^
E

find edge^

V^
E

insert edge^

path^ v^ to^ w?

2 V
V+E^

E lgV

Important details

y^ Directional or undirectional y^ Cyclic or acyclic y^ Self loops y^ Parallel edges y^ Node or edge removal (hiding)Surprising number of tools do not fully support all these featuresOptimize the data structure for the task

Which two graphs are identical?

Graph traversal = exploring a maze

Following one particular traversal

Vertex^

Pre^ Posta 1

b^

c^

d^

e^

f^

g^

h^

Glossary for DFS trees

y^ edges corresponding to recursive calls (tree edges)^ {^ tree link

if w^ has not been visited {^ parent link

if during the traversal we went from

v^ to^ w

y^ edges connecting a vertex with an ancestor that is not aparent^ {^ back link

if^ pre[w] < pre[v] {^ down link

if^ pre[w] > pre[v]