Abstract
In the current era of increasingly complex social life, as people’s demand quality is getting higher and higher, the solution of the problem often has multiple indicators to achieve the optimum. This forces the graph coloring problem (GCP) to become complicated, and it is difficult to directly obtain the optimal solution, which brings new challenges to the solution of the problem. In response to this problem, the GCP field is of great research significance. With the in-depth study of GCP, the research on multiobjective optimization (MOO) in graph coloring algorithm (GCA) is gradually carried out. Its performance advantage is of great significance for solving multicondition constraint problems. This paper aims to study the application of Genetic Algorithm (GA) in GCA. Through the analysis and research of GA, and the fusion of numerical analysis and scientific computing, it can be applied to the construction of the neighbor distinguishable uniform V-full coloring algorithm (AVDEVTCA) to solve the AVDEVTC problem. This paper describes the basic theory of MOO and graph coloring. It conducts an experimental analysis of the algorithm performance and uses the relevant theoretical formulas to explain it. The results show that the algorithm takes 5754.142 S seconds to test 21325415 images and can color a large number of results that cannot be done manually in less time. It has greatly improved in terms of time and manpower saving and greatly improved practicability and work efficiency.
1. Introduction
The modernization process is constantly evolving, and various fields are constantly developing at the same time, and many numerical calculation problems are extended. Ordinary human computing has been unable to solve huge data or more accurate data. Numerical analysis and scientific computing are the use of computers to perform numerical calculations. Numerical analysis and scientific computing have successfully solved a series of difficult problems such as the optimal solution of parameters in all walks of life, with high accuracy. The scientific computing power of computers is still limited. For example, in numerical weather forecasting, only medium- and short-term forecasts can be made. In the aerodynamic design of the aircraft, it can only be carried out in parts, and in the oil exploration, only rough mathematical models can be processed. More powerful computers are required for long-term numerical weather forecasting, overall aircraft aerodynamic design, and processing of more accurate mathematical models in oil exploration.
In today’s increasingly complex situation, how to quickly and efficiently obtain the optimal solution for problems with multiple constraints has far-reaching significance for the development of all walks of life. The concept of MOO is that when multiple objectives need to be achieved in a certain situation, due to the inherent conflict between objectives, the optimization of one objective is at the expense of the deterioration of other objectives, so it is difficult to obtain a unique optimal solution. Instead, there is coordination and compromise among them to make the overall goal as optimal as possible. The MOO idea has better effect on the multiconstraint problem to be solved and has less restrictions, so its application range is very wide. In recent years, some scholars have used scientific computing to solve graph coloring problems, but the application and research of MOO algorithms in this area are relatively few. Therefore, it is of great significance to apply genetic algorithm to the research of solving the problem of average total color of graphs.
2. Related Work
With the progress of society, more and more people have studied numerical analysis and scientific computing. Danaila et al. proposed to use numerical methods to solve problems in various fields of application and provided 12 computational projects [1]. This point of view has aroused the continuous attention of later scholars on the research of this problem, but the application in other fields needs to be expanded. Therefore, And Elman and Furnival applied multigrid to solve the stochastic steady-state diffusion problem [2]. Although his research has proved theoretically and experimentally that the convergence rate is not related to spatial discretization and random discretization. But the research to solve the disk simulation problem has not been carried out. Based on this, Wilber et al. described an algorithm applied to define a smooth function on the unit disk for numerical computation to solve-related problems [3]. However, although this study fills the gap of numerical analysis applied to the disk simulation problem, it lacks a strong practical example to prove it. Dlz et al. utilized boundary integral equations to efficiently solve partial differential equations of strong elliptic operators with constant coefficients and stochastic Dirichlet data. But the values it provides are not accurate enough [4]. Tonicello et al. explored some spectral analysis and typical fluid mechanics problems. Although there is a certain progress significance, but with the emergence of data, mining and data popular learning problems can no longer meet the needs [5]. Based on this, Druskin et al. proposed the application of graph Laplacian dimensionality reduction based on data spectral clustering [6]. While this is somewhat helpful for solving related problems, the computational cost is too high. Karaa et al. proposed the use of FEM to derive the solution of the fractional time diffusion equation over a bounded convex domain. Although there is some example data analysis, its accuracy is not enough [7].
After a period of research, it is found that MOO provides new ideas for solving new problems in numerical computing and scientific computing applications. Therefore, some scholars turn their attention to the research of MOO. Rashidi and Khorshidi developed a MOO method based on differential evolution algorithm and local unimodal sampling technique. He applied it to a biomass gasification system to calculate the optimal values of system parameters for multiple generations [8]. This is an important attempt on the application of MOO to problem solving. But it only exists as an auxiliary function and is not the main research object. Therefore, Zille et al. proposed a new method called a weighted optimization framework to solve MOO problems with a large number of decision variables [9]. This study takes MOO method as the main research object and fills the research gap. However, it was found in the study that this method relies on the grouping mechanism to be solved. Do et al. successfully solved the MOO problem of turning process through Taguchi combination method and MOORA technology. However, the authenticity of the experimental data needs to be verified [10]. Onler et al. proposed a method to determine the ideal process parameters for Co-Cr-Mo alloy binder jetting [11]. This method solves the problem of high-speed and low-cost manufacturing of high-volume defect-free products. But the range of conditions of application is very limited. Kazi et al. developed a hybrid powder blending EDM technology [12]. Although this technology improves the problem of increasing the corresponding amount of powder in mixed powder processing, it does not solve the problem in essence. Babaelahi et al. made parabolic fin (convex) heat sinks through MOO to maximize thermal efficiency and minimize entropy generation [13]. It applies multiproblem optimization to the field of LED lamps and broadens the application scope of this technology, but the control accuracy is not enough. Yadav et al. used a multiobjective genetic algorithm to optimize the rotational speed of the equipment. He determined optimal values of design parameters related to active magnetic bearing (AMB) geometry and electromagnetic actuators [14]. However, the experimental process is not rigorous enough, ignoring the influence of different environments. The above research attempts to apply MOO to the solution of numerical problems in various fields. However, the application research of fusion MOO in graph coloring algorithm needs to be supplemented.
In order to solve the application research problem of fusion MOO in graph coloring algorithm, this paper uses MOO to analyze the graph coloring algorithm. The algorithm performance test is simulated to achieve the highest accuracy and the lowest time loss. The innovation of this paper is (1) the theoretical knowledge of MOO and graph coloring algorithm are introduced. It also uses MOO and graph coloring algorithm to analyze how genetic algorithms and graph theory shading algorithms play a role in the application research of MOO integrating numerical analysis and scientific computing in graph coloring algorithm. (2) The performance of the proposed algorithm is described below. Experimental results show that the algorithm has excellent performance and practicability and significantly improves the coloring efficiency.
2.1. Methods
When solving graph coloring problems using common intelligent algorithms, there is a limitation that is limited to solving graph coloring problems with a single constraint, for example, ant colony algorithm, BP neural network algorithm, tree algorithm, etc. However, when faced with the problem of multiconstraint graph coloring, the effect of common algorithms is often unsatisfactory [15]. Through the investigation, it is found that there are very few introductions that combine scientific computing with graph coloring algorithms. So this paper proposes an algorithm to solve this multiconstraint problem. The algorithm designs a total objective function and four subobjective functions to accommodate the various constraints of AVDEVTC. Through the repeated exchange operation of the color set of each point on the coloring matrix, each subpurpose function is optimized, and then the overall objective function requirements are satisfied. Extensive experiments and analysis show that the algorithm obtains correct and less time-consuming results for AVDEVTCN and graph adjacency matrix. The organizational structure of this paper is shown in Figure 1:

