GATE Computer ScienceVery hardGATE CS (PYQ pattern)
How many labelled trees on the vertex set {1, 2, …, 7} have vertices 1 and 2 at distance exactly 2?
- A. 4802
- B. 1029
- C. 5145
- D. 6125
Correct answer: C. 5145
Choose the middle vertex w (5 ways). The path 1–w–2 is a forest with component sizes 3, 1, 1, 1, 1; the number of trees on n vertices containing a forest with k components of sizes s₁…s_k is n^(k−2)·Πsᵢ = 7³ · 3 = 1029. Total 5 · 1029 = 5145.
More Discrete Mathematics questions
- How many proper vertex colourings with 3 colours does the Petersen graph have (colours are distinguishable)?
- Colours are chosen from 4 available colours. How many proper vertex colourings of the cycle C₇ use all 4 colours?
- The wheel W₆ is a hub joined to all vertices of a 6-cycle. How many proper vertex colourings of W₆ use exactly the 4 colours {1, 2, 3, 4}…
- The Grötzsch graph is the Mycielskian of C₅ (11 vertices, 20 edges). What are its clique number ω and chromatic number χ?
- The prism graph C₆ × K₂ consists of two 6-cycles u₀…u₅ and v₀…v₅ with rungs uᵢvᵢ (12 vertices, 18 edges). How many perfect matchings does…
- Two corner squares on the SAME side of a 4 × 4 board, say (1,1) and (1,4), are removed. How many domino tilings does the remaining…