TSP is NP-hard. We will try several different approaches. Designing an appropriate fitness function which takes the constraints into account. This kind of matrices are called permutation matrices . Two tours including the same cities in the same order but with different starting points or different directions are represented by different matrices and therefore by different chromosomes .
Similar problems can result even from crossing over and which represent the same solution.
Alternative solutions to TSP require the introduction of new representations. If the ordering of the parameters in the chromosome is unfortunate, then life is much harder for the GA because crossover can be too disruptive. In nature the function of a gene is largely independent of its position in the DNA, i.e. it will keep producing the same amino-acid whatever its position. In addition reordering operators exist in nature, such as inversion , which work out the best ordering of genes for a given class of individuals. If we want to simulate this capability in GAs we need to differentiate between loci and alleles, i.e. we have to find a way of representing the value of parameters independently of their particular location on the chromosomes.