As can be seen from Figure 1, the full text of this study consists of five parts. The first part mainly introduces the research background of numerical computation and MOO problems. It leads to the fact that conventional intelligent algorithms cannot solve multiconstraint problems well to illustrate the purpose and significance of this research. The second part makes a general analysis of the research status in the fields of numerical analysis, scientific computing and graph coloring, and explains the content and innovation of this paper. The third part describes the organization structure and method of this research and shows it through the structure diagram. It also introduces the related methods of graph coloring and MOO. It also provides an algorithmic description of the random graph generation algorithm and the proposed new algorithm. The fourth part obtains the result by simulating the random graph and testing a large number of graphs and draws the conclusion that the algorithm can improve the work efficiency after analyzing the result data. The fifth part concludes and reflects.
2.2. Figure Staining
This paper mainly focuses on the algorithm research for the solution of GCP. Graph coloring problem (GCP), also known as coloring problem, is one of the most famous NP-complete problems. Mathematical definition: given an undirected graph , where is the set of vertices and E is the set of edges. The graph coloring problem is to divide into K color groups, each of which forms an independent set, that is, there are no adjacent vertices in it. Its optimized version is to hope to obtain the smallest K value. Therefore, the following describes the definition and introduction of the principle of graph coloring to prepare for the subsequent optimization algorithm.
2.2.1. Definition of Strongly Distinguishable Coloring
T (Q, ) is a simple connected graph with order greater than or equal to 2. The mapping of E (Q)∪R (W) to positive integer Y = {1, 2, …, k} is f, and for , for , for , it is expressed by formula (1):
Then the strongly distinguishable panchromatic number of adjacent points is defined as formula (2):
Among them, Past (T) is the strongly discriminative panchromatic number of adjacent points in the graph T and .
If there is a connected graph whose order T is not less than 3, then there is formula (3):
When the graph T has more than two adjacent maximum degree vertices, it is shown in formula (4):
Suppose An is a complete graph of order n with n ≥ 3, then there is formula (5):
Among them, [log2n] is the smallest integer not less than log2n in formula (5).
Then according to the above principles, it is guessed that there is a simple connected graph with order T of at least 3, and there is formula (6):
For the plane graph T of order not less than 3, there is formula (7):
The combination degree of graph T is shown in formula (8):
Among them, i is the number of points; ni is the moderate degree of E (T); is the combination degree of graph T; and the Past of part of the graph T is shown in Table 1:
There is a simple connected graph whose order T is at least 3, then there is formula (9):
When the graph T has a maximum degree vertex of ≥2, then there is formula (10):
Assuming that there is a complete graph F when n ≥ 3, then there is formula (11):
In formula (11), [log2n] is the smallest integer of ≥log2n.
There is a simple connected graph of order T (Q, ) not less than 2, f is the mapping from Q (T) ∪ W (T) to positive integer Y = {1, 2, … k}. And for , , and , the point-intensity distinguishable complete colors of the graph are shown in formula (12):
Then the strongly distinguishable panchromatic number of adjacent points is defined as formula (13):
Among them, Past (T) is the k-point strongly distinguishing panchromatic number of graph T, and .
Assuming that there is a complete bipartite graph Fnm, there is formula (14):
Among them, 2 ≤ m ≤ n.
Assuming that there is a complete bipartite graph Fnm, there is formula (15):
Among them, n ≥ 4.
According to the above derivation, for the complete graph Fn (n ≥ 3), there is formula (16):
The Pvst of part of the graph T is shown in Table 2.
3. MOO and Genetic Algorithm That Integrates Numerical Analysis and Scientific Computing
This paper combines the MOO idea with the graph coloring algorithm and combines numerical analysis and scientific computing to propose a new algorithm.
3.1. MOO
Multifunctional optimization (decision-making) problems often do not have a single globally optimal solution, but there are multiple optimal solutions [16]. The elements of the optimal solution set for a multipurpose problem cannot be compared with all subobjectives. In general, this is called the Pareto optimal solution set, and the elements of the solution set are called nongood and bad optimal solutions. Assuming that for any two solutions S1 and S2 for all objectives, S1 is better than S2, then S1 is said to dominate S2. If S1 is not dominated by other solutions, then S1 is called a nondominated solution (undominated solution), also known as a Pareto solution.
Objective functions and constraints in multifunctional optimization problems are generally functions with independent variables [17]. Its optimization definition is shown in formula (17):
Among them, X is the independent variable space; Y is the target space; the independent variable vector is ; and the target vector is , and the feasible solution set is determined by .
A feasible set is a set of independent variable vectors that satisfy the constraints as shown in formula (18):
Among them, in the feasible region of the target space, is the phase of Numerical analysis can be used to study its error bounds, iterative scheme convergence, convergence order and speed, and computational complexity.
Numerical analysis is the study of mathematical analysis algorithms (as opposed to general symbolic operations) that use numerical approximations (as opposed to discrete mathematics).
Scientific computing uses advanced computing capabilities to understand and solve complex problems. Practical aspects of obtaining an exact solution to a multiobjective optimization problem can be obtained through scientific computing.
3.2. Genetic Algorithm
Genetic algorithm is an efficient optimization method that can be used to solve and deal with complex optimization problems [18]. Genetic algorithm is a stochastic intelligent optimization algorithm based on natural selection and natural genetic mechanism. In real life, when using the genetic algorithm to solve the optimization problem, the chromosome size of the population is first determined according to the feasible region. The encoded fitness value is then calculated by constructing a fitness function. Then, according to different fitness values, the chromosomes are selected, crossed, and mutated to generate more populations that meet the conditions and search for the best solution in a wider range of feasible space. In this paper, the idea of genetic algorithm is used to improve the full coloring algorithm. The basic process of genetic algorithm is shown in Figure 2:

