02 FermetureTransitive-EN
02 FermetureTransitive-EN
Two graphs G and G′ are τ-equivalent if τ(G) = τ(G′ ). A partial graph G′ of G is τ-minimal
τ-équivalent to G if it is τ-equivalent to G and, if we remove an arc of G′ , we get a graph
that is not τ-equivalent to G. A graph G′ is τ-minimum τ-équivalent to G if it is τ-minimal
τ-équivalent to G and minimizes the number of arcs.
1. Draw the transitive closure of the following graphs :
B D B D
A
C E C
2. Add some arcs to G′ and G” such that G′ and G” are τ-minimal τ-equivalent to G and G”
contains strictly less arcs than G′ .
A A A
G G′ G”
B C B C B C
3. Show that G is strongly connected if and only if the circuit (x1 , x2 , . . . , xn ) is τ-equivalent to
G, where the xi s are the nodes of G.
4. Show that the previous property is false if we replace τ-equivalent by τ-minimal τ-equivalent.
5. Show that an elementary circuit is τ-minimum τ-equivalent to itself.
6. Show that a graph G is hamiltonian if and only if, every graph τ-minimum τ-equivalent to
G is an hamiltonian circuit of G.
Exercise 2 — τ equivalent graph of a acyclic digraph
Let G be a directed acyclic graph. Show that there exists a unique graph G′ that is τ-equivalent
to G and that minimize the number of arcs. Show that G′ is a partial graph of G.
Exercise 3 — τ-equivalent graphs and reduced graphs
G1 G2
b c d g b c d g
a j i f a j e f
k h e k h i
1
1. Compute the transitive closures of G1 and G2 .
2. Compute the reduced graphs G1R and G2R of G1 and G2 .
3. Compute the transitive closures of G1R and G2R .
4. Show that two graphs are τ-equivalent if and only if their reduced graphs are τ-equivalent.
Exercise 4 — Compute the transitive closure of a graph
1. Describe with pseudo code an algorithm computing the transitive closure of a graph using
the classical algorithms enumerating the nodes of a graph. What is its complexity ?
2. (a) Let A be the adjacency matrix of a graph G. What is Ap ?
(b) Let B be the adjacency matrix of a graph G with 1 on the diagonal cells. What is B p ?
(c) Describe in pseudocode an algorithm computing the transitive closure of a graph using
the powers of either the matrix A or the matrix B. What is its complexity ?
3. The Roy Wharshall algorithm is the following :
B
A D
C
Nine machines, a, b . . ., h and i, are installed in a workshop. Mechanical parts are produced
by successive machines (drills, polishers, welds, . . .). We want to build conveyor belts at minimum
cost in order to move the pieces from a machine to another. The following array gives, for each
machine M , which machines may be used in a next step to build a product. We must link M to
each of those machines by a succession of belts. Model this problem with a graph problem and
solve it.
a b, c, d, e, f, g, h, i
b a, c, d, e, f, g, h, i
c d, e
d e
e d
f d, e, g, h, i
g d, e, f, h, i
h d, e, f, g, i
i d, e, f, g, h