implementation uses an interesting generation
mechanism that combines two different strategies.
The first strategy is swapping which consists of
selecting two positions in the vector and
interchanges its values and the second strategy is 3-
cycle, which consists of randomly selecting 3
elements of the actual state and shift them one
position to the right in a circle. In order to select
which strategy is used to generate the new solution
at a given iteration, variable ∈0,1 that
represents the frequency of swap selection and thus
1 that represents 3-cycle selection is used.
2.2 Genetic Algorithms
The author of (Holland, 1992) explains that “Most
organisms evolve by means of two primary process:
natural selection and sexual reproduction. The first
determines which members of the population survive
to reproduce, and the second ensures mixing and
recombination among the genes of their offspring”.
Genetic algorithms use the same procedure to seek
an optimal solution to an optimization problem by
selecting the most fitted solutions of the problem
and combining them to create new generations.
A genetic algorithm heavily depends on the
performance of its three basic operations: selection,
recombination and mutation.
In general the selection scheme describes how to
extract individuals from the current generation to
create new elements to be evaluated in the next
generation by creating a mating pool. Consequently
the elements selected in the present generation must
be “good” enough to be the parents of the new
generation.
The crossover operation is what makes genetic
algorithms different from other randomized
methods. Based on the natural reproduction process
where parts of the genes of both parents are
combined to form new individuals, the crossover
function uses two individuals selected from the
mating pool and combines them to create new
individuals. Several methods to crossover have been
designed and some of the most popular are one-point
crossover, two-point crossover, cycle crossover and
uniform crossover.
The mutation operation adds an additional
change to the new individuals of the population to
prevent the generation of uniform populations and
getting trapped in local optima. The mutation
operation in binary encoded genetic algorithms can
be easily implemented by selecting a random bit
from the encoded string and change its value by
using the negation operation. Even though the
mutation operation is essential for the genetic
algorithm to work properly, it must be used
carefully.
Genetic algorithms have also been used to solve
the query optimization problem as alternative to
randomized algorithms. The genetic algorithm
implemented by the authors of (Bennett et al., 1991)
is the first known genetic algorithm used to
approach the query optimization problem. The
authors adapted a genetic algorithm used to solve the
assembly line balancing problem focusing on
finding an appropriate encoding schema and
crossover operation to solve the query optimization
problem. The author of (Muntes-Mulero et al., 2006)
proposed the Carquinyoli Genetic Optimizer (CGO)
which uses a tree fashioned codification for the
algorithm to represent solutions, the crossover
operation randomly selects two members of the
current population and examines each tree’s
operations and stores them in a list, then a sub tree
from each parent is selected and an offspring is
generated by combining a sub tree from one parent
and the ordered list of operations from the other, the
same procedure is applied to the other sub tree and
operation list. Five different mutation strategies were
used, swap, change scan, change join, join
reordering and random sub tree. The selection
strategy used by GCO is a simple elitist algorithm.
Finally the commercial database system
PostgreSQL is equipped with GEQO, a genetic
optimizer that activates when the number of tables
involved in a query exceeds 10. GEQO is based on
the steady state genetic algorithm GENITOR that
presents two main differences compared to
traditional genetic algorithms, the explicit use of
ranking and the genotype reproduction in an
individual basis.
2.3 Ant Colony Optimization
The optimization method based on ant colonies
consists of three procedures: ConstructAntsSolution,
UpdatePheromones and DeamonActions. The first
method manages the construction of solutions by
single ants using pheromone trails and heuristic
information. The second method uses the solution
constructed by the ant and update pheromone trail
accordingly increasing the amount of pheromones or
reducing the amount of pheromones due
evaporation. The third method includes actions that
cannot be performed by single ants like local
optimization procedures or additional pheromone
increases.
Lately new algorithms to solve the query
AutomataTheorybasedApproachtotheJoinOrderingProbleminRelationalDatabaseSystems
259