Data Structures & AlgorithmsVery hardCodeforces Div 2 · ICPC regional
Undirected simple graph on vertices A, B, C, D, E, F with edges A–C (1), B–D (1), B–E (1), B–F (1), C–D (1), C–E (1), C–F (1), D–E (1), D–F (1) (weights ignored). What is the minimum number of VERTICES whose deletion (together with their incident edges) leaves a bipartite graph?
- A. 4
- B. 6
- C. 1
- D. 2
Correct answer: C. 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
- Directed acyclic graph on vertices A, B, C, D, E, F, G (edges go from earlier to later letters) with weights A→B (3), A→D (4), A→E (4)…
- Points A(1,7), B(2,4), C(4,9), D(8,8), E(2,7) in the plane. The cost of joining two points is the Manhattan distance |x1−x2| + |y1−y2|…
- An undirected graph has the vertices G, Q, R, U, Y, Z and the edges Q–Z, Y–Q, G–Z, R–Z, G–R, Y–R. How many simple cycles does it contain…
- A directed acyclic graph has the vertices F, H, J, K, L, N, R and the arcs H→J, H→R, H→N, K→J, K→F, K→N, L→R, L→F, J→R, J→F, J→N, R→F. Two…
- A directed acyclic graph has the vertices B, H, K, O, W and the arcs K→B, K→W, K→O, B→H, B→O, W→O. Two players alternately move a single…
- On an 6×6 chessboard, rows and columns are numbered 0 to 5, and squares are written (row, column). A knight moves in the usual L-shape…