GATE Computer ScienceVery hardGATE CS (PYQ pattern)
What is the smallest m such that every simple undirected graph with 12 vertices and m edges is 2-connected (connected, and stays connected after deleting any one vertex)?
- A. 56
- B. 66
- C. 57
- D. 55
Correct answer: C. 57
A graph with a cut vertex can have as many as C(11, 2) + 1 = 56 edges (K₁₁ plus one pendant vertex), and this is the maximum; so m = 57 forces 2-connectivity. 56 is the threshold for mere connectivity (C(11,2) + 1); the formula was brute-force checked for 5 and 6 vertices.
More Algorithms questions
- Bellman–Ford is run from S on a directed graph with edges S→A 2, A→B 3, B→C −4, C→A 0, C→D 5, D→E 1, E→H 2, S→F 7, F→G −2, S→I 4, I→F 1…
- What is the smallest possible value of the largest edge weight on a path from E to D in the graph with edges AB 6, AC 1, AD 5, BC 5, BE 3…
- Kahn's topological sort uses a min-priority queue, so among available vertices the smallest label is always chosen. The DAG has edges 1→3…
- A DAG has edges s→a, s→b, a→b, a→c, a→d, b→c, b→d, c→d, c→e, c→f, d→e, d→f, e→f, e→t, f→t. How many s–t paths pass through exactly one of…
- How many spanning trees of the complete graph K₅ (vertices 1–5) contain neither the edge 1-2 nor the edge 1-3?
- For the pattern P = abcabdabcabcabd, the KMP failure (prefix) function π[i] is the length of the longest proper prefix of P[0..i] that is…