The definition and Terminology summary of C + + implementation diagram of data structure

Source: Internet
Author: User

Graph (graph) is composed of a set of vertices with a poor nonempty set and a vertex, usually expressed as: g (v,e), where G represents a graph, V is a set of vertices in graph G, and E is a set of edges in Figure G. The data elements in the diagram, which we call vertices (Vertex), have poor and non-empty vertex sets. In the diagram, there may be a relationship between any two vertices, and the logical relationship between vertices is represented by Benlay, and the edge set can be empty.

Second, the graph according to have no direction to divide into the graph and directed graph. A non-direction graph consists of vertices and edges, and a direction graph is composed of vertices and arcs. ARC has the arc tail and the arc Head's cent, with the arrowhead one end is the arc head.

Third, the figure according to the number of edges or arcs sparse and dense map. If there is an edge between any two vertices called a complete graph, there is a direction called a full graph. A simple graph is called if there are no overlapping edges or vertices to their edges.

The concept of adjacency points and dependencies between vertices in graphs. The number of edges of a graph vertex is called degrees. The vertex of a direction graph is divided into degree and degree.

Five, the edge or arc on the map with the right is called the net.

Six, the existence of the path between the vertices, the two vertices exist path is connected, if the path eventually returned to the starting point is called a ring, which is not repeated called simple path. If any two vertices are connected, then the graph is connected graph, and the direction is called strong connected graph. There is a subgraph in the graph, if the maximum link of the subgraph is the connected component, the direction is called the strong connected component.

In the undirected graph, the n-1 of n vertices is called a spanning tree. A direction graph in which a vertex is 0 of the remaining vertex into 1 is called a tree. A direction graph is composed of several tree-spanning trees to form a forest.

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.