As shown in Figure 2, the optimization problem is solved by a genetic algorithm. First, the size of the chromosome is determined, and second, the fitness of the code is calculated. It again performs regular operations on chromosomes based on the fitness value. Finally, a population that satisfies the conditions is generated to complete the entire algorithm and obtain the optimal solution of the problem.
Genetic algorithm has the advantages of self-organization, self-adaptation, self-learning, and intrinsic parallelism, so it can search multiple regions at the same time. But at the same time, the genetic algorithm also has shortcomings, such as when the scale of the graph increases, the chromosome subspace increases sharply, and the design of the crossover operator and mutation operator is blind. This greatly affects the optimization efficiency of the graph coloring problem. Genetic algorithm has good global search ability, but still has some shortcomings in local search ability.
4. Algorithm for Generating Random Graphs
The two random graph generation algorithms provided basic research data to demonstrate the test of the result set, statistics and related additions, and conjectures of a series of coloring algorithms, laying the foundation for subsequent research on coloring algorithms [19].
4.1. ER Model
In 1959, Hungarian mathematicians proposed a random network model that randomly connected points and edges with the same probability to form a random network, namely the ER model. When a number of fixed points are given, it is assumed that each vertex is connected by edges, and a random graph can be obtained by randomly selecting edges from these edges. The number of random graphs that can be generated is shown in formula (19):
Among them, is the number of vertices; is the number of edges; and h is the number of edges randomly selected from them.
4.2. Binomial Model
The probability of its existence is shown in formula (20):
Among them, m is the number of vertices; is the connection probability; and B is the average value of all connections.
The random graph algorithm is designed, and the basic process of the random graph algorithm is obtained, as shown in Figure 3:

