• retagged by
6,031 views
5 5 votes

Which of the following statements are false ?

$1.$ A depth-first search of a directed graph always produces the same number of tree edges (i.e., independent of the order in which the vertices are provided and independent of the order of the adjacency list).

$2.$ Both DFS and BFS require $\Omega(n)$ storage for their operation.

$3.$ If we double the weight of every edge in the graph shortest path between any two vertices will not change.

$4.$ Dijkstra's algorithm may not terminate if the graph contains negative weight edges.

1 Answer

0 0 votes
When we traverse a graph, and we get a tree.

By depth first traversal, we get DFT. So the edges of graph that are present in DFT are called tree edges. There are back edges, cross edges, which are not present in the tree.

So, he is saying in first statement that, no matter how we traverse the graph, we will get the  same number of tree edges.

Which is correct.
• edited by
Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
2.0k
2.0k views
rsansiya111 asked Dec 8, 2021
1,962 views
Consider the following strategy to solve the single source shortest path problem with edge weights from source s.1. Replace each edge with weight w by w edges of weight 1...
0 0 votes
0 0 answers
626
626 views
Akash Kanase asked Jan 15, 2016
626 views
I got that Statement 3 can be false in case we have function 1/n, then its square become 1/n^2. But I don't think statement 2 is true either. Please prove whether I'm cor...
0 0 votes
0 0 answers
808
808 views
Sahil_Lather asked Jan 28, 2023
808 views
Construct OBST with the identifier set (a1, a2, a3) =(end , goto, print) with p(1..3) = (0.05, 0.2, 0.1) and q(0..3) = (0.2, 0.1,0.2, 0.05)What is the cost of a OBST ? ...
0 0 votes
1 1 answer
1.1k
1.1k views
Sahil_Lather asked Jan 28, 2023
1,102 views
A complete graph G with 5 nodes has positive weight edges, each node has a distinct weight with an integer value and maximum weight is equal to number of edges in G.What ...