CS502 Quiz 2 Solution and Discussion
-
In strong components algorithm, first of all DFS is run for computing finish times of vertices. CS502
- [d[u], f[u]]⊆[d[v], f[v]]
- [d[u], f[u]]⊇[d[v], f[v]]
- unrelated Page No.129
- Disjoint
The ancestor and descendent relation can be nicely inferred by the parenthesis lemma. u is a descendent of v if and only if [d[u], f[u]]⊆[d[v], f[v]]. u is a ancestor of v if and only if[d[u], f[u]]⊇[d[v], f[v]]. u is unrelated to v if and only if[d[u], f[u]]and[d[v], f[v]]are disjoint. The is shown in Figure 8.26. The width of the rectangle associated with a vertex is equal to the time the vertex was discovered till the time the vertex was completely processed (colored black). Imagine an opening parenthesis ‘(’ at the start of the rectangle and and closing parenthesis ‘)’ at the end of the rectangle. The rectangle (parentheses) for vertex ‘b’ is completely enclosed by the rectangle for ‘a’. Rectangle for ‘c’ is completely enclosed by vertex ‘b’ rectangle.
-
In strong components algorithm, first of all DFS is run for computing finish times of vertices. CS502
- True Page No.138
- False
This is presented in Figure 8.37. Recall that the component DAG consists of super vertices.
-
A graph is not connected if every vertex can reach every other vertex. CS502
- True
- False Page No. 116
A graph is said to be acyclic if it contains no cycles. A graph is connected if every vertex can reach every other vertex. A directed graph that is acyclic is called a directed acyclic graph (DAG). -
What general property of the list indicates that the graph has an isolated vertex?
-
There is Null pointer at the end of list.
-
The Isolated vertex is not handled in list.
-
Only one value is entered in the list.
-
There is at least one null list.
-
-
@moaaz said in CS502 Quiz 2 Solution and Discussion:
What general property of the list indicates that the graph has an isolated vertex?
The Isolated vertex is not handled in list.