Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time Complexity of Genetic Algorithm

Is it possible to calculate the time complexity of genetic algorithm?

These are my parameter settings:

    Population size (P) = 100
    # of Generations (G) = 1000
    Crossover probability (Pc) = 0.5 (fixed)
    Mutation probability (Pm) = 0.01 (fixed)

Thanks

Updated:

 problem: document clustering
 Chromosome: 50 genes/chrom, allele value = integer(document index)
 crossover: one point crossover (crossover point is randomly selected)
 mutation: randomly change one gene
 termination criteria: 1000 generation

fitness: Davies–Bouldin index

like image 440
Maggie Avatar asked Feb 05 '12 01:02

Maggie


People also ask

What is time complexity of genetic algorithm?

Given the usual choices (point mutation, one point crossover, roulette wheel selection) a Genetic Algorithms complexity is O(g(nm + nm + n)) with g the number of generations, n the population size and m the size of the individuals. Therefore the complexity is on the order of O(gnm)).

What is the best time complexity of an algorithm?

O(1) has the least complexity Often called “constant time”, if you can create an algorithm to solve the problem in O(1), you are probably at your best.

What is time complexity of an algorithm with example?

When we analyse an algorithm, we use a notation to represent its time complexity and that notation is Big O notation. For Example: time complexity for Linear search can be represented as O(n) and O(log n) for Binary search (where, n and log(n) are the number of operations).


2 Answers

isnt it something like O(P * G * O(Fitness) * ((Pc * O(crossover)) + (Pm * O(mutation))))

IE the complexity is relative to the number of items, the number of generations and the computation time per generation

If P, G, Pc, and Pm are constant that really simplifies to O( O(Fitness) * (O(mutation) + O(crossover)))

like image 190
Not loved Avatar answered Oct 05 '22 13:10

Not loved


If the number of generations and population size is constant, as long as your mutation function, crossover function, and fitness function takes a known amount of time, the big o is O(1) - it takes a constant amount of time.

Now, if you are asking what the big O would be for a population of N and a number of generations M, that is different, but as stated where you know all the variables ahead of time, the amount of time taken is constant with respect to your input.

like image 23
Kane Avatar answered Oct 05 '22 13:10

Kane