As can be seen from Figure 3, the random graph is generated by the random graph algorithm. First determine the number of vertices to get the random matrix of the adjacency graph, and then randomly generate the edge-filling array of the graph. It fills the edges according to the rules, 1 means there is an edge, and 0 means no edge. Next, judge whether it is a connected graph, if not, return to the previous step, if yes, output the adjacency matrix of the random graph, and the algorithm ends.
4.3. Spanning Tree Algorithm
In the mathematical field of graph theory, if a subgraph of a connected graph is a tree containing all vertices of , then the subgraph is called a spanning tree of . A spanning tree is a minimal connected subgraph of a connected graph that contains all vertices in the graph. The spanning tree of a graph is not unique. By traversing from different vertices, different spanning trees can be obtained. This algorithm can realize all spanning trees within a limited number of points, which brings convenience to the problem of graph generation and graph coloring studied in this paper [20].
The weight Q (S) of the tree is written as formula (21):
Among them, SD is the edge set of S; Q () is the weight of the edge ().
4.4. Solving Matrix Eigenvalue Algorithms
Although there are many ways to solve the eigenvalues of mathematical matrices, this paper uses the QR decomposition method to solve the corresponding eigenvalues and eigenvectors. The QR algorithm is an algorithm that uses a recursive method to solve the eigenvalues and eigendirections of a matrix. When the number of recursive rounds is appropriate, the QR algorithm will obtain an upper triangular matrix, and then obtain the eigenvalues. The basic idea is to generate the same repeating sequence as matrix J by orthogonal decomposition of the matrix, as in formula (22):
Among them, J is the matrix to be solved.
The basic flow of the spanning tree algorithm is shown in Figure 4:

