Question
Download Solution PDFIn a genetic algorithm optimization problem the fitness function is defined as f(x) = x2 - 4x + 4. Given a population of four individuals with values of x: {1.5, 2.0, 3.0, 4.5}
What is the fitness value of the individual that will be selected as the parent for reproduction in one generation?
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFThe correct answer is 6.25
Key PointsIn a genetic algorithm seeks to find the optimal solution to a problem, guided by the principle of survival of the fittest.
To find the fitness value of each individual in the population, we can use the given fitness function \(f(x) = x^2 - 4x + 4 \).
Let's calculate the fitness values for the individuals with the given values of x:
1. For x = 1.5:
\(f(1.5) = (1.5)^2 - 4(1.5) + 4 = 2.25 - 6 + 4 = 0.25\)
2. For x = 2.0:
\(f(2.0) = (2.0)^2 - 4(2.0) + 4 = 4 - 8 + 4 = 0\)
3. For x = 3.0:
\(f(3.0) = (3.0)^2 - 4(3.0) + 4 = 9 - 12 + 4 = 1\)
4. For x = 4.5:
\(f(4.5) = (4.5)^2 - 4(4.5) + 4 = 20.25 - 18 + 4 = 6.25\)
So, the fitness values for the individuals are:
\(\{0.25, 0, 1, 6.25\}\)
The individual with the highest fitness value is x = 4.5 with a fitness value of 6.25. Therefore, the correct answer is option 4) 6.25.
Last updated on Jun 12, 2025
-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.
-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.
-> The exam is conducted bi-annually - in June and December cycles.
-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions.
-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.