pgr_articulationPoints

pgr_articulationPoints - Return the articulation points of an undirected graph.

_images/boost-inside.jpeg

Boost Graph Inside

Availability

  • Version 3.0.0
    • Return columns change: seq is removed
    • Official function
  • Version 2.5.0
    • New experimental function

Support

  • Supported versions: current(3.0)
  • Unsupported versions: 2.6 2.5

Description

Those vertices that belong to more than one biconnected component are called articulation points or, equivalently, cut vertices. Articulation points are vertices whose removal would increase the number of connected components in the graph. This implementation can only be used with an undirected graph.

The main characteristics are:

  • The signature is for an undirected graph.
  • The returned values are ordered:
    • node ascending
  • Running time: \(O(V + E)\)

Signatures

pgr_articulationPoints(Edges SQL)

RETURNS SET OF (node)
OR EMPTY SET
Example:The articulation points of the graph
SELECT * FROM pgr_articulationPoints(
    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
);
 node
------
    2
    5
    8
   10
(4 rows)

Parameters

Parameter Type Default Description
Edges SQL TEXT   Inner query as described bellow.

Inner query

edges SQL:an SQL query of an undirected graph, which should return a set of rows with the following columns:
Column Type Default Description
id ANY-INTEGER   Identifier of the edge.
source ANY-INTEGER   Identifier of the first end point vertex of the edge.
target ANY-INTEGER   Identifier of the second end point vertex of the edge.
cost ANY-NUMERICAL  

Weight of the edge (source, target)

  • When negative: edge (source, target) does not exist, therefore it’s not part of the graph.
reverse_cost ANY-NUMERICAL -1

Weight of the edge (target, source),

  • When negative: edge (target, source) does not exist, therefore it’s not part of the graph.

Where:

ANY-INTEGER:SMALLINT, INTEGER, BIGINT
ANY-NUMERICAL:SMALLINT, INTEGER, BIGINT, REAL, FLOAT

Result Columns

Returns set of (node)

Column Type Description
node BIGINT Identifier of the vertex.