American Journal of Intelligent Systems
p-ISSN: 2165-8978 e-ISSN: 2165-8994
2011; 1(1): 1-9
doi:10.5923/j.ajis.20110101.01
M. V. Jahan1, S. M. S. Kenari2
1Software Engineering Department, Mashhad Branch, Islamic Azad University, Mashhad, Iran
2Software Engineering Department, Nowshahr Branch, Islamic Azad University, Mazandaran, Iran
Correspondence to: M. V. Jahan, Software Engineering Department, Mashhad Branch, Islamic Azad University, Mashhad, Iran.
| Email: | ![]() |
Copyright © 2012 Scientific & Academic Publishing. All Rights Reserved.
Nowadays, new optimization problems become so complicated that popular classic methods are unable to solve them in a reasonable time. By using heuristic and evolutionary algorithms, these problems can be solved more quickly. Cellular Automata (CA) and Spin Glasses (SG) are examples of such algorithms. A CA is a self-organized machine with a simple structure and complicated behavior. Due to local interactions between its cells, it has a high speed; however, it is unable to solve optimization problems. On the other hand, SGs, due to inter-spin magnetic interaction as well as following thermodynamic rules, continually have the tendency toward lower energy, and this way it can solve optimization problems. The interactions between spins are usually limited and consequently, aforementioned methods cannot solve optimization problems with an expected accuracy and this is a great impact. In this paper, with inspiration from behavior of CA and SG, a new machine named Spin Glass Automata (SGA) is introduced which has behavioral dynamic of SG and CA. It has also the ability of parallel processing while it is rapid enough. It follows rules of a CA too. With these properties at hand, the machine can be used in a vast area of optimization problems. Behavioral dynamic tests of the machine include phase transition, entropy and correlation as well as the comparison to other heuristic algorithms such as (GA, TS, SA and NN) shows the ability of this machine in solving practical optimization problems. It has an appropriate execution speed and accuracy. To test full potential of this machine, the NP problem such as optimal portfolio selection has been solved and compared with the five famous stock market of the world.
Keywords: Spin Glass Model, Portfolio Selection, Cellular Automata, Phase Transition and Parallel Processing
Cite this paper: M. V. Jahan, S. M. S. Kenari, Spin Glass Automata (SGA): An Evolutionary Local Search Automata for Solving Optimization Problems, American Journal of Intelligent Systems, Vol. 1 No. 1, 2011, pp. 1-9. doi: 10.5923/j.ajis.20110101.01.
is transition rule or rule briefly. At each time, the value of cell S can be reached through applying rule f on the adjacent set N[2]. If all cells of the CA include a same rule, it is called homogenous CA and is called heterogeneous otherwise[2,6]. If boundary cells (first and last cells) are neighbors, the cellular automata is called CA with circular boundary and non-circular otherwise [2,6].![]() | (1) |
is the energy of all spins, The sum
,
runs over all pairs of nearest neighbors,
is the number of nearest neighbors of each spin
that can be
in Van Neumann cellular automata (CA) or
in Moore CA [16] or
for full connection.
denotes the strength of the bond connecting spins
and
.
describes a ferromagnetic interaction, while
describes an anti-ferromagnetic interaction. The quantity
is the external field acting on spin
and describes the energy due to the spin's orientation. Also, the factor
corrects for double counting of the interaction between every two neighboring spins. Here the task is to find a spin configuration
that minimizes the energy of the spin glass, given {
}, {
}. A scheme for a 2D spin glass is depicted in Figure 1.
such that Z is a 2D network where each spin (cell) can interact with adjacent ones based on Van Neumann or Moore models (short range spin glass);
is the value of each spin can take between[0,1]; Each spin has an interaction (bond) with its nearest neighbor; A strength of the bond
exists between each pair neighbor spins; The quantity
is the external field acting on spin
and describes the energy due to the spin’s orientation; The rule is the interaction rule between nearest neighbors which can be any defined rules for the Automata (It is the same as CA rules). This rule defines the type of interactivity; and
is Hamiltonian function of interaction or energy function for the whole automata. It usually constitutes of interactions between composer parts of the system and is calculated based on the problem type[8], and finally, it is calculated similar to Hamiltonian rule of SG.In SGA, the subsequent state of a spin is related to current states of the spin and its nearest neighbors and is specified based on rule
. Since SGA is moving through losing energy
, the amount of spins' interaction energy
and external field energy
, together prevent spins to take any value
, i.e. only change which can cause any decrease in SGA's energy will be accepted.When the SGA starts, by using rule f and interactions with its neighbors, each spin tries to decrease its energy (changes its value) according to function H. if the change in value results in local energy decrease, the change will be accepted and with probability of
otherwise; where k is Boltzmann's constant and T is the environment temperature. Experiments show that in spite of local energy reduction, global decrease is also observed in the machine. Therefore the machine is useful in optimization problem solving.Using SG properties, the aforementioned SGA can follow thermodynamic rules and goes through equilibrium in any temperatures. Also through using CA capabilities, it can use any rule of it and produce finite states. The advantage of SGA against two other prior models is that it can show stable state based on any interaction rules between spins. If SGA temperature be high, it can produce all possible states. If temperature reduces, the automata goes through equilibrium with environment via losing energy.
is an average rule which is calculated via summation of the nearest neighbors values divided by their total count. The Hamilton function
, is the energy function of formula (1) which its calculation method is described in the next section.
stocks are assumed and for each stock
,
is the mean return of asset
, and
is the covariance between returns of assets
and
. The decision variable
represents the fraction of capital to be invested in asset
. following multi-objective problem has to be optimized:![]() | (2) |
![]() | (3) |
![]() | (4) |
![]() | (5) |
is achieved from mean return of each asset in defined intervals, in such a way that if
be value of stock i in beginning of the interval and
be that of interval end, then
where n will be the number intervals which stock i is considered in.In this paper, for a simpler solving of the multi-purpose problem, it converts to a multi-modal problem:![]() | (6) |
![]() | (7) |
![]() | (8) |
is called risk aversion parameter. It shows the amount of risk effects in optimization function. If
=0 then Eq. (5) represents maximum portfolio mean return (without considering the variance) and the optimal solution will be formed only by the asset with the greatest mean return. The case with
=1 represents minimizing the total variance associated with the portfolio (regardless of the mean returns) and the optimal solution will typically consist of several assets. Any value of
inside the interval (0,1) represents a tradeoff between mean return and variance, generating a solution between the two extremes,
= 0 and 1.To solve optimal portfolio selection problem, as is also investigated in [3], it is assumed that each stock is a spin which has a value between 0 and 1. This automata owns an energy function like formula (1) while the problem goal is to select an optimal portfolio and to minimize formula (6). Thus, through the following mapping formula (6) can be converted to the formula (1):![]() | (9) |
![]() | (10) |
takes a number greater that 0 and lower than 1 (to be equal the effects of risk and mean return, value of 0.5 is selected). The approach, each spin interacts with its nearest neighbors, is such that the amount of each spin is summed with its nearest ones and is averaged while limitations of (4) and (5) are satisfied all over the process. Now, when the machine starts at a random state, through neighbor spins interactions and consequently spins value changes, it tries to find the lowest amount of energy at the current temperature. Since the lowest amount of energy is also the value of cost function (6), states of spins will show optimal portfolio at temperature near to zero.![]() | Figure 2. Probability density functions for covariances between assets in 5 major stock markets from 1992 to 1997 from data in[21] |
of SGA is the temperature at which phase transition occurs. At this temperature, the probability of reaching the ground state of the glass changes significantly, i.e. automata's states become more/less unlikely to be a ground state. Figure. 3, illustrates critical temperature of SGA applied to the portfolio selection problems. As shown in this figure, the probability of reaching ground state (
) is equal to 1 in low temperatures, where
is the amount of SGA energy and
is the actual minimum of the energy function. As temperature rises, glass energy also changes and the probability of reaching ground state is expected to gradually decrease. However, this drop is delayed until phase transition where a sudden drop occurs (In this paper, phase transition is defined to occur at
). After the critical temperature, the probability of reaching ground state decreases significantly. Figure 3 illustrates the phase transition for the five stock markets in this paper. The vertical solid red line on
highlights the proximity of this transition for most of the benchmarks. After this temperature, system is not likely to be in its optimal ground state. The dashed gray lines indicate the range of critical temperature for different benchmarks.
|
![]() | Figure 3. SGA Phase Transition Temperature for the 5 stock markets mentioned in[21]. Phase Transition Temperatures are almost equal for all stocks |
![]() | (11) |
is the covariance of spins between two corresponding spins of each glass, and
and
are the standard deviation of cells of SGA
and
, respectively.![]() | Figure 4. Correlation test of the two SGAs for same stock market |
![]() | (12) |
![]() | (13) |
![]() | Figure 5. SGA entropy for solving optimal portfolio selection problem |
|
![]() | Figure 6. The Pareto front resulted from running SGA against standard optimal front resulted from benchmark data of[21] |
| [1] | E. Alba, "Parallel Metaheuristics: A New Class of Algorithms," A John Wiley & Sons, INC, (2005) |
| [2] | A. Adamatzky, A. Lawniczak "Theory and Applications of Cellular Automata," Luniver Press, (2008) |
| [3] | M. Vafaei Jahan, M. R Akbarzadeh-T, "From Local Search to Global Conclusions: Migrating Spin Glass-based Distributed Portfolio Selection," Journal of IEEE Transaction on Evolutionary Computation, No. 14, Issue 4, pp: 591-601, (2010) |
| [4] | P. Sarkar, "A Brief History of Cellular Automata," ACM Computing Surveys, Vol. 32, No. 1, March (2000) |
| [5] | O. Lafe, "Cellular Automata Transforms: Theory and Application in Multimedia Compression, Encryption, and Modeling," Kluwer Acadamic Publisher, (2000) |
| [6] | A. Ilachinski, "Cellular Automata A Discrete Universe," World Scientific Publishing, (2001) |
| [7] | J. L. Schiff, "Cellular Automata: A Discrete View of the World," John Wily & Sons, (2008) |
| [8] | E. Bolthausen, A. Bovier, "Spin Glasses," Springer-Verlag Berlin Heidelberg, (2007) |
| [9] | S. Galluccio, J. P. Bouchaud, M. Potters, "Rational Decisions, Random Matrices and Spin Glasses," Journal of Physica A 259 (1998) pp: 449-456 |
| [10] | S. N. Sivanandam, S. N. Deepa, "Introduction to Genetic Algorithms," Springer-Verlag Berlin Heidelberg (2008) |
| [11] | A. K. Hartmann, M. Weigt, "Phase Transitions in Combinatorial Optimization Problems, Basics, Algorithms and Statistical Mechanics," Wiley-VCH Verlag Co, (2005) |
| [12] | A. K. Hartmann, H. Rieger, "Optimization Algorithms in Physics," Wiley-VCH Verlag Co, (2002) |
| [13] | H. Umeo, S. Morishita, K. Nishinari, "Callular Automata," 8th International Conference on Cellular Automata for Research and Industry Proceeding, ACRI, Japan, (2008) |
| [14] | H. Nishimori, "Statistical Physics of Spin Glasses and Information Processing: An introduction," Clarendon press oxford, (2001) |
| [15] | H. Nishimori, "Spin Glasses and Information," Physica A 384, pp: 94-99 (2007) |
| [16] | T. Horiguchi, H. Takahashi, K. Hayashi, C. Yamaguchi, "Ising Model for Packet Routing Control," Journal of Physics Letters A 330, 192-197, (2004) |
| [17] | A. Gabor, I. Kondor, "Portfolio with Nonlinear Constraints and Spin Glasses," Physica A 274, pp: 222-228, (1999) |
| [18] | H. Ottavi and O. Parodi, "Simulation of the Ising Model by Cellular Automata," Europhysics Letters, 8(8), pp: 741-746 (1989) |
| [19] | B. Hede and H. J. Herrmann, "Fast Simulation of the Ising Model Using Cellular Automata," Journal of Physics A: Mathematical and General, Vol.24. No.12 (1991) |
| [20] | H. Markowitz, "Portfolio Selection," Journal of Finance No 7:77-91, (1952) |
| [21] | Portfolio selection benchmark data at |
| [22] | "http://people.brunel.ac.uk/~mastjjb/jeb/orlib/portinfo.html" |
| [23] | N. Boccara, "Modeling Complex Systems," Second Edition, Springer (2010) |
| [24] | B. Chopard and M. Droz, "Cellular Automata Modeling of Physical Systems," Cambridge University Press, pp:28-38 (1998) |
| [25] | Y. Bar-Yam, Yaneer, "Dynamics of Complex Systems," Addison Wesley Longman, Inc., pp: 146-180, (1997) |
| [26] | A. Fernandez, S. Gomez, "Portfolio selection using neural networks," Computers & Operations Research 34, pp: 1177-1191 (2007) |
| [27] | D. Achliptas, A. Naor, Y. Peres, "Rigorous Location of Phase Transition in Hard Optimization Problems," Nature, Vol 435, pp: 759-764, (2005) |
| [28] | D. Coppersmith, D. Gamarnik, M. Hajiaghayi, G. B. Sorkin, "Random max sat, Random max cut, and Their Phase Transitions," Journal of Random Structures and Algorithms, Volume 24 Issue 4, pp. 502 - 545, (2003) |