Drift analysis and average time complexity of evolutionary algorithms

The computational time complexity is an important topic in t he theory of evolutionary algorithms (EAs). This paper repo rts some new results on the average time complexity of EAs. Based on rift analysis, some useful drift conditions for derivin g the time complexity of EAs are studied, including conditions un der which an EA will take no more than polynomial time (in prob lem size) to solve a problem and conditions under which an EA will take at least exponential time (in problem size) to solve a pr oblem. The paper first presents the general results, and then uses se veral problems as examples to illustrate how these general r su ts can be applied to concrete problems in analyzing the average tim complexity of EAs. While previous work only considered (1 + 1) EAs without any crossover, the EAs considered in this paper a re fairly general, which use a finite population, crossover, mutation, and selection. Index Terms Evolutionary algorithms, time complexity, random sequenc es, drift analysis, stochastic inequalities. I. I NTRODUCTION Evolutionary algorithms (EAs) are a powerful class of adapt ive search algorithms [1], [2], [3]. They have been used to so lve many combinatorial problems with success in recent years. H owever, theories on explaining why and how EAs work are still relatively few in spite of recent efforts [4]. The computati onal time complexity of EAs is largely unknown, except for a f ew simple cases [5], [6], [7], [8], [9]. Ambati et al. [6] and Fogel [7] estimated the computational time complexi ty of their EAs on the traveling salesman problem. No theoretical results w ere given. Rudolph [8] proved that (1 + 1) EAs with mutation probability pm = 1/n, wheren is the number of bits in a binary string (i.e., individual) an d pm is the mutation probability, converge in average time O(n log n) for the ONE-MAX problem. Drosteet al. [9] carried out a rigorous complexity analysis of (1+1) EAs for linear functions with Boolean inputs. Howev er, all of these results were based on EAs with a population size of 1 and without any crossover operators. Nimwegen et al. [10], [11] developed a theory which predicts the total numbe r of fitness function evaluations needed to reach a global opti mum by epochal dynamics as a function of mutation rate and population size. However, no relationship to the problem si ze was studied. Het al. [12], [13] showed that genetic algorithms (GAs) may take exponential average time to solve some decept ive roblems. This paper presents a more general theory about the average t ime complexity of EAs. The motivation of this study is to establish a general theory for a class of EAs, rather than a pa rticul r EA. The theory can then be used to derive specific complexity results for different EAs on different problems . The theory has been developed using drift analysis [14], [1 5] — a very useful technique in analyzing random sequences. It can be used to estimate the first hitting time by estimating the dr ift of a random sequence. To our best knowledge, this is the first att emp that drift analysis is introduced into the theoretical study of evolutionary computation. One of the major advantages of using drift analysis is that it is often easier to estimate th drift than to estimate the first hitting time directly. The techniq ues of drift analysis can also be applied to random sequences which are not Markovian [14]. The basic idea of this paper is as follows. We first model the ev olution of an EA population as a random sequence, e.g., a Markov chain. A population of multiple individuals will be considered. Both crossover and mutation are included in the EA. Then we analyzed the drift of this sequence to and from the optimal solution (assuming we are solving an optimization problem). Various bounds on the first hitting time will be der iv d under different drift conditions. Some drift conditio ns cause the random sequence to drift away from the optimal solution, while other drift conditions enable the sequence to drift to wards the optimal solution. We will study the conditions which are used to determine the time complexity of an EA to solve a problem, whether in polynomial time (in problem size) or in e xponential time. To illustrate the application of the above general theory, w e will apply the theoretical results to several well-known p roblems, including a classical combinatorial optimization problem — the subset sum problem. It is shown in this paper that a certa in family of subset sum problems can be solved by an EA within pol yn mial time, while other families of subset sum problems will need at least exponential time to solve. Although the EA s used in our study do not include all possible variations of E As, they do represent a fairly large class of EAs which have multi ple ndividuals and use both crossover and mutation. The rest of this paper is organized as follows: Section II int roduces briefly EAs and drift analysis. Section III studies t he conditions under which EAs can solve a problem within polyno mial time on average. A general theorem is first presented. Jun He is with Department of Computer Science, Northern Jiao tong University, Beijing 100044, P.R. China. (Email:jun.h e@ieee.org) Xin Yao is with School of Computer Science, The University of Birmingham, Birmingham B15 2TT, U.K. (Email: x.yao@cs.bha m. c.uk) DRAFT -DRAFT -DRAFT -DRAFT -DRAFT -2 Then examples, including the subset sum problem, are studie d to show the application of the theorem. Section IV studies t he conditions under which EAs need at least exponential comput ation time to solve a problem. Both a general theorem and an application of the theorem are given. Section V discusses so me weaker drift conditions for the subset sum problem. Final ly, Section VI concludes with a brief summary of the paper and som e future work. II. EVOLUTIONARY ALGORITHMS AND DRIFT ANALYSIS A. Evolutionary Algorithms The combinatorial optimization problem considered in this paper can be described as follows: Given a finite state space S and a functionf(x), x ∈ S, find max{f(x); x ∈ S}. (1) Assumex is one state with the maximum function value, and fmax = f(x). The EA for solving the combinatorial optimization problem c an be described as follows: 1) Initialization: generate, either randomly or heuristically, an initial po pulation of 2N individuals, denoted byξ0 = (x1, · · · , x2N ), and letk← 0, whereN > 0 is an integer. For any population ξk, definef(ξk) = max{f(xi); xi ∈ ξk}. 2) Generation: generate a new (intermediate) population by crossover and mutation (or any other operators for generating offspring), and denote it as ξk+1/2. 3) Selection: select and reproduce 2N individuals from populationsξk+1/2 andξk, and obtain another (new intermediate) populationξk+S . 4) If f(ξk+S) = fmax, then stop; otherwise let ξk+1 = ξk+S andk ← k + 1, and go to step 2. Obviously the above description includes a wide range of EAs using crossover, mutation and selection. The description d oes not set any restrictions on the type of crossover, mutation o r selection schemes used. It includes EAs which use crossove r or mutation alone. The EA framework given above is closer to evo lution strategies [ ?] and evolutionary programming [ ?] than to GAs [2] in the sense that selection is applied after crossove r and/or mutation. However, the main results given in this pa per, i.e., Theorems 1 and 10 are independent of any such implement ation details. In fact, they hold for virtually any stochast ic search algorithms. B. Drift Analysis Assumex is an optimal point, and let d(x, x) be the distance between a point x andx. If there are more than one optimal point (that is, a set S), we used(x, S) = min{d(x, x) : x ∈ S} as the distance between individual x and the optimal setS. In short we denote the distance by d(x). Usuallyd(x) satisfiesd(x) = 0 andd(x) > 0 for any x / ∈ S. However, in some parts of this paper, we will consider a pseudo-distance d(x) which allowsd(x) = 0 for somex / ∈ S. Given a populationX = {x1, · · · , x2N}, let d(X) = min{d(x) : x ∈ X}, (2) which is used to measure the distance of the population to the ptimal solution. The sequence{d(ξk); k = 0, 1, 2, · · · } generated by the EA is a random sequence. The sequence can be m odeled by a homogeneous Markov chain if no self-adaptation is used [16] . The drift of the random sequence {d(ξk), k = 0, 1, · · · } at timek is defined by ∆(d(ξk)) = d(ξk+1)− d(ξk). Define the stopping time of an EA as τ = min{k; d(ξk) = 0}, which is the first hitting time on the optimal solution. The task now is to investigate the relationship between the expe ct first hitting timeτ and the problem sizen. In this paper, we focus on the following question: under what conditions of th e drift ∆(d(ξk)) can we estimate the expect first hitting time E[τ ]? In particular, we study the conditions under which an EA is g uaranteed to find the optimal solution in polynomial time on average and conditions under which an EA takes at least exp on ntial time on average to find the optimal solution. The idea behind drift analysis is quite straightforward. It can be explained (by sacrificing mathematical rigor) using a deterministic algorithm as an example. Assume the distance between the starting solution and the optimal solution is d, and a deterministic algorithm is used to solve an optimization pr oblem. If the drift towards the optimal solution is greater t han ∆ at each time step (i.e., iteration), we would need at most d/∆ time steps to find the optimal solution. Hence the key issue here is to estimate∆. Sasaki and Hajek [17] have successfully used this method to estimate the time complexity of simulated annealing for the maximum matching problem.