GATE Computer ScienceHardGATE CS (PYQ pattern)
A labelled tree on vertices {0, …, 7} has Prüfer sequence (3, 3, 3, 6, 6, 1). What is the diameter (in edges) of the tree?
- A. 2
- B. 4
- C. 3
- D. 5
Correct answer: B. 4
Decoding (repeatedly joining the smallest current leaf to the next sequence entry) gives edges [(0, 3), (1, 6), (1, 7), (2, 3), (3, 4), (3, 6), (5, 6)]; its longest path has 4 edges.
More Discrete Mathematics questions
- A tournament on 8 players has score sequence (1, 2, 3, 3, 4, 4, 5, 6) (number of wins of each player). How many directed 3-cycles (cyclic…
- What is the minimum number of edges in a 4-connected simple graph on 11 vertices?
- In the cube graph Q₃ let u and v be antipodal vertices (distance 3). How many walks of length 5 go from u to v?
- How many automorphisms does the pentagonal prism C₅ × K₂ (two 5-cycles joined by 5 rungs) have?
- A weighted graph on {0, 1, 2, 3, 4} has edges (0,1,1), (1,2,1), (0,2,1), (2,3,2), (1,3,2), (3,4,1), (2,4,1), (0,4,2), written as (u, v…
- How many integer solutions does x₁ + x₂ + x₃ + x₄ + x₅ = 30 have with 2 ≤ xᵢ ≤ 10 for every i and x₁ even?