Basic knowledge of graph theory

Basic knowledge of graph theory

  • Points (vertices), edges (edge)

  • The graph G=(V, E) with directions added to each edge is called a directed graph , otherwise it is called an undirected graph . If some edges have directions and some have no directions, it is called a mixed graph .

  • A graph where there is at most one edge between any two vertices (more than one edge between two points: double edge), and the two endpoints of each edge do not overlap (one edge is enclosed in a circle, and only one point is passed: self-edge/circle ), called a simple graph .

  • The relationship between the number of vertices n and the number of edges e of graph G

    1. If G is an undirected graph, then 0≤e≤n(n-1)/2 an undirected graph with
      exactly n(n-1)/2 edges is called an undirected complete graph (Undireet-ed Complete Graph)
    2. If G is a directed graph, then 0≤e≤n(n-1).
      A directed graph with exactly n(n-1) edges is called a directed complete graph (Directed Complete Graph)
  • A weighted graph refers to a graph with one (or more) real numbers corresponding to each edge, and this (several) real numbers are called the weight of the edge (each edge can have multiple weights). Weighted graphs are very useful in practical problems. According to different actual situations, the meaning of weights can be different. For example, the weight can be used to represent the actual distance or travel time between two places, and the weight can also be used to represent the processing time required for a certain process.

  • If there is an edge between two points, the two points are adjacent. The number of edges associated with a point is called degree or valency. Call G a k- regular graph , when all vertices of G have the same vertex degree k. In particular, 3-regular graphs are called cube graphs .

  • degree

Insert picture description here

  • Complete even graph refers to complete bipartite graph, not all graphs with even points ((

  • An independent set of a graph is a set formed by some pairs of non-adjacent vertices in the graph.

  • The clique of a graph is a collection of adjacent vertices in the graph.

  • Connected graph

    If a graph or a directed graph has "only one piece", then any two vertices can be connected by a path. Such a graph is called connected. A "more than one piece" graph or connected graph is called disconnected. **Connectivity** is an important research object of graph theory.

Path definition

  • Connect randomly on the graph: define chain (walk), then define trace (chain with different sides), and then define road (traces with different internal points) . Then define the closed chain (the same starting point, whether the chain, traces, paths) , and closed chain in the closed track is loop Circuit , closed chain closed as circle (ring) Cycle .

  • Ring is a top point of each of the different closed channel.
    This actually implies that there is no line dividing the area enclosed by the closed channel into two parts.
    You can imagine a circle, fold back and forth in half, and finally point the apex on it. As long as you don't fix the position of the intersection, you can always expand back into a circle.

  • According to the definition of trace and road, a loop is a closed trace, and a closed trace is not necessarily a loop.

Euler diagram, Hamilton diagram distinction

Insert picture description here

  • Euler graph : For connected graph G, if there is a closed trace passing through each edge in G, then G is called Euler graph, or E graph for short.

    vernacular:

    Euler circuit : If there is a path starting from the starting point S, each side only goes exactly once, and finally returns to the starting point S.

    Euler path : If there is a path starting from the starting point S, pass through each edge once, but it is not required to return to the starting point S. (Requirements for one-stroke problem)

    An undirected graph with Euler circuit is called Euler graph

    A graph with Euler paths but no Euler circuits is called a semi-Eulerian graph .

    The picture above is a half Euler diagram.

  • Judgment of Euler circuit and Euler path

    • Euler circuit of a directed graph: the in-degree and out-degree of each point must be equal
    • Euler path of a directed graph: starting point degree -1, ending point degree 1 and other points 0
    • Euler circuit of undirected graph: the degree of each point is even
    • Euler path of undirected graph: only two points have odd degrees
      Insert picture description here
  • Hamiltonian: If after each vertex of a graph G exactly once after can be returned to the starting point , i.e. the presence of H referred Hamiltonian FIG ring, referred to H in FIG.

    Hamiltonian cycle (Hamiltonian cycle): A cycle that passes through each node of graph G once and only once, except for passing through the initial node twice

    Hamiltonian path (Hamiltonian path): a path that passes through each node of graph G once and only once

  • At present, there is no method to prove whether a graph has a Hamiltonian cycle (there is no sufficient and necessary condition to prove),
    but the existence of a Hamiltonian cycle has many sufficient conditions, that is, when the graph satisfies certain properties, the Hamiltonian cycle must be Exist and can be constructed according to a certain algorithm.

    1. Dirac's theorem: Suppose there are N nodes in an undirected graph. If the degree of all nodes is greater than or equal to N/2, then the Hamiltonian cycle must exist.
    2. Competition graph (directed complete graph, there is exactly one directed edge between any two vertices): There must be a Hamiltonian path in the n (n>=2)-order race graph.

Guess you like

Origin blog.csdn.net/qq_45268474/article/details/107952994