Improved Multi-Strategy Matrix Particle Swarm Optimization for DNA Sequence Design

: The efficiency of DNA computation is closely related to the design of DNA coding sequences. For the purpose of obtaining superior DNA coding sequences, it is necessary to choose suitable DNA constraints to prevent potential conflicting interactions in different DNA sequences and to ensure the reliability of DNA sequences. An improved matrix particle swarm optimization algorithm, referred to as IMPSO, is proposed in this paper to optimize DNA sequence design. In addition, this paper incorporates centroid opposition-based learning to fully preserve population diversity and develops and adapts a dynamic update on the basis of signal-to-noise ratio distance to search for high-quality solutions in a sufficiently intelligent manner. The results show that the proposal of this paper achieves satisfactory results and can obtain higher computational efficiency.


Introduction
DNA is a macromolecular polymer composed of deoxyribonucleotides, which are composed of deoxyribose, phosphate and bases including adenine (A), guanine (G), thymine (T) and cytosine (C).In 1953, after experimentational analysis, Watson and Crick proposed a molecular model of the double-helix structure of DNA [1] and first proposed the principle of base complementary pairing, in which the bases of the nucleotide residues in a nucleic acid molecule are linked to each other by hydrogen bonds in the correspondence between A and T and G and C.That is to say four possible base pairs for the  = ,  = ,  ≡  and  ≡ .A and T form two hydrogen bonds between; G and C constitute the three hydrogen bonds between.In 1994, Turing Award-winner Adleman [2] proposed a simple problem computation using the principle of the base complementary pairing of DNA, thus inaugurating DNA computing.DNA computing then continued to evolve toward generalization.In 2006, Winfree [3] proposed the DNA strand replacement reaction, which was a new way to construct logic circuits.In addition to circuit computing, DNA computing can be combined with a variety of intelligent computing methods, such as neural network chaotic systems, and used in different fields.
According to the biological composition of DNA, DNA can be considered a long string of four symbols, they are A, G, C and T. Through the alphabet of ∑ = {, , , }, two binary numbers or one quadratic number can be used to encode DNA to store information.In 2012, Church [4] led the first team to store a book of 659 kb in DNA, demonstrating the storage capacity of DNA.In 2016, Extance [5] showed that 1 g of DNA can hold the contents of 100 billion DVDs and that 1 kg of DNA can even hold all the information data in the world.In the same year, Zhirnov et al. [6] found that DNA information storage density is 10 million terabytes per cubic centimeter and that even simple E. coli have a storage density of about 1019 bits per cubic centimeter, further validating the powerful storage capacity of DNA.In addition, due to the inherent parallel mechanism of DNA, i.e., the phenomenon that the leading strand and the trailing strand are replicated simultaneously, DNA computation can be performed simultaneously on many DNA strands, which greatly enhances the speed of DNA computation.
DNA coding sequence design is a key step in DNA computation, which realizes the computation and transformation of data stored in it through specific reactions between DNA molecules.The rationality of DNA coding is directly related to whether the model can be successfully validated by biochemical experimentations and the accuracy of DNA computation.However, DNA encoding needs to satisfy molecular biology constraints, including physical constraints such as GC content constraints and thermodynamic constraints such as melting temperature (Tm).
Efficient DNA computation cannot be carried out without excellent DNA coding.Optimal DNA coding can be obtained by optimal coding algorithms, but the cost required for optimal coding may not be satisfied in a large problem space.Therefore, in order to provide efficient and suitable DNA coding in acceptable computational time and space, heuristic algorithms are widely applied to the design of DNA sequences in recent years as a shortcut algorithm.Zhu et al. [7] proposed an IBPSO algorithm to solve the DNA sequence design problem, as well as further improving the quality of DNA sequences.Chaves-González et al. [8] fused artificial bee colony algorithms to propose a new evolutionary approach to create a DNA sequence on the strength of multi-objective swarm intelligence to automatically generate reliable DNA strands that can be applied to molecular computing.Yang et al. [9] improved the spatial dispersion in the traditional IWO algorithm and used the IWO algorithm and the niche crowding in the algorithm to solve the DNA sequence design problem.Zhang et al. [10] used an improved taboo search algorithm for improving the means for the systematic design of equal-length DNA strands, which conduces the discovery of a range of good DNA sequences that satisfy the required certain combinatorial and thermodynamic constraints.Cervantes-Salido et al. [11] proposed a multi-objective evolutionary algorithm for designing a DNA sequence, taking advantage of a matrix-based GA along with specific genetic operators to improve the performance for DNA sequence optimization compared to previous methods.Chaves-González et al. [12] proposed an adapted multi-objective version of the differential evolution (DE) metaheuristics approach incorporating a multi-objective standard fast non-dominated sorting genetic algorithm to produce high-quality DNA sequences.Vega-Rodríguez et al. [13] made several rectifications in the noted fast non-dominated sorting genetic algorithm in conjunction with a novel multi-objective algorithm in accordance with the behavior of fireflies and proposed a new DNA sequence design method based on multiobjective firefly algorithm for generating reliable DNA sequences for molecular computing.The metaheuristic algorithm as a general heuristic algorithm can greatly reduce the number of attempts in a limited searching space, can achieve the problem solution rapidly and is heavily applied to generate reliable DNA coding sequences by virtue of its high efficiency.However, metaheuristic algorithms, as a product of combining random algorithms with local search algorithms, are susceptible to randomness or fall into a local optimum due to premature search and do not necessarily guarantee the feasibility and reliability of the resulting DNA sequences.In recent years, in order to improve the metaheuristic algorithm, which is prone to being caught in a local optimality, many scholars have done a lot of corresponding research and proposed various improved metaheuristic algorithms, among which the particle swarm algorithm is a theoretically mature and widely used emerging metaheuristic algorithm to find the optimal solution through collaboration and information-sharing among individuals in the population.
Particle swarm optimization [14] (PSO) is a method to seek out the global optimum by following the current searched optimum based on the observation of the regular behavior of the flock activity.This algorithm has appealed to the academics with the strong points of easy implementation, high-accuracy and fast convergence and has shown advantages in solving practical problems.However, if the parameters are not chosen reasonably, the particles may miss the optimal solution and subsequently appear to be non-converging.Even if all particles move in the direction of convergence, homogenization can occur.Due to the loss of the diversity of the population in the search space, premature convergence, poor local search ability, etc., can occur, leading to a lack of further improvement in accuracy as well as falling into a local optimum.In specific problems, the PSO needs to be analyzed and improved in order to achieve better results.Houssein et al. [15] experimentally demonstrated that the PSO algorithm suffers from premature convergence, being trapped in a local optimum and poor performance in multi-objective optimization.Ghatasheh et al. [16] used innovative optimization paradigms to improve the prediction power of bankruptcy modeling to generate prediction models.Zhang et al. [17] proposed a new vector co-evolutionary particle swarm optimization algorithm (VCPSO) to enhance population diversity and avoid premature convergence, but it suffers from falling into local optima or inefficient execution.The multi-objective particle swarm optimization algorithm (MOPSO) proposed by Coello et al. [18] has good search performance but only focuses on the generation of non-dominated vectors and maintaining population diversity, without considering the constraint functions.The region-based selection algorithm (PESA-II) in evolutionary multi-objective optimization proposed by Corne et al. [19] shows outstanding performance in region-based selection multi-objective algorithms but does not deal with runtime complexity.Eberhart et al. [20] used a dynamic neighborhood particle swarm optimization approach to solve multi-objective optimization problems, which is easy to implement and requires few parameters to be tuned but only deals with unconstrained multi-objective optimization problems.Deb et al. [21] developed a fast and elitist multi-objective genetic algorithm (NSGA-II) based on multi-objective evolutionary algorithm (MOEA), which is able to find better solution diffusion and better convergence for most of the problems but NSGA-II algorithm uses the no-penalty parameter constraint processing method, which has some limitations.
In this study, an improved multi-strategy matrix particle swarm-based optimization algorithm, referred to as IMPSO, is proposed.Compared with the previous matrix particle swarm algorithm, the running time under the same conditions is significantly reduced and the values of the constraints on the DNA sequences are well maintained.In addition, centroid opposition-based learning strategy is incorporated to preserve population diversity and to obtain global and sufficient results; at the same time, this strategy is used to reinitialize the population when the iteration numbers is a multiple of 100 to prevent the algorithm falling into the local optimal solution, while a dynamic update in accordance with signal-to-noise ratio distance is developed and adapted to search for high-quality solutions in a sufficiently intelligent manner and enable every individual to search for the best position within its own near neighborhood.The application of these two strategies puts the global optimal solution into effect.What is more, suitable DNA constraints are chosen to avoid potential conflicting interactions between DNA molecules to prevent the generation of secondary structures, to control non-specific hybridization and to ensure the reliability of DNA sequences.To verify the feasibility of the IMPSO algorithm, the DNA sequences, the values of each constraint and their running times obtained from the optimization of IMPSO with MPSO [22], IWO [23], PSO [24] and HS [25] were compared.MPSO continues the search processes by introducing the speed and position update mechanism of the global best particle, effectively ensuring the convergence.IWO is a simple but effective algorithm employed for finding a solution for an engineering problem.PSO is a typical SI that reproduces the new population by learning from personal and global guidance information.HS is a optimization algorithm to solve TSP and a specific academic optimization problem, etc., by mimicking the improvisation of music players.To show the competitiveness of the IMPSO algorithm in solving the DNA sequence design problem, this paper compares the experimentational DNA sequence design results of IMPSO with those of NCIWO, HSWOA [26], MO-ABC, CPSO [27] and DMEA [28].NCIWO and MO-ABC are mentioned above when introducing particle swarm optimization.HSWOA [26] is used to design DNA sequences that meet the new combination constraint.CPSO [27] is used to solve precocious phenomena and the local optimum of PSO by chaotic mapping.DMEA [28] is proposed to solve the DNA sequences design and to mitigate an NP-hard problem.With the same number of iterations, the experimental results show that the scheme is more competitive and has higher computational efficiency in solving the DNA sequence design problem.The main contributions of this study are as follows: (1) The matrix particle swarm optimization is introduced to improve the efficiency of the traditional PSO.(2) On the basis of the centroid opposition-based learning strategy , the influence of the optimal and worst position is considered to make the position update more reasonable.
(3) The concept of signal-to-noise ratio distance is led into, and a formula conforming to the internal state of the population is designed.(4) During DNA sequence optimization design experimentation, the rationality and effectiveness of IMPSO are verified by comparing with the variations of various algorithms.
The rest of the paper is arranged in the following way.Section 2 presents the constraints associated with designing DNA coding sequences.Section 3 describes the strategy along with the algorithm flow of the IMPSO.Section 4 introduces the comparison and analysis of the IMPSO algorithm with other optimization algorithms for DNA sequence design.Section 5 outlines the conclusions of this paper and indicates the next steps.

