Recent questions tagged goclasses_da_dsa_tw6

2 2 votes
1 1 answer
447
447 views
Consider the given two statements.$\mathrm{S} 1:$ Depth-first search is asymptotically faster than breadth-first search.$\mathrm{S} 2:$ Deleting an element from a binary ...
3 3 votes
3 3 answers
659
659 views
Consider the given graph $\text{G}.$ Traversal trees $\text{T1}$ and $\text{T2}$ (given below) are made by DFS or BFS traversals starting from s..Which of the following i...
3 3 votes
1 1 answer
370
370 views
Let $\text{G = (V, E)}$ be a simple undirected graph, and $s$ be a particular vertex in it called the source. For $x \in \text{V},$ let $d(x)$ denote the shortest distanc...
0 0 votes
2 2 answers
170
170 views
Consider the below weighted graph where weight of the edge $e$ is written as $w(e).$If we run Dijkstra's algorithm with $s=0$, in which order will the vertices be deleted...
0 0 votes
1 1 answer
211
211 views
Consider performing a depth-first search (DFS) on an undirected and unweighted graph $G$ starting at vertex $s$. For any vertex $u$ in $G, d[u]$ is the length of the shor...
0 0 votes
2 2 answers
251
251 views
Which of the following is/are TRUE ?If we perform DFS on an undirected graph, there are no cross edges.If the DFS tree has no back edges, then there are no cycles in the ...
1 1 vote
1 1 answer
325
325 views
Which of the following is correct option about $\mathrm{S} 1$ and $\mathrm{S} 2?$$\mathrm{S} 1:$ If $\text{G}$ is a weighted graph with $n$ vertices and $m$ edges that do...
0 0 votes
1 1 answer
229
229 views
Consider the following directed, weighted graph:Even though the graph has negative weight edges, we use Dijkstra’s algorithm to calculate supposedly shortest paths from A...
2 2 votes
1 1 answer
350
350 views
Which of the following is/are TRUE?Dijkstra's algorithm may not terminate if the graph contains negative-weight edges.Given a graph $\text{G = (V, E)}$ with positive edge...
1 1 vote
1 1 answer
267
267 views
Each of the figures below represents a partial spanning tree with bold edges. Determine whether it could possibly be obtained from (a prematurely stopped) Prim’s algorith...
1 1 vote
1 1 answer
386
386 views
For which of the following does there exist a simple undirected graph $\mathrm{G}=(\mathrm{V}, \mathrm{E})$ satisfying the specified conditions?$\text{G}$ has $3$ compone...
1 1 vote
1 1 answer
229
229 views
Let $\text{G = (V, E)}$ be a weighted directed graph. The shortest path from a node $s \in \text{V}$ to a node $t \in \text{V}$ will remain unchanged if: (Multiple option...
0 0 votes
1 1 answer
278
278 views
Which of the following are CORRECT for Depth-First Search (DFS) on the graphs?Let $n$ be greater than $2$ in all options.DFS on a directed graph with $n$ vertices and $n$...
0 0 votes
1 1 answer
249
249 views
A way to transform one undirected simple graph into another is by obtaining its subdivision. Intuitively, the subdivision of an undirected graph $\mathrm{G},$ denoted $\t...
2 2 votes
1 1 answer
377
377 views
Consider a directed graph $G$ with a source vertex $s, a$ destination $t$, and nonnegative edge lengths. Under what conditions is the shortest $s-t$ path guaranteed to be...
To see more, click for the full list of questions or popular tags.