Using Induction to design use inductive design algorithm [12/14]

Source: Internet
Author: User

Link: http://blog.csdn.net/jj12345jj198999/article/details/6631122

Optimal Matching in a dense graph [Q9] [Title 3]

In an undirected graph G = (V, E), a match is a set of edges without common vertices. (An edge corresponds to two vertices, and one vertex cannot correspond to an extra vertex.) The maximum matching is a problem that cannot be expanded. This means that all other edges are connected to at least one matching vertex. A maximum match is also the largest set. (A maximum match is always the largest, but it is not necessarily the correct one.) a match with n sides and 2n points in a graph is called the optimal match. (Obviously the biggest) in this example, we consider a very limited situation. We assume that the graph has 2n points, and the degrees of all vertices are at least N. We can see that there is always an optimal match under these conditions. We will first give a proof of this fact, and then show how to modify this proof to get an algorithm for finding the optimal match.

The largest inverse example is used. Consider a graph G = (V, E), where | v | = 2n the degree of each vertex is at least N. If n = 1, there is only one edge connecting two vertices, which is an optimal match. Assume that n> 1 does not have such an optimal match. Considering that the maximum matching M belongs to E. It is assumed that | M | <n, and because any side itself is a match, it is obvious that | M | ≥1. Since m is not complete (excluding all vertices ), then there are at least two non-adjacent vertices V1 and V2 not included in m (that is, they do not correspond to an edge in m ). These two points are at least 2n different edges from them. All these edges lead to vertices contained in m, otherwise such edges cannot be added to M. Since the number of edges in M is less than N and there are 2N edges connected from V1 to V2, M has at least one edge, which is assumed to be (U1, U2 ), it is connected to three edges from V1 to V2. For the sake of universality, we assume that these three edges are (U1, V1), (U1, V2), and (U2, V1) (see figure 6 ). We can easily see that by removing (U1, U2) from M and adding an edge (U1, V2) and (U2, V1), we can get a bigger match, this is in conflict with the previous largest assumption.

 

Insert graph 6

 

 

 

At first glance, it seems that this proof does not produce an algorithm, because the proof starts from a maximum match. Once we know how to find such a match, we can solve this problem. However, the use of the reverse identification method applies to any maximized matching. Here we only show the maximum matching. Searching for a maximum match is easier than searching for a maximum match. We only need to simply add unconnected edges (those without common vertices) Until such edges do not exist. Then we use the steps described above to convert the match into a larger match. Through the above proof, we can continue to execute until we find an optimal match.

Other evidentiary skills [Title 2]

In this paper, we focus on the proof Technique Based on induction. There are many other techniques and more analogy, some of which are obvious, and some are not so obvious. Many mathematical theorem proofs are obtained using a series of prerequisites, which directly correspond to the ideas in standard design and structured programming. The reverse identification method is also used in algorithm design. It is interesting to study the analogy that uses "similar arguments" to prove.

Here we will briefly list four evidentiary techniques (three of which are based on induction) and their analogy. For more examples and analogy, refer to [12.

Reduction and subtraction [Title 3]

Using reduction between problems is a powerful technique in proving theorem and designing algorithms. If problem A is specified as a special case of Problem B, the algorithm for solving problem B can be treated as a black box to solve problem. This technique is also effective for solving lower bounds and classifying problems (such as NP-complete problems ). If it is known that problem A is difficult, Problem B is at least as difficult.

Double induction [Title 3]

This is a method that uses induction to deal with an extra variable at a time. It can be used when the optimal sequence of induction is not clear, and this method is also easy to use when several variables are selected based on a specific step. For example, if the question contains N items and a K-dimensional space, we may want to reduce the number of items or the number of item sizes during Algorithm Execution [see Example 4 ].

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.