[Reprinted] Cut Point, bridge and dual-connection branch of the graph

Source: Internet
Author: User

[Point connectivity and edge connectivity]

In an undirected connected graph, if there is a vertex set, after deleting this vertex set and the edge associated with all vertices in this set, the source image will become multiple connected blocks, this vertex set is calledCut Point Set. ThePoint connectivityIs defined as the number of vertices in the minimum cut point set.

Similarly, if there is an edge set, after the edge set is deleted, the source image becomes multiple connected blocks, and the vertex set is calledCut edge set. TheEdge ConnectivityIs defined as the number of edges in the minimum cut edge set.

[Dual connection diagram, cut point and bridge]

If the point connectivity of A undirected connected graph is greater than 1, the graph is calledPoint biconnected), AbbreviationDual-connectionOrReconnection. A graph has a cut point. If and only when the point connectivity of the graph is 1, the unique element of the cut point set is calledCut Point), Also calledArticulation point).

If the edge connectivity of an undirected connected graph is greater than 1, the graph is calledEdge biconnected)Or reconnection. A graph has a bridge. if and only when the edge connectivity of the graph is 1, the unique element of the cut edge set is calledBridge), Also calledArticulation edge ).

It can be seen that point dual-connection and edge dual-connection can be referred to as dual-connection, there is a certain relationship between them, the dual-connection mentioned below, both can be pointed to the dual-connection, it can also be connected by two sides.

[Dual-connectivity branch]

In all subgraph G' of graph G, if G' is a dual-connected, it is called G'Connected subgraph. If a dual-connected subgraph G' is not the true subset of any dual-connected subgraph, then G' isExtremely large dual connected subgraph.Biconnected component), OrReconnection BranchIs the extremely double connected subgraph of the graph. In particular, point-connected branches are also calledBlock.

[Finding cut points and bridges]

This algorithm was invented by R. Tarjan. For image depth-first search, the DFS (u) is defined as the number of times that u is traversed in the search tree (hereinafter referred to as the tree. The earliest node that can be traced back by non-parent-child edge in the Child tree that defines low (u) as U or U, that is, the node with the minimum DFS serial number. According to the definition, there are:

Low (u) = min {DFS (u) DFS (V) (u, v) is the backward side (back-to-source side) and is equivalent to DFS (v) <DFS (u) and if V is not u, Father's Day low (V) (u, v) is a branch edge (Parent and Child edge )}

A vertex u is a cut point. If and only when (1) or (2) (1) U is the root, and U has more than one subtree. (2) U is not the root of the tree, and the satisfied existence (u, v) is the branch edge (or parent and child edge, that is, U is the father of V in the search tree), so that DFS (u) <= low (V ).

A undirected edge (u, v) is a bridge. if and only when (u, v) is a branch edge, it must meet DFS (u) <low (V ).

[Calculate the dual-connection branch]

Next we will discuss separately the methods for finding the dual-connection Branch and the edge dual-connection branch.

In fact, the dual-connection branch of a vertex can be obtained by the way in the process of finding a cut point. Create a stack to store the current dual-connected branches. When you search for a graph, add this edge to the stack every time you find a branch edge or backward edge (not a cross-cross edge. If the DFS (u) <= low (v) is met at a time, it indicates that u is a cut point, and the edges are extracted from the top of the stack one by one until the edges (u, v. A cut point can belong to multiple vertices in a dual-connected branch. The other vertices and each edge only belong to one vertex in a dual-connected branch.

For edge dual-connected branches, the method is simpler. After finding all the bridges, you only need to delete the edges. When the source image is changed to multiple connected blocks, each connected block is an edge dual-connected branch. A bridge does not belong to any edge dual-connected branch. The other edges and each vertex belong to and only belongs to one edge dual-connected branch.

[Create a dual connection diagram]

How can a connected graph with a bridge be converted into an edge-connected graph by adding edges? The method is to first find all bridges and then delete these bridges. Each connected block is a double connected subgraph. Every connected subgraph is reduced to a vertex, and the bridge edge is added back. The final graph is a tree with the edge connectivity of 1.

Count the number of nodes with a moderate value of 1 in the tree, that is, the number of leaf nodes, which is recorded as leaf. Then, at least two (leaf + 1)/two sides are added to the tree to enable the tree to be connected by two sides. Therefore, the minimum number of edge added is (leaf + 1)/2. The specific method is to first connect an edge between the two most recent common ancestor's two leaf nodes, so that the two nodes can contract all the points on the path of the ancestor, because the formation of a ring must be dual-connected. Then we can find two leaf nodes with the farthest recent common ancestor. This one is exactly the same as (leaf + 1)/two times, and all the points are reduced together.

[Example of double connectivity in the figure]

Find the cut point in the diagram of the backup switch and output it directly.

PKU 3177 (3352) redundant paths calculates the bridge, contracts the edge dual-connected subgraph, and constructs the edge dual-connected graph.

Poi 1999 repository administrator store-keeper is used to calculate the vertex dual-connected subgraph.

Byvoid original explanation. For more information, see.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.