Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does Sage have a function to determine vertex cuts?

I know about is_cut_vertex(G, u) for checking if a vertex is a cut-vertex. But is there a function in Sage to determine if a subset of vertices is a vertex cut? Although it's not too difficult to write, as shown below:

def is_vertex_cut(graph, subset):
    subgraph = graph.copy()
    subgraph.delete_vertices(subset)
    return not subgraph.is_connected()