Answer: H-Fixed-Length-Eight-Genes-G-Q120961572
Answer: H-Fixed-Length-Eight-Genes-G-Q120961572
https://www.chegg.com/homework-help/questions-and-answers/suppose-genetic-algorithm-uses-chromosomes-form-x-b-c-d-e-f-g-
h-fixed-length-eight-genes-g-q120961572
Answer
Step 1
First, let's solve the equations.
(i) X 1 = 6 5 4 1 3 5 3 2
f (x1) = (6 + 5) − (4 + 1) + (3 + 5) − (3 + 2) = 9
X2=87126601
f (x2) = (8 + 7) − (1 + 2) + (6 + 6) − (0 + 1) = 23
X3=23921285
f (x3) = (2 + 3) − (9 + 2) + (1 + 2) − (8 + 5) = −16
X4=41852094
f (x4) = (4 + 1) − (8 + 5) + (2 + 0) − (9 + 4) = −19
Explanation:
From the given formula f (x) = (a + b) − (c + d) + (e + f )−)g + h) , we have calculated the fitness of each individual .
Step 2
ii) Perform the following crossover operations:
a) Cross the fittest two individuals using one–point crossover at the middle point. Answer: One–point crossover on X2 and X1 : X 2 = 8 7 1 2 6 6
0 1 ⇒ O 1 = 8 7 1 2 3 5 3 2 X 1 = 6 5 4 1 3 5 3 2 ⇒ O 2 = 6 5 4 1 6 6 0 1 b) Cross the second and third fittest individuals using a two–point crossover
(points b and f). Answer: Two–point crossover on X 1 and X 3 : X 1 = 6 5 4 1 3 5 3 2 ⇒ O 3 = 2 3 4 1 3 5 8 5 X 3 = 2 3 9 2 1 2 8 5 ⇒ O 4 = 6 5 9 2 1 2 3
2 iii) Cross the first and third fittest individuals (ranked 1st and 3rd) using a uniform crossover. Answer: we may swap genes at positions a, d
and f of parents x2 and x3: X 2 = 8 7 1 2 6 6 0 1 ⇒ O 5 = 2 7 1 2 6 2 0 1 X 3 = 2 3 9 2 1 2 8 5 ⇒ O 6 = 8 3 9 2 1 6 8 5
Explanation:
Step 3
(iii) From the last created part we get 6 offspring.
O1=87123532
O2=65416601
O3=65921232
O4=23413585
O5=27126201
O 6 = 8 3 9 2 1 6 8 5.
f (O1) = (8 + 7) − (1 + 2) + (3 + 5) − (3 + 2) = 15
f (O2) = (6 + 5) − (4 + 1) + (6 + 6) − (0 + 1) = 17
f (O3) = (6 + 5) − (9 + 2) + (1 + 2) − (3 + 2) = −2
f (O4) = (2 + 3) − (4 + 1) + (3 + 5) − (8 + 5) = −5
f (O5) = (2 + 7) − (1 + 2) + (6 + 2) − (0 + 1) = 13
f (O6) = (8 + 3) − (9 + 2) + (1 + 6) − (8 + 5) = −6 The overall fitness has been improved by using the crossover operations.
Explanation:
The overall fitness has been improved from the previous fitness .
Step 4
d) The optimal solution should have a chromosome that gives the maximum of the fitness function.
Because genes can only be digits from 0 to 9, the optimal solution should be:
Explanation:
The maximum fitness can reach only upto 36 . and minimum can be as low as 0.
Step 5
V ) No, the algorithm will never reach the optimal solution without mutation. The optimal solution is xoptimal = 99009900 . If mutation does
not occur, then the only way to change genes is by applying the crossover operator. Regardless of the way crossover is performed, its only
outcome is an exchange of genes of parents at certain positions in the chromosome. This means that the first gene in the chromosomes of
children can only be either 6, 8, 2 or 4 (i.e. first genes of x1, x2, x3 and x4), and because none of the individuals in the initial population begins
with gene 9, the crossover operator alone will never be able to produce an offspring with gene 9 in the beginning. One can easily check that
a similar problem is present at several other positions. Thus, without mutation, this GA will not be able to reach the optimal solution.
Final Answer
The all the steps are explained brifely in the above steps .
x2 = 8 7 1 2 6 6 0 1 ⇒O5 = 2 7 1 2 6 2 0 1 x3 = 2 3 9 2 1 2 8 5 ⇒O6 = 8 3 9 2 1 6 8 5
5) No, the algorithm cannot reach the optimal solution without the mutation operation.