903 views
0 0 votes
suppose there are N number of nodes. How many ways we can write DFS and BFS sequence for it.

how many are the valid sequence???

how many are invalid??

can we generalized the formula for it??

1 Answer

0 0 votes
As such there is not any formula to find number of valid sequences in a graph since validation of sequence depends on structure or type of the graph
Position:
Show:

Related questions

1 1 vote
0 0 answers
1.9k
1.9k views
Markzuck asked Dec 30, 2018
1,857 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 1 answer
1.1k
1.1k views
iarnav asked Dec 9, 2017
1,059 views
Can BFS and DFS both work cyclic and acyclic graphs?! Kindly explain for each of 'em. Thank you!
1 1 vote
1 1 answer
2.3k
2.3k views
vaishali jhalani asked Dec 16, 2016
2,303 views
Given two vertices in a graph $s$ and $t$. Which of the two traversals (BFS and DFS) can be used to find if there is path from $s$ to $t$ ?Only BFSOnly DFSBoth BFS and DF...
2 2 votes
3 3 answers
1.2k
1.2k views
rahul sharma 5 asked Dec 15, 2016
1,181 views
What are some applications where only DFS can be used and BFS can t and vice versa?