Data Structures & AlgorithmsVery hardGATE CS · ICPC regional
How many spanning trees does the complete bipartite graph K_{3,2} have, with 3 vertices on one side and 2 on the other?
- A. 15
- B. 6
- C. 12
- D. 7
Correct answer: C. 12
A formula for the spanning trees of K_{m,n} is m^(n−1) · n^(m−1), which can be checked on K_{2,2} (a 4-cycle, 4 spanning trees). Counting edge subsets of size n − 1 without the connectivity test, or using the total edge count, does not give the answer.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- How many spanning trees does the complete bipartite graph K{4,3} have, with 4 vertices on one side and 3 on the other?
- What is the minimum possible number of nodes in an AVL tree of height 2? (Height counts edges on the longest root-to-leaf path, so a…
- What is the minimum possible number of nodes in an AVL tree of height 3? (Height counts edges on the longest root-to-leaf path, so a…
- What is the minimum possible number of nodes in an AVL tree of height 4? (Height counts edges on the longest root-to-leaf path, so a…
- What is the minimum possible number of nodes in an AVL tree of height 5? (Height counts edges on the longest root-to-leaf path, so a…
- What is the minimum possible number of nodes in an AVL tree of height 6? (Height counts edges on the longest root-to-leaf path, so a…