03.02.2014 Views

Advanced Topics in Graph Algorithms

Advanced Topics in Graph Algorithms

Advanced Topics in Graph Algorithms

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Advanced</strong> <strong>Topics</strong> <strong>in</strong> <strong>Graph</strong><br />

<strong>Algorithms</strong><br />

Fedor V. Fom<strong>in</strong><br />

Paderborn 2002<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Lecture 1<br />

What is this course about?<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


What this course is about?<br />

• <strong>Graph</strong>s<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


What this course is about?<br />

• <strong>Graph</strong>s<br />

• Problems on graphs<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


What this course is about?<br />

• <strong>Graph</strong>s<br />

• Problems on graphs<br />

• <strong>Algorithms</strong> to solve these problems<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


<strong>Graph</strong>s<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


<strong>Graph</strong>s<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Problems<br />

• <strong>Graph</strong> color<strong>in</strong>g<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Maximum clique size<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Independent set<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


What properties of a graph can<br />

be useful to solve the problem?<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Basics. <strong>Graph</strong> Theory<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Path P


Cycle C<br />

If<br />

is a path, the graph obta<strong>in</strong>ed from P by add<strong>in</strong>g<br />

is cycle


<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Some special graphs<br />

• Complete graph K n<br />

• Trees<br />

• Bipartite graph<br />

• Complete bipartite graph<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Clique<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


<strong>Algorithms</strong><br />

• We say that an algorithm for problem<br />

Π runs <strong>in</strong> time O(f(n)) if for some<br />

constant c there exists an implementation of A<br />

which term<strong>in</strong>ates after at most O(f(n))<br />

computational steps for all<br />

<strong>in</strong>stances of size n.<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


L<strong>in</strong>ear time algorithm<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


How to represent a graph<br />

• Adjacency list<br />

• Adjacency matrix<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example of l<strong>in</strong>ear problem:<br />

convert<strong>in</strong>g the adjacency list of a graph<br />

<strong>in</strong>to sorted adjacency lists.<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Buck sort<strong>in</strong>g<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Buck sort<strong>in</strong>g<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Buck sort<strong>in</strong>g<br />

• Buck sort<strong>in</strong>g takes<br />

O(n+d i ) time<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Algorithm<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Theorem<br />

• Algorithm Sort<strong>in</strong>g the Adjacency Lists of<br />

<strong>Graph</strong>s runs <strong>in</strong> O(m+n) time.<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Proof:<br />

{<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Another examples<br />

• Test<strong>in</strong>g planarity, connectivity,<br />

biconnectivity<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


NP complete problems<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Part 1. Perfect graphs<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Clique and IS<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Colour<strong>in</strong>g<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Def<strong>in</strong>ition of perfect graphs<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Examples of perfect graphs<br />

• Bipartite graphs<br />

• Cliques<br />

• Odd cycle --- NOT<br />

• More examples to appear later<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example: Integer programm<strong>in</strong>g<br />

Def<strong>in</strong>e<br />

and<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example: Integer programm<strong>in</strong>g<br />

# of IS conta<strong>in</strong>ig is<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example<br />

The dual<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example<br />

If graph is perfect<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Example: F<strong>in</strong>al remark<br />

For l<strong>in</strong>ear programm<strong>in</strong>g (solution is not<br />

necessarily <strong>in</strong>teger) the value of an optimal<br />

solution of the primal is equal to the value of<br />

an optimal solution of the dual. Stat<strong>in</strong>g graph<br />

problems as l<strong>in</strong>ear programm<strong>in</strong>g problem<br />

leads to an <strong>in</strong>terest<strong>in</strong>g field: fractional graph<br />

theory.<br />

In fractional graph theory it is possible that the<br />

fractional chromatic number is not <strong>in</strong>teger but<br />

it should be equal to fractional clique number!<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Chapter I. CHORDAL GRAPHS<br />

CHORDAL GRAPHS PLAY VERY<br />

IMPORTANT ROLE IN OUR COURSE.<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Def<strong>in</strong>ition of chordal graph<br />

• A chord of a cycle C is an edge not <strong>in</strong> C that<br />

has endpo<strong>in</strong>ts <strong>in</strong> C<br />

• A chordless cycle <strong>in</strong> G is a cycle of length<br />

more than three that has no chord.<br />

• A graph G is chordal if it does not conta<strong>in</strong> a<br />

chordless cycle.<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Simlicial vertex: def<strong>in</strong>ition<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Hereditary property<br />

• Exercise:<br />

Prove that chordality is hereditary<br />

property. (In other words, every<br />

<strong>in</strong>duced subgraph of a chordal graph is<br />

chordal.)<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


We shall prove that<br />

every chordal graph has a simplicial vertex. S<strong>in</strong>ce<br />

chordality is hereditary property, this implies the<br />

follow<strong>in</strong>g naive algorithm of test<strong>in</strong>g chordality of a<br />

graph G:<br />

o While there are simplicial vertices do<br />

o F<strong>in</strong>d a simplicial vertex and remove it<br />

o If the result<strong>in</strong>g graph is empty then G is chordal<br />

o Else G is not chordal<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


Runn<strong>in</strong>g time of the naive algorithm<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


PE-order<strong>in</strong>g def<strong>in</strong>ition<br />

Vertex order<strong>in</strong>g of a graph G=(V,E) is a<br />

PE-order<strong>in</strong>g (perfect elim<strong>in</strong>ation order<strong>in</strong>g)<br />

if for every<br />

vertex v i is simplicial <strong>in</strong> the<br />

graph <strong>in</strong>duced by vertex set<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>


M<strong>in</strong>imal separators<br />

• A subset S of vertices of a connected graph G is called an a,bseparator<br />

for non adjacent vertices a and b <strong>in</strong> V(G)\ S if a and b<br />

are <strong>in</strong> different connected component of the subgraph of G<br />

<strong>in</strong>duced by V(G)\ S.<br />

• If no proper subset of an a,b-separator S separates a and b <strong>in</strong><br />

this way, then S is called a m<strong>in</strong>imal a,b-separator .<br />

• A subset S is referred to as a m<strong>in</strong>imal separator, if there exist<br />

non adjacent vertices a and b for which S is a m<strong>in</strong>imal a,bseparator.<br />

• Notice that a m<strong>in</strong>imal separator can be strictly conta<strong>in</strong>ed <strong>in</strong><br />

another m<strong>in</strong>imal separator.<br />

<strong>Advanced</strong> <strong>Topics</strong> <strong>Graph</strong> <strong>Algorithms</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!