GATE Computer ScienceVery hardGATE CS (PYQ pattern)
How many spanning trees does the wheel graph W₅ have (a hub joined to every vertex of a 5-cycle: 6 vertices, 10 edges)?
- A. 96
- B. 121
- C. 125
- D. 144
Correct answer: B. 121
By the matrix-tree theorem, τ(W_n) = L(2n) − 2 where L is the Lucas sequence; for n = 5, L₁₀ = 123, so τ = 121. Direct determinant evaluation of a reduced Laplacian agrees.
More Algorithms questions
- How many spanning trees does the 3-dimensional hypercube Q₃ (8 vertices, 12 edges) have?
- A DAG on vertices 1–8 has edges 1→2, 1→3, 2→4, 3→4, 4→5, 4→6, 5→7, 6→7, 3→8, 8→7. How many different topological orderings does it have?
- A DFS on a directed graph processes vertices in alphabetical order and each adjacency list in alphabetical order. Edges: A→B, A→C, A→E…
- A directed graph on A–K has edges A→B, B→C, C→A, C→D, D→E, E→F, F→D, G→F, G→H, H→I, I→G, B→H, E→J, K→J, K→A. Let s be its number of…
- The directed graph on vertices A–K has edges A→B, B→A, C→D, D→C, E→F, F→G, G→E, A→H, C→H, E→H, H→I, H→J, I→K, J→K, B→J. What is the…
- An undirected graph has vertices 0–11 and edges 0-1, 1-2, 2-0, 2-3, 3-4, 4-5, 5-3, 5-6, 6-7, 7-8, 8-6, 1-9, 9-10, 10-1, 4-11. Let a be its…