0% found this document useful (0 votes)
2 views

Week04_Assignment04_Solution

The document outlines solutions for a Soft Computing Techniques assignment, covering topics such as binary encoding, genetic algorithms, fitness functions, and crossover methods. It includes specific calculations and examples related to chromosomes, fitness values, and offspring generation. The assignment emphasizes the application of genetic algorithms and optimization techniques in problem-solving.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Week04_Assignment04_Solution

The document outlines solutions for a Soft Computing Techniques assignment, covering topics such as binary encoding, genetic algorithms, fitness functions, and crossover methods. It includes specific calculations and examples related to chromosomes, fitness values, and offspring generation. The assignment emphasizes the application of genetic algorithms and optimization techniques in problem-solving.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Soft Computing Techniques

Week-04 Assignment-04 (Solution)

1. 58, range is 57.9 to 58.1. We know that in binary system

111010 = 1 × 25 + 1 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 0 × 20

which gives
111010 = 32 + 16 + 8 + 2 = 58

2. (c). After computing the corresponding fitness values of the chromosomes, if the optimization condition
did not meet, then we will check again in the order selection → crossover → mutation.

3. (b). A chromosome consists of genes, which are blocks of DNA.

4. (b). Genotype is the population in the computational space.

5. (a). The inspiration of GA is Darwin’s theory about evolution.

6. (c). A population is the number of individuals with same length of chromosomes.

7. (d). In Binary encoding, every chromosome is a string of bits 0 or 1.

8. (b). For the given two parents P1 and P2

P 1 : 1001|110

and
P 2 : 1101|001
the value of offspring 1 (O1) and offspring 2 (O2) by applying single point crossover is given by
interchanging the numbers after bar(|) i.e.,

O1 : 1001|001 and O2 : 1101|110

9. (d). In minimizing the function f (x), the individual with lowest functional fitness value will be the
fittest. From the given data we have,

f (x2 ) > f (x1 ) > f (x3 )

So, x3 is the fittest one.


10. (a). For the given fitness function f (x) = (a + b) − (c + d) + (e + f ), the fitness value of individuals x1 ,
x2 and x3 is given by,

f (x1 ) = (8 + 5) − (6 + 2) + (1 + 3)
=⇒ f (x1 ) = 9
f (x2 ) = (6 + 4) − (8 + 2) + (1 + 9)
=⇒ f (x2 ) = 10
f (x3 ) = (5 + 4) − (1 + 2) + (6 + 7)
=⇒ f (x3 ) = 19

11. (d). From the above found fitness values we get,

f (x3 ) > f (x2 ) > f (x1 )

So, the order of the individuals with the fittest first and the least fit last will be x3 x2 x1 .

12. (b). The fittest two individuals from the above found order in question no. 11 are x3 and x2 . So, after
crossing x3 and x2 using one–point crossover at the middle point we get,

x3 = 541|267
and x2 = 648|219
=⇒ O1 = 541|219
and O2 = 648|267

Therefore, O1 = 541219 and O2 = 648267.

13. (a). The second and third fittest individuals from the above found order in question no. 11 are x2 and
x1 .
So, after crossing x2 and x1 using two–point crossover at b and e, offspring 3 (O3) and offspring 4 (O4)
will be :

ab|cde|f
x2 =64|821|9
and x1 =85|621|3
=⇒ O3 =64|621|9
and O4 =85|821|3

Therefore, O3 = 646219 and O4 = 858213.


14. (b). We have, O1 = 541219, O2 = 648267, O3 = 646219 and O4 = 858213, from the given fitness
function, we get,

f (O1 ) = (5 + 4) − (1 + 2) + (1 + 9)
=⇒ f (O1 ) = 16
f (O2 ) = (6 + 4) − (8 + 2) + (6 + 7)
=⇒ f (O2 ) = 13
f (O3 ) = (6 + 4) − (6 + 2) + (1 + 9)
=⇒ f (O3 ) = 12
f (O4 ) = (8 + 5) − (8 + 2) + (1 + 3)
=⇒ f (O4 ) = 7

15. fmax = 36, range is 35.9 to 36.1. For the given data in question no. 10, by looking at the fitness
function and considering that genes can only be digits between 0 and 9, if we take 9 at the place where
we have addition and 0 at the place where we have subtraction, then we get the value of maximum
fitness as,
fmax = (9 + 9) − (0 + 0) + (9 + 9) = 36

You might also like