Network stream solving graph connectivity

Source: Internet
Author: User

Connectivity Problem of a graph: delete some elements (points or edges) in the graph so that the two specified points s and t are not connected (there is no path from s to t ), you must delete at least a few elements.
Graph connectivity is divided into point connectivity and Edge Connectivity:
(1) Point Connectivity: Only Delete points. delete at least a few points. (Of course, s and t cannot be deleted. Here, there must be at least three points in the source image );
(2) Edge Connectivity: You can delete at least a few edges.
In addition, the connectivity method of a directed graph and an undirected graph is different, so we must consider them separately (for a hybrid graph, you only need to process all the undirected edges in the graph and the directed edges in the graph ).

[1] edge connectivity of a directed graph:
This is actually the minimal cut problem. Use s as the source point, and t as the sink point to establish a network. Each edge in the source image still exists in the network. The capacity is 1, and the minimum cut (that is, the maximum stream) of the network is obtained) is the edge connectivity of the source image.

[2] Point connectivity of a directed graph:
Split points are required. Create a network. Each vertex I in the source image is split into I 'and I' 'in the network, with an edge <I', I '> and a capacity of 1 (<s ', s '> and <t', t''> Except, the capacity is infinite ). Each edge in the source image <I, j> is an edge <I '', j '> in the network, and the capacity is infinite. Calculate the maximum stream with s as the source point and t ''as the sink point. The maximum stream value is the point connectivity of the source image.

Note: The maximum stream corresponds to the minimum cut. Obviously, a positive infinity edge cannot be cut by a minimum, that is, the edges and s and t in the source image cannot be deleted. If the edges <I, I ''> are cut by a minimum, delete vertex I in the source image.

[3] edge connectivity of an undirected graph:
Split each edge (I, j) in the graph into <I, j> and <j, I>, and then process them according to the Directed Graph Method ([1;

[4] Point connectivity of undirected graphs:

Split each edge (I, j) in the graph into <I, j> and <j, I>, and then process them according to the Directed Graph Method ([2.

----------------------------------------------------------

Poj 1815 FriendshipQuestion: Give A call relationship between some people. If A can contact B and B can contact C, A can contact C and ask to delete the least people, however, given two dots S and T are disconnected. If a store is deleted, the minimum Lexicographic Order must be output. Is the priority of a small number.

Idea: Point connectivity of undirected graphs. The minimum output cut is very easy. The key is to output the cut edge in alphabetical order. Delete each vertex from small to large (set the edge capacity after split to 0), and then find the maximum stream again. If this is not the same as the last maximum stream, this edge is the cut edge and output. Otherwise, the deleted vertex is restored.


Poj 1966 Cable TV Network

Question: Give an undirected graph and delete the least vertex so that the graph is divided into at least two parts.

Idea: The point connectivity problem of undirected graphs. If the cut between s and t is x, it means that it is necessary to remove x points between s and t to make s and t not connected, if the cut value is inf, it is connected to t no matter how many points are removed. Enumerate s, t. To find the minimum value of the minimum cut, the s enumeration t cannot be fixed (although it can be ac, it is obviously wrong)


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.