As can be seen from Figure 4, all spanning trees for a given point are output using the spanning tree algorithm. First determine the number of vertices, then input the star map of the vertex to obtain the first layer of the decision tree, and then continue to generate the decision tree according to the rules, count the active node set and number, and then judge whether it is an isomorphic graph. If yes, return to the previous step without output, otherwise, output the adjacency matrix of the graph and record it. Then judge whether there is an active node, if yes, then return to continue to derive the decision tree, otherwise the algorithm ends.
4.5. Neighbor Distinguishable Uniform V-Full Coloring Algorithm of Graphs
4.5.1. Algorithm Description
First randomly color the vertex and then the same color on any two points. After the random vertices are colored, the related vertices are colored with the remaining colors. After half of the objective function, if it is not correct, continue to adjust until it fully meets the requirements after adjustment.
The flow of the MOO algorithm is shown in Figure 5.

It requires that the difference in the number of times every two colors is used is not more than 1. Adjacent vertices have different colors, adjacent edges have different colors, and vertices and associated edges have different colors. Then the multiobjective function satisfying these conditions is shown in formula (23):
Among them, the decision vector is .
4.5.2. Build the Objective Function
The edge coloring objective function is constructed as shown in formula (24):
Among them, is any two adjacent edges and ∈ ;
The point-edge objective function is constructed as shown in formula (25):
Among them, mi is any two edges and ∈ . The number of edges for vertex color conflict is .
The objective function of constructing the color set is shown in formula (26):
Among them, m, i are two adjacent points, ∈. ; = (P1, P2, …, Pn). The number of color set collisions for neighbor pairs is .
The limitation of the unified objective function is that the difference in the number of uses of any two colors is less than 1. Its function is shown in formula (27):
The number that does not satisfy that the difference in the number of times of use of each two colors is not greater than 1 is.
According to the above subobjective functions, the total objective function is obtained as shown in formula (28):
Among them, . When = 0, the staining was successful.
5. Experimental Simulation and Analysis
In the random graph test, the algorithm is tested by choosing a random graph with 8 vertices. Initialize the random graph: first, an adjacency matrix of a random graph with 8 vertices is generated by using the random graph generation algorithm. Then count the degrees of each vertex and determine the initial chromatic number. The initial graph adjacency matrix is shown in Table 3:
It can be seen from Table 3 that the maximum degree of the graph is 7, and the chromatic number required for full dyeing can be obtained as 7 + 1 = 8. The number of graphs obtained for each of the other vertices is 3 for 3 degrees, 2 for 4 degrees, and 2 for 5 degrees. Among them, Q () is the degree of each vertex, and represents each vertex of the graph.
Vertex coloring: color vertices are randomly selected from colors 1 to 8, and the vertex colors can be the same.
Edge prestaining: it does random coloring and vertex-associative edge coloring for edges after removing the color used for vertex coloring. The obtained coloring matrix is shown in Table 4:
From Table 4, the color complement sets S ()∼S () of each vertex can be obtained as follows: {2, 6, 7, 8}; {⊘}; {2, 4, 6, 8}; {2, 3, 5}; {2, 4, 8}; {1, 2, 5, 7}; {1, 2}; {1, 2, 6, 7}.
Find conflict sets: if there is a conflict, there is , and the conflict situation is shown in Table 5.
It can be seen from Table 5 that when the color number k is 8, Q () + S () = k − 1 = 7. Among them, , , and are in conflict, and the staining is abnormal.
Adjust the coloring conflict: it swaps conflicting colors according to the rules, and then modifies the set of color complements. The new nonuniform dyeing results obtained are shown in Table 6:
As can be seen from Table 6, the staining conflict has been resolved. The color complement sets S ()∼S () of each vertex are obtained as follows: {2, 4, 7}; {⊘}; {2, 4, 5, 6}; {4, 6}; {2, 4, 6}; {3, 6, 7}; {1, 2}; {1, 2, 6, 7}.
Check whether the chromatic number is uniform: as you can see from the table data, the use of color is not uniform. The use of color should continue to be adjusted. After adjusting the use of color according to the algorithm, the final uniform dyeing results are obtained, as shown in Table 7:
According to the data in Table 7, the difference between the number of used colors of any color is less than or equal to 1. It is already average and meets full staining conditions. The color complement sets S ()∼S () of each vertex are obtained as follows: {4, 6, 8}; {⊘}; {1, 2, 7, 8}; {1, 6}; {2, 4, 8}; {1, 3, 5, 6}; {3, 4}; {1, 2, 7, 8}.
Experimental result data, it tests graphs with vertices ranging from 100 to 1000 and obtains graphs with chromatic numbers of △ + 1 and △ + 2, as shown in Figure 6:

