The matching problem of graphs and the maximum flow problem (I.) Basic concepts

Source: Internet
Author: User

Starting today, we are going to write a series about the important and complicated problems in graph theory, such as graph matching, maximum flow, linear programming, and so on, by the way, the famous Hungarian algorithm for solving the maximum matching problem of graphs. It is a summary of the study of the previous period of time. Ps: I think very water, a lot of forgive me. (partial changes to the content, the original use Word edit formula here can not be displayed, only screenshots)

First of all, start from the basic concept, incidentally, some of the links between the next step in the algorithm.

The matching problem of graphs

One of the most common problems we've heard in our daily life is the famous marriage problem: In a set, there are M girls, s boys, 1<=r<=s, set S1, S2, ..., Si,.. , Sm represents the first girls like the collection of boys (of course a girl can like many boys), asked if it is possible to finally make this m a girl can and their favorite boys marry?

Our most intuitive idea of this problem is that we must first of all ensure that any R (<=m) girls like the number of boys must be greater than or equal to R. This is intuitive, such as 3 girls who only like 2 boys at the same time, can not be allocated anyway.

And it is this intuitive idea that solves the problem. From the above, can finally make M a girl can and their favorite boys marry the necessary condition is any R a girl like the number of boys must be greater than or equal to R. And by proving that, we know that this condition is also sufficient. This proof is not the focus of this article, so skip here and be interested to continue the discussion.

This problem is the maximum matching problem of graphs. But more generally we often say that the maximum matching problem of graphs is described in this way: What is the maximum match for a two-part graph? As shown in the figure, the maximum match is 4.

Second, maximum flow problem

The maximum flow problem is a classic problem, and many people are familiar with it, which can equate to a linear programming problem. Here is a basic description of the maximum flow problem: as shown in the following illustration, S is the source point, T is the meeting point, and the number on each edge is the maximum flow that the edge can allow to pass through. The edge can be viewed as a pipe, with 0/3 representing the maximum throughput of 3 units per second, and 0 representing current traffic. Maximum flow problem that is, from the point of S to T, the maximum allowable flow is how much?

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.