Constraints Formulation for DNA Sequence Design
Reliable DNA sequence design is a two-dimensional discrete optimization problem, and the relevant constraints can be partitioned into two categories, one is the combination of constraints including continuity, hairpin, H-measure and similarity, aiming to improve the specificity of DNA molecule recognition, and the other is thermodynamic constraints, mainly including melting temperature (Tm) and free energy, aiming to ensure the consistency of the physicochemical properties of DNA molecules.
This section describes in detail the constraints associated with designing DNA sequences.In the following constraint equation, S stands for the DNA sequence set; u and v, respectively, represent two certain DNA sequences selected from the DNA sequence set S;  is the DNA sequences number contained in DNA sequence set S, and  is the number of bases contained in a given DNA sequence in S. (,   ) is a threshold function that returns a when the value is  >   , and 0 otherwise.If u and v are complementary, the function (, ) returns 1; otherwise, the result of the equation is 0.

Continuity
Continuity is the amount of contiguous identical bases (A,C,G,T) in a given single strand of DNA.Too large a continuity value in the DNA sequence makes the DNA sequence easily twisted and folded in the hybridization process, thus creating a secondary structure that is not conducive to DNA computation.Assuming the continuity threshold is 3, for the DNA sequence CAATGCGTTAGCCCCGATCTTAC, it reaches the continuity threshold, after which the sequence will use the continuity function to calculate its continuity value, and other sequences that do not trigger the threshold will be considered discontinuous.The formula to calculate the continuity of a certain DNA strand is as shown below [12].
∈ {, , , }; CT is the threshold value; (, ) is a count of the number of contiguous bases in DNA above a threshold; if  > , then return A; otherwise, return 0.   (, ) returns the number of consecutive bases of sequence u.

