Recent questions tagged breadth-first-search

5 5 votes
2 2 answers
842
842 views
Consider a directed graph $G=(V, E)$, where $V$ is the finite set of vertices and $E$ is the set of directed edges between the vertices. $G$ may contain cycles but there ...
0 0 votes
1 1 answer
404
404 views
Which of the following algorithms are based on the Breadth First Search (BFS) ?Prim's algorithmsKruskal algorithmsDijkstra algorithmsGreedy algorithmsDynamic ProgrammingC...
15 15 votes
5 5 answers
10.2k
10.2k views
Consider the following algorithm someAlgo that takes an undirected graph $G$ as input. ...
34 34 votes
4 4 answers
14.7k
14.7k views
​​​​Which of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph $G$ is/are TRUE?A DFS tree of $G$ is...
30 30 votes
8 8 answers
11.7k
11.7k views
Let $G(V, E)$ be an undirected and unweighted graph with $100$ vertices. Let $d(u, v)$ denote the number of edges in a shortest path between vertices $u$ and $v$ in $V$. ...
3 3 votes
1 1 answer
375
375 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...
17 17 votes
8 8 answers
6.7k
6.7k views
​​​​​Consider a state space where the start state is number $1$. The successor function for the state numbered $n$ returns two states numbered $n+1$ and $n+2$. Assume tha...
2 2 votes
1 1 answer
746
746 views
BFS DFS question asking the number of nodes expanded BFS = DFSBFS $$ DFSNone
3 3 votes
2 2 answers
4.4k
4.4k views
Consider the following undirected graph on $5$ nodes.Assume you are performing breadth-first search on this graph using a queue data structure. How many unique breadth fi...
55 55 votes
4 4 answers
19.2k
19.2k views
Let $U=\{1,2,3\}$. Let $2^{U}$ denote the powerset of $U$. Consider an undirected graph $G$ whose vertex set is $2^{U}$. For any $A, B \in 2^{U},(A, B)$ is an edge in $G$...
1 1 vote
0 0 answers
721
721 views
Consider the following graph.How many nodes (apart from $s$) does the Breadth First Search algorithm discover before discovering $t$ when starting from $s$.
0 0 votes
1 1 answer
683
683 views
Please list the problems where BFS alone can do and DFS alone can do and both can do??
0 0 votes
0 0 answers
602
602 views
Can we use BFT for finding no. of connected components in a directed as well as undirected graph?
0 0 votes
1 1 answer
3.0k
3.0k views
Which of the following statements are true?Minimax search is breadth-first; it processes all the nodes at a level before moving to a node in next level.The effectiveness ...
2 2 votes
2 2 answers
2.1k
2.1k views
What are the appropriate data structures for graph traversal using Breadth First Search(BFS) and Depth First Search(DFS) algorithms?Stack for BFS and Queue for DFSQueue f...
4 4 votes
5 5 answers
8.4k
8.4k views
$G$ is an undirected graph with vertex set $\{v1, \ v2, \ v3, \ v4, \ v5, \ v6, \ v7\}$ and edge set $\{v1v2,\ v1v3,\ v1v4\ ,v2v4,\ v2v5,\ v3v4,\ v4v5,\ v4v6,\ v5v6,\ v6v...
0 0 votes
2 2 answers
1.9k
1.9k views
The diameter of a tree $T= (V, E)$ is defined as $max_{u,v\ \epsilon\ V}\ \delta(u,v)$, that is, the largest of all shortest-path distances in the tree. Give an efficient...
1 1 vote
1 1 answer
1.7k
1.7k views
There are two types of professional wrestlers: “babyfaces” (“good guys”) and “heels” (“bad guys”). Between any pair of professional wrestlers, there may or may not be a r...
1 1 vote
1 1 answer
2.5k
2.5k views
Give an example of a directed graph $G=(V, E)$, a source vertex $s\ \epsilon\ V$ , and a set of tree edges $E_{\Pi}\subseteq E$ such that for each vertex $v\ \epsilon\ V$...
1 1 vote
2 2 answers
1.4k
1.4k views
What will be the path from A-H if BFS is used in the following graph?
1 1 vote
0 0 answers
1.8k
1.8k views
Can someone please explain what are the types of edges possible in BFS and DFS for DIRECTED as well as UNDIRECTED graphs?Individual meaning of BACK, FRONT and CROSS edges...
0 0 votes
1 answers 1 answer
3.3k
3.3k views
True or False , with reason.For a directed graph, the absence of back edges with respect to a BFS tree implies that the graph is acyclic?Answer is FalseExplanation:FALSE....
0 0 votes
1 1 answer
613
613 views
Are the "n!" ways maximum possible BFS sequences ? ( Indirectly, for any given vertices is it obvious that complete graph will give max BFS sequences ? )
1 1 vote
0 0 answers
843
843 views
Does Back Edges in both BFS and DFS leads to cycle in a directed graph? Please elaborate.