Assignment_4 (1)
Assignment_4 (1)
Question 1: Which encoding method is useful in ordering problems such as the Travelling Salesman
Problem (TSP)?
a. Binary Encoding
b. Permutation Encoding
c. Value Encoding
d. None of the above
Correct Answer: b
Question 2: Using a binary encoding scheme for a job-shop scheduling problem with three jobs (J1, J2,
and J3) and two machines (M1 and M2), how would you represent a solution where J1 is scheduled on
M1, J2 is scheduled on M2, and J3 is not scheduled on any machine?
a. 100100
b. 100000
c. 100110
d. 101100
Correct Answer: a
Detailed Explanation:
10: This represents J1, with the first bit (1) indicating it's scheduled on M1 and the second bit (0)
indicating it's not scheduled on M2.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
01: This represents J2, with the first bit (0) indicating it's not scheduled on M1 and the second
bit (1) indicating it's scheduled on M2.
00: This represents J3, with both bits (0) indicating it's not scheduled on either machine.
Question 3: Consider a binary tree-encoded genetic algorithm. The tree represents arithmetic
expressions where the nodes can be operators (+, -, *, /). If the maximum depth of the tree is 3 (root
is at depth 0), what is the maximum number of nodes the tree can have?
a. 15
b. 7
c. 45
d. 9
Correct Answer: a
Detailed Explanation:
The maximum number of nodes at a depth 𝑑 in a binary tree is 2𝑑 . So, for a tree with a maximum depth
of 3, the total number of nodes is 20 + 21 + 22 + 23 = 1 + 2 + 4 + 8 = 15.
Question 4: In the context of genetic algorithms and their selection processes, why might the Roulette
Wheel Selection method be considered advantageous yet potentially problematic?
a. It guarantees the selection of the best individual in every generation, ensuring rapid
convergence.
b. It distributes selection probabilities based on fitness, favouring fitter individuals but
potentially sidelining lesser-fit individuals over time.
c. It always promotes diversity by selecting individuals randomly, ensuring a wide range of
solutions in subsequent generations.
d. It eliminates the need for a fitness function, relying solely on random chance for selection.
Correct Answer: b
Detailed Explanation:
Roulette Wheel Selection allocates selection probabilities based on an individual's fitness: fitter
individuals have a higher chance of being selected. While this can lead to faster convergence towards
optimal solutions, it also poses a risk. Over successive generations, the method may consistently favour
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
the same set of top-performing individuals, reducing genetic diversity and potentially missing out on
exploring other promising regions of the solution space. Thus, while advantageous in prioritizing fitter
solutions, it requires careful handling to prevent premature convergence and maintain genetic diversity.
Question 5: Which type of generation gap typically leads to higher selection pressure?
a. No gap
b. Small gap
c. Large gap
d. The type of gap doesn't affect selection pressure
Correct Answer: c
Detailed Explanation:
In a large generation gap, most of the offspring replace the parents. This means that only the fittest
individuals from the parent generation are likely to contribute to the offspring, leading to higher
selection pressure.
Question 6: In real value encoding, if XL =2 and XU = 17 are two extreme decoded values of a variable
x. n= 4 is the number of binary bits in the representation of x. If the decoded value of x is 10, then x
will be
a. 1100
b. 1010
c. 1110
d. 1111
Correct Answer: a
Detailed explanation:
𝑋𝑈 −𝑋𝐿
𝑋 = 𝑋𝐿 + . 𝑋𝐵
2𝑛 −1
17−2
= 2 + 24 −1 . 10
15
= 2 + 15 . 10
= 12
The binary of 12 is (1100)2
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Question 7: If the mating pool size is N, how many mating pairs are to be formed in Random Mating?
𝑁
a.
4
𝑁
b. 2
𝑁2
c. 2
𝑁2
d. 4
Correct Answer: b
Detailed explanation:
In genetic algorithms, for Random Mating, mating pairs are typically formed from the mating pool,
𝑁
and each pair contributes to the creation of offspring. Therefore, if the mating pool size is N, then 2
mating pairs are formed. Each pair undergoes crossover or recombination to produce new
individuals in the next generation.
Question 8: The generation gap with N population size and p number of individuals is
𝑝
a. 𝑁
𝑃2
b. 𝑁
𝑝
c. 𝑁2
2𝑁
d. 𝑝
Correct Answer: a
Detailed explanation:
The generation gap is defined as the proportion of individuals in the population who are replaced in
each generation.
Question 9: Which coding scheme has evolved to overcome the binary code-related problem?
a. Pink coding.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
b. Grey coding.
c. Yellow coding.
d. Black coding.
Correct Answer: b
Detailed explanation:
Grey coding is a binary numeral system in which two consecutive numbers differ in only one bit. This
coding scheme is designed to reduce the possibility of errors during transitions between consecutive
numbers, as only one bit changes at a time. In contrast, traditional binary coding can lead to multiple
bits changing simultaneously, which can result in errors or glitches, especially in digital systems. Grey
coding helps in minimizing errors and simplifying transitions in various applications, making it
particularly useful in contexts where accurate and reliable encoding and decoding are essential.
Question 10: Which is not the drawback of the binary crossover problem?
Correct Answer: d
Detailed explanation:
The other options (Endpoint Bias, hamming cliff problem, Positional bias) are considered drawbacks
associated with certain crossover techniques, but "Uniform variation" is not typically considered a
drawback in the context of binary crossover problems. Uniform variation refers to a type of mutation
operator where each bit in the chromosome has an equal chance of being flipped or changed. It is a
form of introducing diversity in the population and can be a useful exploration mechanism.