CS502 Quiz 2 Solution and Discussion
-
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). -
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). -
For traversing graphs, Breadth-first search can be visualized as a wave front propagating inwards towards root (or source) node. CS502
- True
- False Page No.117

Breadth-first Search:
Here is a more efficient algorithm called the breadth-first search (BFS) Start with s and visit its adjacent nodes. Label them with distance 1. Now consider the neighbors of neighbors of s. These would be at distance 2. Now consider the neighbors of neighbors of neighbors of s. These would be at distance 3. Repeat this until no more unvisited neighbors left to visit. The algorithm can be visualized as a wave front propagating outwards from s visiting the vertices in bands at ever increasing distances from s. -
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.
-
-
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.
-
-
@Ainhashmi you can choose in categories where you expect.
-
For traversing graphs, Breadth-first search can be visualized as a wave front propagating inwards towards root (or source) node. CS502
- True
- False Page No.117

Breadth-first Search:
Here is a more efficient algorithm called the breadth-first search (BFS) Start with s and visit its adjacent nodes. Label them with distance 1. Now consider the neighbors of neighbors of s. These would be at distance 2. Now consider the neighbors of neighbors of neighbors of s. These would be at distance 3. Repeat this until no more unvisited neighbors left to visit. The algorithm can be visualized as a wave front propagating outwards from s visiting the vertices in bands at ever increasing distances from s.@moaaz said in CS502 Quiz 2 Solution and Discussion:
For traversing graphs, Breadth-first search can be visualized as a wave front propagating inwards towards root (or source) node. CS502
For traversing the graphs, Breadth-First Search (BFS) can be visualized as a wavefront propagating inward towards the root node.