Current location - Loan Platform Complete Network - Big data management - How to judge whether a sequence is an undirected simplicity sequence in discrete mathematics
How to judge whether a sequence is an undirected simplicity sequence in discrete mathematics
This problem is called "graphrealization" and the algorithm to be solved is called "HavelHakimi" algorithm.

Sorting the degrees from the largest to the smallest, the original degree sequence can form a graph, and the residual degree sequence can form a graph if and only if the point with the largest degree v 1 is connected with the points with the largest degree except v 1 by an edge. Can form a chart.

In this way, the problem of n vertices is transformed into the problem of n- 1 vertices.

If we continue to do this, we can continue to turn it into n-2, n-3 problems, ... vertices.

If a graph can be constructed, the final result is a vector with all zeros. In addition, it is impossible to form a graph, such as a certain degree is negative, or the value of d 1 is greater than the number of remaining vertices, and so on.

Extended data:

Functional understanding of sequences;

① Sequence is a special function. Its particularity is mainly manifested in its definition domain and value domain. A sequence can be regarded as a positive integer set N* or its finite set {1, 2,3, ..., n}, where {1, 2,3, ..., n} cannot be omitted.

② Understanding sequence from the perspective of function is an important way of thinking. There are generally three ways to express functions, and sequence is no exception. There are usually three representations: a. list method; B. mirror image method; C. analytical methods. Among them, the analytical methods include giving the sequence with general formula and giving the sequence with recursive formula.

③ Functions do not necessarily have analytical formulas, and similarly, not all series have general formulas.