Simulated annealing (SA) may be seen as a modification of iterative improvement which allows the system to move uphill in a controlled manner. The SA method comes from the analogy made between the states of a physical system, e.g. a liquid, and the configurations of a system in a combinatorial optimization problem. If the temperature of the interacting molecules in a liquid is suddenly reduced below its freezing point, the result will be a disordered glassy state with an energy higher than the true crystalline ground state. In fact the molecules are in a local energy minimum. On the other hand, if the temperature of the liquid is reduced slowly (annealing), waiting for equilibrium to be reached before a new reduction is made, the liquid freezes to the solid state through a cooling process that leads to the crystalline state, which is the global energy minimum. In the analogy with the combinatorial optimization problem the parameters being varied are equated with atomic positions in the liquid and its energy is identified with the cost function being optimized. The temperature is then defined as a control parameter related to the probability that changes which make the state worst will be accepted. This ensures a more exhaustive search of the state space. In the algorithm, a change of state that decreases the energy is always accepted; if the energy increases, the change is accepted with a certain probability that depends on the temperature of the system, according to the rule $e^{-\Delta E/T}$. At a given temperature several exchanges are attempted; then the process is repeated after decreasing the temperature. The system is gradually cooled until it is stopped according to some criteria such as when the number of changes accepted is small and/or the reduction of the energy is not significant. The number of attempts made at a given temperature has to be large enough to obtain a good statistical set of trials. The algorithm may also take into account the number of successful attempts at each temperature to decide whether the state space has been properly searched, and the search may be finished for this temperature. The SA technique has been successfully applied to scheduling problems like the traveling salesman problem, spatial organization problems like the chip placement and several other problems (see [1,2]). However, SA suffers from one major drawback: It requires careful tuning of its control parameters to achieve good results.
Neural networks based on the Hopfield model (see [3]) have been used with success for solving different combinatorial problems. These networks are composed of many simple computing elements (or {\SIxii artificial neurons}) which cooperatively search the state space to find a local or global maximum or minimum.
Another family of algorithms with a possible broad range of applicability are genetic algorithms. Genetic algorithms (GA) were first introduced by J.H. Holland in the 60's, and have been successfully applied to the travelling salesman problem, pattern recognition, classifier systems, pipeline operations, scheduling, symbolic system evolution, and some other problems (see [4] for an extensive description and bibliography).
In a genetic algorithm the starting point is always a collection, known as population, of possible solutions generated at random. A suitable encoding of each solution in the population is used in order to compute its fitness. At each iteration a new population, or generation, is obtained by mating the best of the old solutions with one another. To create the next generation, new solutions are formed through reproduction, crossover and mutation. The solutions that will be considered for crossover are probabilistically selected according to the fitness values from the set that constitutes the current generation. This new population become the parent pool. Usually, a constant number of solutions are selected so that the maintained population is of fixed size. Crossover creates two new child solutions from two solutions sampled from the parent pool. In this way, fitter parents have a better chance of producing children. This is done for the whole population. Children solutions are obtained by interchanging random parts of their parents. Some randomness is also introduced through a mechanism called mutation to ensure that the algorithms avoid getting stuck at local minima. Mutation changes selected parts of a solution without keeping the original. The crossover and mutation operations are done with probabilites $p_{cros}$ and $p_{mut}$. This ensures that some solutions from the current generation will be kept in the new generation. Once a new generation is created, the fitness of all solutions is evaluated and the process is repeated. At each generation the best solution is recorded. The algorithm ends when the results stabilize or the optimal solution, when it can be identified, is reached.
In this paper we will discuss the applicability of genetic algorithms to some NP-complete problems that arise in Graph Theory. Other methods such as neural nets and simulated annealing have been previously considered for dealing with these problems (see [5]). For all of them genetic algorithms might be of interest. There follows a list of several of these problems:
$f(x)= n_c v_c + (M - n_e)v_e$
Where $n_c$ is the total number of crossings in solution $x$, $n_e$ is the number of edges from the original graph considered in this solution and $v_c$ and $v_e$ the values assigned repectively to a crossing and to an edge. The existence of a crossing between two upper edges (or two lower edges) is easy to determine from the single row representation used.Two edges $(i,j)$ and $(l,m)$ cross if $i < l < j < m$ or $l < i < m < j$. Figure~1 shows a run of the genetic algorithm for a random generated graph with 12 vertices and 28 edges. A population of 200 individuals was considered. Other parameters were set as follows: $p_{cross}=0.9$, $p_{mut}=0.3$, $v_c=1.1$ and $v_e=1$. Figure~2 shows the initial graph and Figure~3 shows the best planar subgraph found at generation 120. The same set of parameters with a population of 80 individuals was used for finding, at generation 38, the maximal planar subgraph with 20 edges which contradicts the result of [6].
Figure 1. Evolution of the average fitness and best generated solution.
Figure 2. The initial non planar graph.
Figure 3. A planar subgraph found at generation 120.
Figure 4. A set of chords and its circle graph.
Although the problem of finding a maximum independent set for arbitrary graphs is NP-complete [8], several polynomial time algorithms have been developed for finding a near-maximum independent set in a circle graph [9,10]. Neural nets have also been considered for this problem (see [11]).
As in the previous genetic algorithm , for this algorithm we code each possible solution by a list of $M$ elements ($M$ is the number of chords of the circle graph). Each position in the list corresponds to a chord of the original graph, and has values 1 or 0 according to whether or not the chord is considered for this solution. The algorithm follows the same steps as the previous one but uses a different cost function. In this case the cost function also depends on the chord length, and the fitness of a solution is evaluated according to the equation:
$\displaystyle f(x)= L-\sum_{present} l_i + \sum_{crossing} l_i$
Where $L$ is the sum of the length of all chords in the circle graph to be planarized and $l_i$ is the length of chord $i$. Figure~5 shows a run of the genetic algorithm for a circle graph with 10 vertices and 20 edges. A population of 200 individuals was considered. and the crossing and mutation probabilities were $p_{cross}=0.9$, $p_{mut}=0.3$. Figure~6 shows the best graphs found at generation 1. Figure~7 shows the best graphs found at generation 125.
Figure 5. Evolution of the average fitness and best generated solution (circle graph planarization).
Figure 6. Best graph at generation 1.
Figure 7. Best graph found at generation 125.
A modification of the algorithm based on [11] is useful for predicting the secondary structure of ribonucleic acids (RNA). The primary structure of RNA is determined by the sequence of organic bases. The folding of the chains into a two-dimensional shape determines the secondary structure. Non intersecting edges in a circle graph may be related with the base pairs for this folding. To generate a stable RNA structure here it is required to maximize the number of non intersecting edges or base pairs. The use of the RNA structure stability model from Tinoco et al. [12], enables the computation of the stability number of the resulting structures. This number is also used in the cost function. The modification was implemented and we were able to reproduce the result of Takefuji et al. [11] for the sequence of 38 bases used by them with their neural net. Work is still in progress for adapting the algorithm presented to process bigger sequences.
[2] E. Aarts and J. Korst, Simulated Annealing and Boltzmann Machines, John Wiley \& Sons, Chichester, 1989. ISBN 0-471-92146-7
[3] J.J. Hopfield and D.W. Tank, Neural computation of decisions in optimization problems, Biol. Cybernet., 52 (1985), 141-152.
[4] D. E. Goldberg, Genetic Algorithms in Search, Optimization, and Machine Learning, Addison-Wesley, 1989.
[5] R.H.J.M. Otten and L.P.P.P. van Ginneken, The Annealing Algorithm, Kluwer Academic Publishers, Boston, 1989. ISBN 0-7923-9022-9
[6] R. Jayakumar, K. Thulasiraman and M.N.S. Swamy, $O(n^2)$ algorithms for graph planarization, IEEE Trans. Computer-Aided Design, 8 (1989), 257-267.
[7] Y. Takefuji and K.C. Lee, A near-optimum parallel planarization algorithm, Science, 245 (1989), 1221-1223.
[8] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, New York, 1979. ISBN 0-7167-1044-7 & 0-7167-1045-5 pbk
[9] F. Gavril, Algorithms on circular-arc graphs, Networks, 16 (1986), 357-369.
[10] K. J. Supowit, Finding a maximum planar subset of a set of nets in a channel, IEEE Trans. Computer-Aided Design, 6 (1987), 93-94 .
[11] Y. Takefuji, L.L. Chen, K.C. Lee and J. Huffman, Parallel Algorithms for finding a near-maximum independent set of a circle graph, IEEE Trans. Neural Nets., 1(3) (1990), 263-267.
[12] I. Tinoco, O.C. Uhlenbeck and M.D. Levine, Estimation of secondary structure in ribonucleic acids, Nature, 230 (1971),362-367.