Hairpin
During the process of DNA sequence self-hybridization, the overlapping part of the sequence will fold and the corresponding bases will complementarily pair, and the pairing forms a secondary structure called a hairpin structure.The hairpin structure consists of a hair stem and a hair loop.If the hairpin structure is present in the DNA sequence, it will undergo self-folding in the biochemical reaction.For avoiding self-hybridization in DNA sequences, making the hairpin structure in DNA sequences as small as possible is of great importance.There are two types of hairpin structures, hair stem and hair loop.  is the minimum hair loop length required for the hairpin structure;   is the minimum hairpin stem length required; l is the length of the hair loop; t is the length of the hair stem, and the formula to calculate a DNA hairpin is as shown below [12]. is the center of the hairpin structure.(, ) determines whether u and v are complementary; if u and v are complementary, the result is 1; otherwise, the result is 0.

H-Measure
In DNA sequences, H-Measure is adapted to count the Hamming distance, which indicates the number of different bases at the same position of two complementary DNA sequences.The likelihood of hybridization between complementary strands of the same DNA molecule is closely linked to the H-Measure, showing a positive correlation.With this constraint, non-specific hybridization between a DNA sequence and its complementary sequences can be controlled.H-Measure is calculated by the following formula [12].
where   ,   respectively represent two reverse parallel DNA sequences.H-Measure calculation consists of two parts: continuous and discontinuous calculations.

