Data Structures & AlgorithmsVery hardGATE CS · Product-company placement
An undirected connected graph has edges A–D, A–G, B–E, C–E, C–G, D–H, D–I, F–I, G–H. How many articulation points (cut vertices) and how many bridges does it have?
- A. 6 articulation points, 5 bridges
- B. 5 articulation points, 6 bridges
- C. 5 articulation points, 5 bridges
- D. 4 articulation points, 5 bridges
Correct answer: C. 5 articulation points, 5 bridges
Cut vertices: C, D, E, G, I; bridges: B–E, C–E, C–G, D–I, F–I. A bridge's endpoints are cut vertices unless they are leaves, and a vertex joining two cycles is a cut vertex even with no bridge.
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
- Bellman–Ford runs from A on the directed graph whose edges are relaxed in EVERY pass in this fixed order: C→D (1), A→F (8), F→C (3), D→A…
- Edit distance between PARAGRAPH and BINARY where insert and delete cost 1 each but a substitution costs 2: what is the minimum total cost?
- Bellman–Ford runs from A on the directed graph whose edges are relaxed in EVERY pass in this fixed order: D→B (4), F→D (8), D→C (2), A→E…
- A B-tree has minimum degree t = 4 (every non-root node has between 3 and 7 keys) and height 2 (a root-only tree has height 0). What are…
- The weighted undirected graph A–B (6), A–D (16), A–E (19), A–F (12), B–E (1), B–F (2), C–D (26), C–E (14) has a unique MST. What is the…
- Kruskal's algorithm runs on the weighted undirected graph A–B (20), A–C (3), A–E (8), A–F (6), B–D (10), C–D (1), C–G (16), D–E (25), D–F…