Mathematics: Hungarian algorithm

Source: Internet
Author: User

Hungarian algorithm: It was presented by the Hungarian mathematician Edmonds in 1965, hence its name. The core of this algorithm is to find an augmented path, and an algorithm for finding the maximal matching of binary graph by augmented path.

   through this picture to tell. Black stands for a\b\c\d four puppies, red for four flavors of bone, and each line represents a puppy like to eat this taste of bone.

We assign bones to puppies in order, assign a to a, it's obvious that a is unoccupied and small a dog likes, distributes, bloggers like oblige. (????)

Now to small B-dog allocation, small B like B, premise B no occupancy and small B love for a long time, and fulfill a puppy, wow haha ~ ~

turn to small c dog, small C for a long time, but small c like the bones are all accounted for, good poor have wood, but it doesn't matter, we want to help him." Such as.

 

Through this picture, we can very clearly know, we put a first take off, but still want to find one, otherwise it is too eccentric, to a find B, but B is accounted for, similarly, also take off, so that a Met, in to B continue to find , so we can find the C,ok, and we'll find the back tire, so little C can eat a!!!. Similarly to D, but found that if you meet D, the others will be destroyed, in full, the maximum matching value is 3.

The process of the Hungarian algorithm is the above scheme.

 

http://blog.csdn.net/dark_scope/article/details/8880547 This address has a precise description, additional code

Mathematics: Hungarian algorithm

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.