a ⇒ b b ⇒ e c ⇒ e c ⇒ d d ⇒ f e ⇒ f |
Corresponding directed graph:
a ⇒ b and b ⇒ c implies: a ⇒ c |
a < b and b < c implies: a < c |
|
|
|
|
|
|
|
Proof:
|
v1, v2, ..., vn = an arbitrary numbering of the vertices G0 = G; // Initialize for ( k = 1; k <= n; k++ ) { Gk = Gk-1; // Build next graph for ( i = 1; i <= n; i++ ) { for ( j = 1; j <= n; j++ ) { if ( edges (i,k) and (k,j) exists in Gk ) { add edge (i,j) to Gk; } } } } |