boostorg / graph

Boost.org graph module

Home Page:http://boost.org/libs/graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Semantic problem in articulation_points

hoehrmann opened this issue · comments

Boost BGL reports vertices 4 and 7 as articulation points in this graph:

graph "" {
0 -- 1;
0 -- 2;
0 -- 3;
0 -- 7;
1 -- 1;
1 -- 2;
1 -- 3;
1 -- 7;
2 -- 2;
2 -- 3;
3 -- 4;
3 -- 5;
3 -- 6;
7 -- 10;
4 -- 4;
4 -- 5;
4 -- 6;
5 -- 6;
5 -- 8;
6 -- 9;
8 -- 9;
}

Python's networkx library reports 3 and 7:

>>> list(networkx.articulation_points(networkx.Graph([(0, 1),
(0, 2), (0, 3), (0, 7), (1, 1), (1, 2), (1, 3), (1, 7), (2, 2), (2, 3), (3, 4),
(3, 5), (3, 6), (7, 10), (4, 4), (4, 5), (4, 6), (5, 6), (5, 8), (6, 9), (8, 9)])))
[3, 7]

Looking at the graph it seems clear that removing vertex 4 does not increase the number of connected components, contrary to the definition of an articulation point (»Articulation points are vertices whose removal would increase the number of connected components in the graph.« in the Boost BGL documentation).

My bad.