Graphs Iteration 2.1 Directed Graphs
Dense directed graph:
v: 13
e: 22
0: 1 5 6
1:
2: 0 3
3: 2 5
4: 2 3 11
5: 4
6: 4 9
7: 6 8
8: 7 9
9:10 11
10:12
11:12
12: 9
Directed DFS:
[0, 1] tree
[0, 5] tree
[5, 4] tree
[4, 2] tree
[2, 0] back
[2, 3] tree
[3, 2] back
[3, 5] back
[4, 3] forward
[4, 11] tree
[11, 12] tree
[12, 9] tree
[9, 10] tree
[10, 12] back
[9, 11] back
[0, 6] tree
[6, 4] cross
[6, 9] cross
[7, 6] cross
[7, 8] tree
[8, 7] back
[8, 9] cross
Transitive closure:
v: 13
e: 61
0: 1 2 3 4 5 6 7 9 10 11 12
1: 0 7
2: 0 3 4 5 6 7 9 10 11 12
3: 0 2 4 5 6 7 9 10 11 12
4: 0 2 3 5 6 7 9 10 11 12
5: 0 2 3 4 6 7 9 10 11 12
6: 0 2 3 4 5 7 9 10 11 12
7: 0 1 2 3 4 5 6 8 9 10 11 12
8: 7 9 10 11 12
9: 0 2 3 4 5 6 7 8 10 11 12
10: 0 2 3 4 5 6 7 8 9 12
11: 0 2 3 4 5 6 7 8 9 12
12: 0 2 3 4 5 6 7 8 9 10 11
Sparse directed graph:
v: 13
e: 22
0: 1 5 6
1:
2: 0 3
3: 2 5
4: 2 3 11
5: 4
6: 4 9
7: 6 8
8: 7 9
9:10 11
10:12
11:12
12: 9
Directed DFS:
[0, 1] tree
[0, 5] tree
[5, 4] tree
[4, 2] tree
[2, 0] back
[2, 3] tree
[3, 2] back
[3, 5] back
[4, 3] forward
[4, 11] tree
[11, 12] tree
[12, 9] tree
[9, 10] tree
[10, 12] back
[9, 11] back
[0, 6] tree
[6, 4] cross
[6, 9] cross
[7, 6] cross
[7, 8] tree
[8, 7] back
[8, 9] cross
Transitive closure:
v: 13
e: 61
0: 1 2 3 4 5 6 7 9 10 11 12
1: 0 7
2: 0 3 4 5 6 7 9 10 11 12
3: 0 2 4 5 6 7 9 10 11 12
4: 0 2 3 5 6 7 9 10 11 12
5: 0 2 3 4 6 7 9 10 11 12
6: 0 2 3 4 5 7 9 10 11 12
7: 0 1 2 3 4 5 6 8 9 10 11 12
8: 7 9 10 11 12
9: 0 2 3 4 5 6 7 8 10 11 12
10: 0 2 3 4 5 6 7 8 9 12
11: 0 2 3 4 5 6 7 8 9 12
12: 0 2 3 4 5 6 7 8 9 10 11
|
|