Professional Documents
Culture Documents
Michel Habib
habib@liafa.jussieu.fr
http://www.liafa.jussieu.fr/~habib
Schedule
Introduction
1er Cours : Introduction
Schedule
Introduction
Which algorithms ?
1er Cours : Introduction
Schedule
Introduction
Which algorithms ?
Schedule
Introduction
Which algorithms ?
Schedule
Introduction
Which algorithms ?
Schedule
Introduction
Which algorithms ?
Graph Representations
1er Cours : Introduction
Schedule
Introduction
Which algorithms ?
Graph Representations
LexBFS
1er Cours : Introduction
Introduction
Introduction
Which algorithms ?
Graph Representations
LexBFS
1er Cours : Introduction
Introduction
First question
Why such a course ?
1er Cours : Introduction
Introduction
First question
Why such a course ?
First question
Why such a course ?
NP
The class of all graph-theoretic properties expressible in existential
second-order logic is precisely NP.
1er Cours : Introduction
Introduction
First question
Why such a course ?
NP
The class of all graph-theoretic properties expressible in existential
second-order logic is precisely NP.
P
The class of all graph-theoretic properties expressible in Horn
existential second-order logic with successor is precisely P.
1er Cours : Introduction
Introduction
Practical issues
Many applications involve graph algorithms, in particular many
facets of computer science ! ! !
1er Cours : Introduction
Introduction
Graph invariants
Which algorithms ?
◮ Optimal
1er Cours : Introduction
Which algorithms ?
Which algorithms ?
◮ Optimal
◮ Linear
1er Cours : Introduction
Which algorithms ?
Which algorithms ?
◮ Optimal
◮ Linear
◮ Efficient
1er Cours : Introduction
Which algorithms ?
Which algorithms ?
◮ Optimal
◮ Linear
◮ Efficient
◮ Simples
1er Cours : Introduction
Which algorithms ?
Which algorithms ?
◮ Optimal
◮ Linear
◮ Efficient
◮ Simples
◮ Easy to program
1er Cours : Introduction
Which algorithms ?
Introduction
Which algorithms ?
Graph Representations
LexBFS
1er Cours : Introduction
Algorithms versus graph structure : decomposition and/or representation
Examples
◮ Chordal graph recognition and maximal clique trees (
particular case of treewidth).
◮ Transitive orientation and modular decomposition.
◮ Max Flow and decomposing a flow in a sum of positive
circuits.
◮ Minimum spanning trees and matroids
◮ ...
1er Cours : Introduction
Algorithms versus graph structure : decomposition and/or representation
Introduction
Which algorithms ?
Graph Representations
LexBFS
1er Cours : Introduction
Schedule of the course
1. Introduction
1er Cours : Introduction
Schedule of the course
1. Introduction
2. Graph Searches, a new approach
1er Cours : Introduction
Schedule of the course
1. Introduction
2. Graph Searches, a new approach
3. Chordal Graphs and their nice structure
1er Cours : Introduction
Schedule of the course
1. Introduction
2. Graph Searches, a new approach
3. Chordal Graphs and their nice structure
4. Treewidth and other width parameters
1er Cours : Introduction
Schedule of the course
1. Introduction
2. Graph Searches, a new approach
3. Chordal Graphs and their nice structure
4. Treewidth and other width parameters
5. Diameter Computations
1er Cours : Introduction
Schedule of the course
Typical questions
Typical questions
Typical questions
Typical questions
Typical questions
Typical questions
Application domains
Themes
◮ Biocomputing
◮ Networks, Social Networks
◮ Distributed systems
◮ Analysis of huge graphs
1er Cours : Introduction
Problems and Exercises
Introduction
Which algorithms ?
Graph Representations
LexBFS
1er Cours : Introduction
Problems and Exercises
Notation
Some exercises
Some exercises
Some exercises
Definition
x and y are called false twins, (resp. true twins) if
N(x) = N(y ) (resp. N(x) ∪ {x} = N(y ) ∪ {y }))
1er Cours : Introduction
Problems and Exercises
Definition
x and y are called false twins, (resp. true twins) if
N(x) = N(y ) (resp. N(x) ∪ {x} = N(y ) ∪ {y }))
Problem
Propose a good algorithm to compute these classes
1er Cours : Introduction
Problems and Exercises
Planar graphs
Show that if G is a simple planar graph (i.e. without loop and
parallel edge) then :
|E | ≤ 3|V | − 6
1er Cours : Introduction
Problems and Exercises
Research Problems
Research Problems
C1 C2 C3 C4 C5
L1 1 0 1 0 1
L2 0 1 0 1 1
L3 1 1 0 1 1
L4 0 0 0 0 1
L5 0 1 1 0 0
1er Cours : Introduction
Problems and Exercises
C1 C2 C3 C4 C5 C3 C1 C4 C5 C2
L1 1 0 1 0 1 L4 0 0 0 1 0
L2 0 1 0 1 1 L1 1 1 0 1 0
L3 1 1 0 1 1 L5 1 0 0 0 1
L4 0 0 0 0 1 L2 0 0 1 1 1
L5 0 1 1 0 0 L3 0 1 1 1 1
1er Cours : Introduction
Problems and Exercises
Introduction
Which algorithms ?
Graph Representations
LexBFS
1er Cours : Introduction
Graph Representations
◮ Adjacency lists
O(|V | + |E |) memory words
Adjacency test : xy is an arc in O(|N(x)|)
1er Cours : Introduction
Graph Representations
◮ Adjacency lists
O(|V | + |E |) memory words
Adjacency test : xy is an arc in O(|N(x)|)
◮ Adjacency Matrix
O(|V |2 ) memory words (can be compressed)
Adjacency test : xy is an arc in O(1)
1er Cours : Introduction
Graph Representations
◮ Adjacency lists
O(|V | + |E |) memory words
Adjacency test : xy is an arc in O(|N(x)|)
◮ Adjacency Matrix
O(|V |2 ) memory words (can be compressed)
Adjacency test : xy is an arc in O(1)
◮ Customized representations, a pointer for each arc . . .
1er Cours : Introduction
Graph Representations
For some large graphs, the Adjacency matrix, is not easy to obtain
and manipulate.
But the neighbourhood of a given vertex can be obtained. (WEB
Graph)
1er Cours : Introduction
Graph Representations
Quicksands
Quicksands
Exercise
Exercise
In other words
Using O(n2 ) space, but with linear time algorithms on graphs ?
1er Cours : Introduction
Graph Representations
Auto-complemented representations
Initial Matrix
1 2 3 4
1 1 1 1 0
2 0 0 1 0
3 1 0 1 1
4 1 0 0 0
1er Cours : Introduction
Graph Representations
Auto-complemented representations
1 1 1 1 0 1 0 1 0 0
2 0 0 1 0 2 1 0 0 0
3 1 0 1 1 3 0 0 0 1
4 1 0 0 0 4 0 0 1 0
1er Cours : Introduction
Graph Representations
Introduction
Which algorithms ?
Graph Representations
LexBFS
1er Cours : Introduction
LexBFS
{7}
{7} 7 {7}
1er Cours : Introduction
LexBFS
{6} {7}
{6} 6 7 {7}
1er Cours : Introduction
LexBFS
{65} 5 {5}
{6} 6 7 {7}
1er Cours : Introduction
LexBFS
{65} 5 {54}
{6} 6 7 4
1er Cours : Introduction
LexBFS
3 5 {54}
{63} 6 7 4
1er Cours : Introduction
LexBFS
3 5 {54}
2 6 7 4
1er Cours : Introduction
LexBFS
3 5 1
2 6 7 4
1er Cours : Introduction
LexBFS
Chordal graph
5
6 7 2
1 4 8 3
A vertex is simplicial if its neighbourhood is a clique.
1er Cours : Introduction
LexBFS
Chordal graph
5
6 7 2
1 4 8 3
A vertex is simplicial if its neighbourhood is a clique.
??
a b c
1er Cours : Introduction
LexBFS
Chordal graph
5
6 7 2
1 4 8 3
A vertex is simplicial if its neighbourhood is a clique.
a b c
1er Cours : Introduction
LexBFS
7
8
1er Cours : Introduction
LexBFS
7
8 6
1er Cours : Introduction
LexBFS
5 7
4 8 6
1er Cours : Introduction
LexBFS
5 7 3
4 8 6
1er Cours : Introduction
LexBFS
2
5 7 3
1 4 8 6
1er Cours : Introduction
LexBFS