Study of Euler circuits

Source: Internet
Author: User

Euler loop problems:

Is it possible to go from one point to the next, and each side just goes back to the starting point?

The Euler circuit of the non-direction graph:

If each vertex in the graph has an even number of degrees, you can draw a line from the starting point to the terminating point, which is the Euler loop of the graph without direction;

The Euler circuit of the graph:

If the degree of each vertex of the graph is equal to the degree of entry, then a line can be drawn from the starting point to the terminating point, which is the Euler loop of the direction graph;

The ring algorithm of Euler loop:

1. Determine if there is a euro-pull circuit;

2. Look for the ring p1-p2-p3 from I-... px; (p1=px, i.e. the starting and ending points are the same)

3. Mark the P1 to PX for the status to be looked up;

4. Take the 2nd step for each point you want to find, i.e. recursively find the ring, and insert the newly found ring into the ring of the previous layer to get P1-P2-.. PJ-1-Q1-Q2-... qy-pj+1-pj+2...-px (Q1 the same as the original PJ);

Study of Euler circuits

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.