1.1 Basic concepts of graphs

Source: Internet
Author: User

(Reference books: 2018 data structure King of the Postgraduate examination) definition of Diagram

Figure G consists of a fixed point set V and a side set E

recorded as G= (V,e)

which V (g) is a finite non-empty set of vertices in g

E (g) is the G Middle edge (vertex relationship) set and

| v| represents The number of vertices in G, also known as the order of graphs

e={(U, v) | U, v are vertices} | e| represents Number of bars on the middle side of G

Note: The figure cannot be empty, the edge can be empty, but the vertex must be non-empty

a map of the direction

if E is a directional edge (also called an arc ), when the graph is a directed graph

Remember to do <u,v > U for Arc Head V for Arc tail, arc called U to V, u adjacency to V, v adjacent to U arc

G = (E, V)

E = {A-c}

V = {<1, 2>, <1, 3>, <2, 3>, <3, 2>}

graph without Direction

E is a non-forward edge (abbreviation edge ), then the graph is a graph without direction

(U, v) or (V, u) at this time (U, v) = = (V, u) because there is no direction

G = (V, E)

V = {1, 4, 5, 6}

E = {(1, 6), (1, 5), (5, 6), (4, 6)}

Simple diagram

The following conditions are met:

1. No duplicate edges

2. No vertex to its own edge, the above two diagram is a simple diagram

Multiple graphs

In contrast to a simple diagram:

1. Duplicate edges exist

2. Allow vertices to connect to themselves through an edge

Full picture

No direction full picture: An edge exists between any two points

Directed full graph: Two arcs in the opposite direction between any two points

Sub-chart

g = (V, e) g ' = (v ', E ')

V ', E ' is a subgroup of V, E, then G ' is a sub-graph of G, if V (g ') = V (g), then G ' is the generation of G-sub-graph

connectivity, connected graphs and connected components (undirected graphs)

The vertex v to Vertex W has a path, which is said V and W are connected. If any two vertices in Figure g are connected, the G is a connected graph , otherwise called a non-connected graph .

The maximal connected sub-graph of undirected graphs is called connected component

Maximal connectivity Sub-graph: The connected component of undirected graphs, requiring the sub-graph to contain all the edges.

Minimal connected sub-graph: a sub-graph that remains connected and has a minimum number of edges.

Strongly connected graphs, strongly connected components (undirected graphs)

V->w w->v are all by path, the two vertices are strongly connected.

If any pair of vertices in the graph are strongly connected, then the graph is a strongly connected graph

The maximal connected sub-graph is called the strongly connected component of the graph.

Spanning tree, spanning forest (connected graph)

Spanning Tree of connected graphs: a very small connected sub-graph containing all the vertices on the way.

Non-connected graph, spanning tree of connected components forming non-connected graph generation Forest

degrees, degrees, and degrees of vertices

Set E as Edge (edge), V as the number of edges attached to a vertex

Graph without direction: Sum (TD (vi)) = 2e

Forward graph: TD (v) = ID (v) + OD (v), SUM (ID (vi)) + SUN (OD (vi)) = E

Right and net of the edge

In the diagram, each edge can be labeled with a value that has a meaning, which is called the weight of the edge

A graph with weights on the edge is called a weighted graph (net)

Dense graphs, sparse graphs

A graph with a few sides, called a dense graph.

The number of edges at this time, usually satisfying: | e| < | v| * log | v|

path, path length, and loop

Path: Refers to the vertex sequence of vertices to vertices in the graph

Path length: Number of top of path

Loop, Ring: The same path as the first vertex and the last vertex

Simple path, simple loop

Simple path: No duplicate vertices in this path

Simple loop: Vertex repetition only, other vertices no duplicates

Distance

Shortest path from u to V

U to v does not exist path do infinity

There is a direction to the tree

There is a vertex with a degree of 0, and other graphs with a vertex-in degree of 1 are called a tree.

1.1 Basic concepts of 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.