GATE Computer ScienceVery hardGATE CS (PYQ pattern)
How many connected labelled simple graphs on the vertex set {1, 2, 3, 4, 5} have exactly 5 edges?
- A. 252
- B. 125
- C. 210
- D. 222
Correct answer: D. 222
Connected with n edges on n vertices = unicyclic. Count by the cycle length k: choose and orient the cycle (C(5,k)(k−1)!/2), then attach the remaining vertices as a forest rooted on the k cycle vertices: k·5^(5−k−1). k = 3: 10 · 1 · 3·5 = 150; k = 4: 5 · 3 · 4 = 60; k = 5: 12. Total 222.
More Discrete Mathematics questions
- How many assignments to x₁, …, x₈ satisfy x₁ ⊕ x₂ ⊕ … ⊕ x₈ = 1 together with ¬(x₁ ∧ x₂) and ¬(x₃ ∧ x₄)?
- How many assignments to a, b, c, d, e, f satisfy (a ∨ b) ∧ (a → c) ∧ (b → c) ∧ (c → d) ∧ (e ∨ f) ∧ (d → ¬e)?
- Using only the connective → and the two variables p and q (no constants), how many pairwise non-equivalent propositions can be written?
- A Boolean function f(x, y, z) satisfies f(x, y, z) = f(y, x, z) for all inputs. How many such functions exist?
- How many functions f : {1, 2, 3, 4} → {1, 2, 3, 4} satisfy f(f(x)) ≠ x for every x?
- In how many ways can 8 distinct objects be placed into 4 identical boxes, no box empty, so that objects 1 and 2 are in different boxes?