Data Structures & AlgorithmsVery hardICPC regional · GATE CS top band
Undirected simple graph on vertices A, B, C, D, E, F, G with edges A–D (1), A–F (1), A–G (1), B–C (1), B–G (1), C–D (1), C–G (1), E–G (1), F–G (1) (weights ignored). What is the minimum number of VERTICES whose deletion (together with their incident edges) leaves a bipartite graph?
- A. 2
- B. 7
- C. 4
- D. 1
Correct answer: D. 1
Brute force over vertex subsets gives 1 deleted vertices; deleting edges instead needs 2, which is a different quantity. Confusing vertices with edges is the trap.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- Array A = [6, 7, 4, 1, 8, 8, 7] (indices 0 to 6). Count the non-empty subsets of positions (each position used at most once, subsets not…
- Directed acyclic graph on vertices A, B, C, D, E, F (every edge goes from a smaller to a larger letter) with weighted edges A→B (4), A→C…
- Array A = [2, 2, 4, 4, 1, 5, 2, 3, 1]. An increasing subsequence is chosen by INDEX positions i1 < i2 < … with A[i1] < A[i2] < … (strictly…
- Undirected weighted graph on vertices A, B, C, D, E; its edges, in this listed order, are: B–D (7), A–D (7), C–D (9), D–E (3), A–C (2)…
- Directed weighted graph on vertices A, D, B, F, C (source A, target C) with edges: A→D (4); A→B (7); B→D (-6); D→C (3); B→C (1); A→C (12)…
- Directed acyclic graph on vertices A, B, C, D, E with edges A→D, A→C, D→B, D→C. Among all topological orderings (every edge goes from…