In 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?

This question was previously asked in
UGC NET Computer Science (Paper 2) 07 Dec 2023 Official Paper
View all UGC NET Papers >
  1. 2.25
  2. 6.0
  3. 0.0
  4. 6.25

Answer (Detailed Solution Below)

Option 4 : 6.25
Free
UGC NET Paper 1: Held on 21st August 2024 Shift 1
8.7 K Users
50 Questions 100 Marks 60 Mins

Detailed Solution

Download Solution PDF

The 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.

Latest UGC NET Updates

Last updated on Jun 6, 2025

-> The UGC NET Exam Schedule 2025 for June has been released on its official website.

-> The UGC NET Application Correction Window 2025 is available from 14th May to 15th May 2025.

-> The UGC NET 2025 online application form submission closed on 12th May 2025.

-> The June 2025 Exam will be conducted from 21st June to 30th 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.

More Genetic Algorithms Questions

Get Free Access Now
Hot Links: teen patti master teen patti gold new version teen patti rich