Similarity
In DNA calculations, similarity indicates how close two DNA sequences are to each other in terms of bases at the same position.Similarity takes into account the complementary Hamming distance after shifting in addition to the Hamming distance.The similarity value is the maximum value of the totality of the amount of bases with the same displacement and the amount of consecutive identical bases between sequences u and splicing sequence (−)  .The similarity is calculated as follows [12].(10) where ,  denotes two sequences in the DNA sequence set S. The similarity is calculated in two parts: the similarity of discontinuous sequences and the similarity of the largest continuous common subset.

GC Content [29]
GC content stands for the amount of guanines as well as cytosines in the DNA sequence as a percentage of the overall number of bases.GC content is directly related to the biochemical stability of DNA sequences because  ≡  base pairs contain three hydrogen bonds and release more heat energy when broken than  =  base pairs containing two hydrogen bonds, so GC content also influences the melting temperature of DNA sequences.For the DNA sequence ACGTCGTTCGTACGC, the GC content is 60% (9/15).The GC content (in percentage form) is calculated by the following formula.

Melting Temperature (Tm)
Melting temperature is the temperature required for half of the base pairs of a DNA double-stranded structure to be disrupted into a single-stranded structure.Melting temperature is an important thermodynamic constraint of DNA molecules that influences the reaction efficiency of DNA sequences, and a steady Tm allows for the better control of hybridization reactions between DNA molecules.The  ≡  base pair contains three hydrogen bonds and releases more thermal energy upon breaking than the  =  base pair containing two hydrogen bonds.Tm is usually calculated in accordance with the nearest-neighbor thermodynamic model [30], with the following relevant equation.
where  ° represents the enthalpy change from reactants to products, which is the total enthalpy of adjacent bases;  ° represents the entropy change from reactants to products, which is the total entropy of adjacent bases.R represents the gas constant (1.987 cal/kmol), and CT is the concentration of DNA molecules.

Fitness Function
The optimization problem of this paper belongs to the minimum optimization problem.The fitness function of the DNA sequence is determined by the constraint function described above and is the minimum of the above constraint functions, expressed by the following formula.

Basic Information of Matrix Particle Swarm
In order to describe the IMPSO algorithm more clearly, this section first introduces information about matrix particle swarm, some important formulas used by the algorithm and the operations between matrices.

Representation Information
Assume there exists a N individuals population to solve the D-dimensional problem.This population is represented by a matrix X of size  × , defined as follows.
where   represents the individual i and dimension j.
To accommodate the matrix-based representation, the upper bound of the variables is represented by a matrix XB of size 1 × , the lower bound of the variables is represented by a matrix XM of size 1 ×  , and the fitness values of every individual are represented by a matrix Fit of size  × 1.The matrix Ones is an all-1 matrix, and the matrix R is a matrix consisting of random numbers of [0, 1].

Common Matrix Operations
Table 1 lists the relevant matrix operations used in this paper and shows their corresponding descriptions.For convenience of description, the size of matrices A and B defaults to  ×  if not specifically mentioned.
Table 1.Typical operations in matrix and their notations [22].
× =  × × ( − ) •  × +  × ×  (20) After the initialization of matrices X and V is completed, IMPSO obtains the fitness values of all individuals, represented by a matrix Fit of size  × 1, according to the following equation.

