Summary: Dual-connected components & strongly connected components & cut points & cut edge

Source: Internet
Author: User
Summary:

Various DFS timestamps .. All Tarjan (or his friends) worships Tarjan orzzzzzzzzz infinitely.

Tips and notes:

The strongly connected component is a directed graph, and the dual connected component is an undirected graph.

The decision for finding a ring for strongly connected components is very similar to that for dual-connected components, but not exactly the same.

The else if of the strongly connected component after if (FF [v]) must also determine whether it is in the stack, that is, vis [v], and then update ll [u].

Because the cut point and strongly connected component are undirected graphs, we need to determine a fa. We can maintain a fa parameter in DFS.

If the splitting component is required, the number of cut points + 1 for the Child tree of the node.

The splitting point does not require stack maintenance, but it is necessary to judge whether the current node is root (that is, when the node is child = 1 and is root, this point is not a splitting point ), instead of determining the root node, you can directly maintain the BCC in ll [v]> = FF [u.

Cut Edge is actually a special case of cut edge, that is, ll [u]> FF [u ..

Edge-Dual-connected components are better than vertices, that is, to find all the rings without edge cutting after the edge is cut, DFS.

Example of a cut point: [poj] 1523 SPF (cut point) (note the Special Command root)

Example of the double-connected component: [poj] 2942 knights of the Round Table (double-connected component) (do not forget that the stack is added in two if)

 

Summary: Dual-connected components & strongly connected components & cut points & cut edge

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.