(a)

(b)
As can be seen from Figure 6, the number of Δ + 1 chromatic numbers with vertices ranging from 100 to 1000 is 6.51, 6.15, 5.53, 6.33, 4.85, 3.42, 3.12, 3.73, 4.33, and 2.85, respectively. The overall number of graphs with ∆ + 1 chromatic number decreases as the number of vertices increases. The number of Δ + 2 chromatic numbers from 100 to 1000 for fixed-point numbers has risen from 3.26 to 7.25. The overall number of graphs with ∆ + 2 chromatic number tends to increase as the number of fixed points increases.
All graphs within 3 ≤ n ≤ 8 were tested, as shown in Figure 7:

(a)

(b)
It can be seen from Figure 7 that there are 2, 14, 21, 113, and 853 nonisomorphic graphs with vertices 3 to 7, respectively, and the number of vertices 8 is all numbers. There are 21325188 isomorphic images in it.
Test the degree sequence with the chromatic number and the number of edges. Due to space limitations, the test results of some graphs are shown in Figure 8:

(a)

(b)
In Figure 8, the vertex degree distributions in the graph are represented as degree sequences. The number of uses of the color number is reflected in the number of uniform dyeing. Each of the small graphs represents a graph test result.
It tests the graph between 20 and 400 points. Due to the large number of samples, in order to obtain the change curve of color number and edge density, only the coloring results of a part of the chart are listed. The change curve is shown in Figure 9:

(a)

(b)
As can be seen from Figure 9, as the edge density and the number of points continue to increase, the structure of the connected graph becomes more complex, and more colors need to be used. So the number of colors increases with edge density and number of dots. Through the analysis of the test results, it can be seen that all simple connection graphs within 8 vertices have AVDEVTC.
Calculation of running time: all graphs of random graphs with 8 vertices were tested using this algorithm, and the running time is shown in Figure 10:

As can be seen from Figure 10, the corresponding running times for the 2, 6, 21, 113, 853, 21325415 graphs are 0.0005 S, 0.042 S, 0.16 S, 0.632 S, 3.117 S, 5754.142 S. As the number of graphs increases, the computation time also increases, and the computation speed tends to decrease. This is due to the reason that the data are to be written to the text file after the result. It can be seen that the algorithm can obtain the dyeing results in a relatively short time.
Through comprehensive experimental tests, it can be seen that the operation speed of the dyeing algorithm based on MOO is faster than that of the traditional method, and it can complete the test results that cannot be obtained manually in a short time. The algorithm can be used to obtain a large amount of research data. Of course, there may be some uncertain factors, such as the instability of the use environment, the difference of operators, and the use time and frequency. The results of this experiment are not completely accurate and reliable and have certain differences.
6. Conclusions
With the continuous upgrading of computer computing, people have higher requirements for the efficiency and accuracy of obtaining data. The development of the field of graph coloring problems is inseparable from the contribution of scientific computing. MOO methods have been widely used in many fields because of their multiconstraint advantages. This article first gives a general introduction to graph coloring and genetic algorithm, so that people can understand their functions and principles. It then analyzes their function using the relevant principle formulas. In the end, it was found that both have great advantages in function. In the experimental part, this paper tests the uniform dyeing algorithm based on MOO. The conclusion is that the algorithm can reduce labor and time consumption while performing uniform full dyeing. Compared with traditional dyeing methods, it is more practical and efficient. The dyeing algorithm proposed in this study based on MOO thinking provides a reference for solving the full dyeing problem with multiple conditions and has certain progress significance. However, the test conditions of this study are limited, and the multicondition constraint graph coloring problem will be more complicated in reality. This application of combining the MOO idea with the graph coloring algorithm will be more valuable and more difficult.
Data Availability
The data used to support the findings of this study are available from the author upon request.
Conflicts of Interest
The author declares no conflicts of interest.
Acknowledgments
This research study was sponsored by Science and Technology Research Project of Colleges and Universities in Inner Mongolia Autonomous Region (nos. NJZY22599 and NJZY22600). The authors thank the project for supporting this article.