𝒈𝑩𝒆𝒔𝒕_𝑭𝒊𝒕 = { 𝐦𝐢𝐧 (𝑭𝒊𝒕), 𝒊𝒇 𝒊𝒕 𝒊𝒔 𝒂 𝒎𝒊𝒏𝒊𝒎𝒖𝒎 𝒑𝒓𝒐𝒃𝒍𝒆𝒎 𝐦𝐚𝐱 (𝑭𝒊𝒕), Furthermore, the optimization problem considered in this experimentation is the minimum value problem; IMPSO can use minind() formula in Table 1 to obtain the corresponding number of rows for individuals with the best pBest fitness value, as follows.

Velocity and Position Update
In the process of IMPSO iterations, the population continuously performs velocity update as well as position updates from generation to generation in order to get as close as possible to the global optimum, and the equations for velocity and position updates are shown below.
It is worth noting that the matrix gBest of size 1 ×  is actually the individual with the best fitness value in the matrix pBest of  × , which is the index row corresponding to pBest.The  ×  matrix X extended from the 1 ×  matrix gBest can be obtained by the following matrix multiplication formula, which shows that the value of each row of the matrix X is equal to the value of gBest.
In order to avoid the elements of matrices V and X to exceed the space boundary, the boundary should be detected and processed once the matrix V or X is updated.The specific method can be implemented by logical operations and Hadamard products.For a more visual description, IMPSO is illustrated with the matrix X as an example, where XB is the upper boundary, and the detection and processing of the upper boundary can be based on the following equation.
where the 1 ×  matrix XB is first expanded into an  ×  matrix with each row equal to XB.Further, it is then compared with the  ×  matrix X.If the elements of the matrix X at the corresponding position are greater than the value of the upper boundary, the corresponding element position of the  ×  matrix LOGIC is set to 1, and otherwise 0. With reference to this approach, the processing of the upper boundary can be implemented with the following equation.
The result of the operation is the element of matrix X that is greater than the upper bound is set to the value of the upper bound.More specifically, the element of the matrix X that is greater than the upper bound is set to 1 at the corresponding position in the matrix LOGIC, and thus the element of the matrix X needs to be set to the value of the upper bound.Conversely, if an element of the matrix LOGIC is 0, it means that the element in the corresponding position of the matrix X does not exceed the upper bound, then the element of the matrix X in the corresponding position of that element does not need to be changed either.The elements of the matrix X that are smaller than the lower bound also need to be set to the value of the lower bound by a similar operation, which is not repeated here.
The next subsection describes in detail the two strategies used by the IMPSO algorithm to improve the population best fitness value, wherein the signal-to-noise distance is used to further update population best position on top of the basic update population position, and improved centroid opposition-based learning strategy is used to reinitialize population-related variables when the number of iterations is a multiple of 100 to exclude the influence of extreme values on the best fitness value, making the center of gravity of the population more representative.

Improved Opposition-Based Learning to Reinitialize the Population-Related Parameters
Opposition-based learning is a computational intelligence scheme proposed by Tizhoosh [31] in 2005, which has been successfully applied to a variety of populationbased evolutionary algorithms.Traditional learning strategies are essentially based on randomness, and once the worst-case scenario occurs, the search or optimization becomes unmanageable and the results take a lot of time to converge.The main idea of OBL is to consider both the points in the current space and their opposites and to select them meritedly with a view to obtaining results closer to the global optimum.In order to fully explore the current space and to make full use of the favorable information carried by the population as a merit-seeking whole, the COBL centroid opposition-based learning proposed by Rahnamayan et al. [32] was introduced on the basis of OBL.

Theorem 1. The opposite point.
Suppose there exists a number x in [l, u], then the opposite point of x is defined as Extending the definition of the opposite point to the D-dimension space, let  = ( 1 ,  2 , … ,   ) be a point in the D-dimension space, where   ∈ [  ,   ],  = 1,2, … , , then its opposite point is defined as where   ′ =   +   −   .

Theorem 2. Center of gravity. (𝑋1, … , 𝑋𝑛) is a group of n points with unit mass distributed in D-dimension space, and the center of gravity of the group is defined as
It can also be expressed as.
Theorem 3. Center of gravity of the opposite point.
If the location of the center of gravity of a discrete uniform whole is M, then the opposite point of a point   in the group is defined as The opposite point is located in a search space with dynamic boundary, denoted  , ∈ [  ,   ].The dynamic boundary allows the search space to shrink continuously, which is calculated as where   is the lower boundary of the search space, and   is the upper boundary of the search space.
If the opposite point is outside the search boundary, the opposite point can be recalculated according to the following formula.

{
+ (, ) × (  −   ),   , <     + (, ) × (  −   ),   , >   (37) From the above, it is clear that the center-of-gravity position is chosen from the information of the average position of the population.In real life, people calculate the average value by removing the maximum and minimum values, so as to get rid of the influence of extreme values.In this paper, the center-of-gravity position is also calculated by subtracting the optimal position and the worst position to make the center-of-gravity position more representative.Using it for the initialization of the population will produce individuals that will be spread throughout the space, which is well prepared for the subsequent search for the best.

Signal-to-Noise Ratio Distance for Further Update the Position
In the field of computer artificial intelligence, distance is a frequent and fundamental concept that has important applications in subfields such as natural language processing and computer vision.The concept of distance originates from the concepts of metrics and measurement in the field of mathematics.Distance is used in the computer field to represent the similarity between data; the greater the distance, the greater the degree of difference between the data.Common distance algorithms are Euclidean distance, Mahalanobis distance, Minkowski distance, etc.Among them, Euclidean distance is the most common representation of the distance between two or more points, but as the number of dimensions increases, the computation of the Euclidean distance increases substantially, which greatly increases the time overhead, and the difference between any two points in the space becomes weaker, leading to a uniform distribution of the data [33].Hassanat et al. [34] uses the Euclidean norms and greedy algorithm to find the furthest pair of points (diameter) of a set of points in d-dimensional Euclidean feature space.On the other hand, the Euclidean distance treats the differences between the various dimensions of points in a space as equivalent, which sometimes does not satisfy the practical requirements.The Mahalanobis distance is a representation of the covariance distance of the data, and the Minkowski distance is a generalization of the Euclidean distance.In other words, the Minkowski distance can be expressed by a generalized formulation of several distance metric formulas, which can be degraded to Manhattan distance or Euclidean distance depending on the parameters, and the Chebyshev distance is the form in which the Minkowski distance takes its limit.Gueorguieva et al. [35] proposed an optimized fuzzy C-means clustering algorithm to improve the FCM clustering results by combining Mahalanobis distances and Minkowski distance metrics.Yang et al. [36] introduced signal-to-noise distance to measure the degree of difference between data, which can produce more discriminative features than the distance metric based on Euclidean distance [37], and the SNR distances of a pair of data   and   are defined as  denotes the mean of x, and n denotes the dimension of x.The larger the SNR distance, the greater the degree of variance between the anchored and compared data.
Therefore, a new update mechanism that uses signal-to-noise ratio distance to determine the distance information between individuals and the optimal position was proposed in this paper.Through this distance, the worst position can be moved away from.The specific design formula is as follows. = (  () − ())/(()) (39) In the formula,   () denotes the position of the i-th individual in the tth generation, () denotes the best position in the tth generation, and () denotes the worst position in the tth generation.It can be seen that d determines the magnitude of individual search; the smaller d is, the smaller the distance of individual   () away from the worst position.On the contrary, the larger d is, the larger the distance is.By adjusting individual position in this dynamic update, high-quality solutions can be searched adequately.The intelligence of the search is enhanced.

IMPSO Algorithm Process
Input: The size of population PopSize, the dimension of the problem PerLen, the parameters ，c1，c2, maximal generation max_iterations.
Step 1. Initialize the matrices X and V according to Equations ( 19) and ( 20), control the elements of the matrix X no greater than XB and no less than XM; the elements of the matrix V no greater than VB and no less than VM.
Step 2. The fitness value of each individual of the matrix X, represented by the matrix Fit, is obtained from the Equation ( 21) in terms of individuals within the population.
Step 3. Update the best solution in terms of dimensions and select the individual with the best adaptation value for each dimension, i.e., each column, to form a matrix gBest of size  × 1.
Step 4. The best fitness value gBest_Fit is updated by the element with the best fitness value from the fitness value matrix Fit.
Step 5. Update the best position of an individual, specifically by using the matrix X representing the position of the individual to obtain the personal best position matrix pBest.
Step 6. Update the matrix pBest_Fit, which represents the fitness values of the personal best positions with the matrix Fit representing the fitness values of all the individuals in the population.
Step 7. Perform max_iterations iterations for the following operations.
Step 9. Using matrix V as reference, if the element in matrix V is greater than VB, set the element in the corresponding position in matrix LOGIC to 1; otherwise, set it to 0.
Step 10.Using the matrix LOGIC, the elements of the matrix V greater than VB are set to VB; otherwise, they remain unchanged.
Step 11.Using matrix V as reference, if the element in matrix V is smaller than VM, set the element in the corresponding position in matrix LOGIC to 1; otherwise, set it to 0.
Step 12. Using the matrix LOGIC, the elements of the matrix V smaller than VM are set to VM; otherwise, they remain unchanged.
Step 13.The personal position matrix X is updated with the matrix X and the latest obtained matrix V according to Equation (27).
Step 14.Using matrix X as reference, if the element in matrix X is greater than XB, set the element in the corresponding position in matrix LOGIC to 1; otherwise, set it to 0.
Step 15.Using the matrix LOGIC, the elements of the matrix X greater than XB are set to XB; otherwise, they remain unchanged.
Step 16.Using matrix X as reference, if the element in matrix X is smaller than XM, set the element in the corresponding position in matrix LOGIC to 1; otherwise, set it to 0.
Step 17.Using the matrix LOGIC, the elements of the matrix X smaller than XM are set to XM; otherwise, they remain unchanged.
Step 18. Update the matrix Fit representing the fitness values of all the individuals with the latest obtained matrix X according to Equation (21).
Step 19.Update the matrix pBest and the matrix pBest_Fit.If the matrix pBest_Fit is larger than the corresponding value in the matrix Fit, the corresponding element in the matrix LOGIC is set to 1; otherwise, it is set to 0.
Step 20.If the matrix pBest_Fit is smaller than the corresponding value in the matrix Fit, it means that the updated personal position matrix is not as good as the previous personal position matrix, so the matrix pBest that represents the personal best positions of all the individuals in the population does not need to be updated.Conversely, it means that the latest personal position matrix is better than the previous individual matrix, because the personal best fitness value is optimized, so it needs to be updated to the latest personal position matrix X.
Step 21.The matrix Fit corresponds to the personal best fitness values of the population matrix X.The matrix pBest_Fit corresponds to the matrix pBest, and the best personal fitness values matrix is updated based on the personal best position matrix by comparing the previous equation.
Step 22.Using Equations ( 38)-(40) to further update the position of the population particles.
Step 23.Individuals with the best fitness values are selected in terms of dimensions, and the corresponding elements are assigned to the matrix gBest according to the obtained individuals and dimensions in the matrix pBest.
Step 24.The element with the best fitness value is selected in the personal best fitness value matrix pBest, which is the best solution fitness value.
Step 25.When the number of iterations is a multiple of 100, the population-related variables are reinitialized using Equations ( 31)- (37).Exit the loop at the end of the iteration count; otherwise, go back to step8 to continue the iterations.
Output: The found best solution fitness gBest_Fit.
The matrix pBest represents the best personal positions of all the individuals in the IMPSO population.pBest_Fit is a matrix that selects the element with the best fitness value in all dimensions in terms of individuals, with a matrix size of  × 1. gBest is a matrix that finds the corresponding row number of the best personal fitness value matrix pBest_Fit, i.e., the individual with the best personal fitness value, in terms of dimensions, to achieve the goal of finding the individual with the best fitness value for each dimension, and the matrix size is 1 × .gBest_Fit is the matrix with the best fitness value in the personal best fitness value matrix pBest_Fit.

Flowchart Based on IMPSO Algorithm to Optimize DNA Sequence
To solve the problem of excessive time consumption and low quality in DNA sequence design optimization problems, this study proposes a multi-strategy matrix particle swarm and introduces an efficient matrix particle swarm to reduce the time consumption of the algorithm, then introduces novel centroid opposition-based learning to initialize the population during the optimization search to avoid the population falling into local states and finally introduces a signal-to-noise ratio to judge the distance between individuals for updates with high quality.The efficiency and reliability of DNA computing are inseparable from the design of the DNA chain.In order to design more excellent DNA sequences, it can be effective to combine the objective function and the constraints of the DNA chain.Before applying the objective function for calculation, the population particles are coded by dividing them by four, so that the matrix particle swarm can be coded with the four bases (A, C, G, T) of DNA.The specific algorithm flowchart is shown as Figure 1.
Initialize the population matrix representing the location of individuals using Equation (19) Update the position and velocity of the Matrix Particle Swarm using Equations.(26

Algorithm Parameters
In this section, IMPSO is applied to DNA sequence design experimentation to demonstrate the high efficiency of the IMPSO in solving the DNA coding sequence design problem.All experiments were carried out on a computer with Intel (R) Core (TM) i5-10200H (2.40 Ghz) CPU, 16 GB RAM, 64-bit OS, and MATLAB R2020b simulation platform.In this experiment, the DNA molecule concentration is set to 10 nm, the salt solution concentration in the experimentation is set to 1 mol/L, the minimum values of the hair stem and hair loop were set to 6, and in the experiment on similarity and H-Measure, the penalty threshold for base continuity equality is set to 6, and, for discontinuity, it is set to 0.17.The continuity threshold for a single DNA strand is set to 2. The other parameters used in this study are described in Table 2. To verify the feasibility of the IMPSO algorithm, the DNA sequences, the values of each constraint and their running times obtained from the optimization of IMPSO with MPSO, IWO, PSO and HS were compared.The results in Table 3 show that the IWO, PSO and HS algorithms take a long time to solve the DNA sequence design problem, all above 20,000 s, and IWO even takes more than 35,000 s.The performance of MPSO shows that the running time of the swarm intelligence algorithm based on matrix operations is significantly reduced under the same conditions and that the values of each constraint of the DNA sequence do not become worse.The IMPSO algorithm requires more than two times more time compared to MPSO, which is due to the time required to add the improvement strategy.Although the time consumed increases, all the metrics of the DNA sequences obtained by IMPSO are better than those of MPSO, so the extra time consumption is worthwhile to obtain higher computational efficiency.For demonstrating the competitiveness of IMPSO to solve DNA sequence design, this paper compares the experimentational DNA sequence design results of IMPSO with those of NCIWO, HSWOA, MO-ABC, CPSO and DMEA by comparing the average values of continuity, hairpin, H-Measure, similarity and the variance of Tm to assess sequence quality.Among these metrics, H-Measure and similarity are beneficial in preventing DNA strands from mismatching, and hairpin and continuity are beneficial in avoiding secondary structures in DNA strands.To ensure the fairness of the experimentations, parameters in the mentioned algorithm are set in accordance with their relevant references, and population size and iterations numbers were kept consistent。

Comparisons and Analysis
Controlling continuity and hairpin structure in DNA sequences can prevent self-hybridization in DNA molecules to produce secondary structures and to ensure the reliability of DNA calculations.By constraining similarity and H-Measure, non-specific hybridization between a DNA sequence and its complementary sequences can be controlled.Melting temperature and free energy are important thermodynamic constraints of DNA molecules, and maintaining their stability is conducive to control the hybridization reaction between DNA molecules and to improve the reaction efficiency of DNA sequences.

Control Secondary Structures
From the results in Table 4 and Figure 2, it can be seen that the continuity and hairpin of IMPSO and HSWOA are 0; however, the continuity or hairpin structures of NCIWO, MO-ABC, CPSO and DMEA exceed 0. This indicates that the DNA sequences created by IMPSO

Control Nonspecific Hybridization
From Table 4 and Figure 3, H-Measure and similarity values of IMPSO are more desirable than other algorithms, only second to MO-ABC, due to their priority to the constraints set of H-Measure and similarity at the expense of continuity and hairpin structure, so the sequences of IMPSO are overall superior to those of MO-ABC.

Thermodynamics of Tm
In DNA calculation, DNA sequences need to be as consistent as possible in terms of Tm to dominate biochemical reactions.In this experiment, the variance was used to measure the fluctuation of the Tm of the DNA sequences generated by each algorithm.From Table 4 and Figure 4, the variance of Tm of IMPSO is superior to MO-ABC and DMEA and slightly inferior to CPSO, HSWOA and NCIWO.

Conclusions
To preferably solving the problem of DNA sequence optimization design, an improved multi-strategy matrix particle swarm optimization algorithm is proposed in this paper, which uses an approach in accordance with the signal-to-noise ratio distance to dynamically update the optimal and worst positions of individuals within the population and can adequately search for high-quality solutions.The centroid opposition-based learning strategy is introduced to improve the search range of the algorithm and to exclude the extreme differences brought by the optimal and worst positions when calculating the center-of-gravity positions, so that the center-of-gravity positions are more representative.The individuals generated in the initialization of the population of matrix particles can be spread over the whole space, making full use of the favorable information carried by the population as a whole in the search for the global best, avoiding the premature convergence of the population into a local optimum and fully preparing for the subsequent search for the global optimum.Finally, matrix operations are used to greatly reduce the algorithm running time and to obtain higher computational efficiency without sacrificing the DNA constraint values.Experiments comparing with other particle swarm algorithms confirm that, excluding the MPSO algorithm, the runtime of the swarm intelligence algorithm based on matrix operations is significantly reduced under the same conditions, that various constraint values of DNA sequences do not become worse compared with other algorithms and that the comprehensive capability and reliability of DNA computation are outstanding.The improved multi-strategy matrix particle swarm algorithm (IMPSO) does not underperform in terms of DNA constraint values compared with other DNA sequence design experiments, taking into account the global picture and obtaining optimized sequences of high quality, verifying the effectiveness of the algorithm and meeting the requirements for application to DNA computation.However, the individual capabilities under the combined capability, especially the melting temperature variance, need to be improved.By not sacrificing the DNA constraint values and making full use of the whole population diversity, the CPU running time will also be increased.How to find a breakthrough point to gradually improve the single-item capability without sacrificing any necessary constraint to achieve a more excellent DNA computation capability is also something that needs further consideration in future work.

Table 2 .
Related parameters in IMPSO algorithm.

Table 3 .
Comparison of DNA sequences and their constraint values and Cputime.
and HSWOA prevent secondary structures with advantage.