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
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)).
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.
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).
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)))
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With