Data Structure: Graph definition and glossary

Source: Internet
Author: User

1. graph is a set of vertices and edges between vertices. It is usually expressed:G (V, E)Where, G represents a graph, V is the set of vertices in graph G, and E is the set of edges in graph G. The Data Element in the graph is called vertex, And the vertex set is not empty. In the figure, any two vertices may have a relationship. The logical relationship between them is expressed by edges, and the edge set can be empty.

2. graphs are divided into undirected graphs and Directed Graphs Based on the direction or not. An undirected graph consists of vertices and edges. A directed graph consists of vertices and edges. An arc can be divided into an arc tail and an arc head. An end with an arrow is an arc head.

3. sparse and dense graphs based on edges or arcs. If an edge exists between any two vertices, it is called a full graph and a directed full graph. If there are no repeated edges or vertices to their own edges, it is called a simple graph.

4. the vertex in the graph has the concept of adjacent points and attachment. The number of edges of an undirected graph vertex is called degree. Directed Graph vertices are classified into inbound and outbound vertices.

5. The edge or arc band on the graph is called a network.

6. There is a path between the vertices in the graph. If the two vertices exist in the path, they are connected. If the path finally returns to the starting point, it is called a ring. The non-repeated paths are called simple paths. If any two vertices are connected, the graph is a connected graph. A directed graph is called a strongly connected graph. The graph contains subgraphs. If the subgraphs are connected components in Dalian, directed components are strongly connected components.

7. An undirected graph is connected with n vertices and n-1 edges are called spanning trees. In a directed graph, a directed tree is a vertex whose input degree is 0 and that of other vertices is 1. A directed graph consists of several directed trees to generate 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.