Data Structures & AlgorithmsVery hardICPC regional · GATE CS top band
Undirected simple graph on vertices A, B, C, D, E, F, G with edges A–C (1), A–D (1), B–C (1), B–D (1), B–E (1), B–F (1), B–G (1), C–D (1), D–E (1), D–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. 3
- C. 4
- D. 6
Correct answer: A. 2
Brute force over vertex subsets gives 2 deleted vertices; deleting edges instead needs 3, 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
- Weighted tree on vertices 0 to 5 with edges 0–1 (3), 0–2 (1), 1–3 (2), 1–4 (9), 2–5 (6). What is the largest possible sum of edge weights…
- Tree with vertices 0 to 7, root 0, edges 0–1, 1–2, 2–3, 0–4, 2–5, 2–6, 4–7 (parent–child). Vertex weights (vertex:weight) 0:8, 1:6, 2:7…
- Bipartite graph with left side {A, B, C, D}, right side {E, F, G, H} and edges A–G, B–F, B–G, C–E, C–H, D–E. What is the size of a maximum…
- Weighted tree on vertices 0 to 7 with edges 0–1 (4), 0–2 (2), 0–3 (8), 0–4 (5), 1–5 (8), 0–6 (4), 0–7 (2). What is the largest possible…
- 2 × 3 sliding puzzle with tiles 1 to 5 and one blank (shown as ). Current board: 2 4 3 / 1 5 . Goal board: 1 2 3 / 4 5 . A move slides a…
- Undirected simple graph on vertices A, B, C, D, E, F, G with edges A–B (1), A–E (1), A–F (1), C–E (1), D–E (1), D–G (1), E–F (1), F–G (1)…