Elementary discussion on algorithm and data structure 12 non-direction graph correlation Algorithm Foundation

Source: Internet
Author: User

Starting with this article, we introduce the graph-related algorithms, which is also the first lesson note for the second part of the algorithms online course.

The application of graphs is very extensive, there are many useful algorithms, of course, there are many problems to be solved, according to the nature, the graph can be divided into the direction of the graph and the map. In this paper, we introduce the direction-free graph first.

The reason to study the graph is that it is widely used in life:

Non-direction graph

A graph is a plurality of vertices (vertices) and edges (Edges) interconnected. The side is connected only by two vertices, and a graph without direction is called a freeform graph. Before studying the graph, there are some definitions that need to be clear, and the following illustration shows the meaning of some of the basic attributes of the graph, which is not much explained here.

The API representation of the graph

Before the study of the graph, we need to choose the appropriate data structure to represent the graph, sometimes, we are often deceived by our intuition, the following figure, these two are actually the same, this is actually a research question, is how to determine the shape of the graph.

To use a computer to process a graph, we can abstract the following APIs for representing graphs:

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.