SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
GENETIC ALGORITHM EXAMPLE
Author: Kasun Ranga Wijeweera
Email: krw19870829@gmail.com
(TOTAL MARKS = 30)
Suppose we want to maximize the number of ones in a string of 10 binary digits.
a) What is the best possible string? (5 marks)
1111111111 (5 marks)
b) How much number of strings can be generated for this problem? (5 marks)
210
= 1024 (5 marks)
Now we are going to apply genetic algorithms to solve this problem. We toss a fair coin 60 times
and get the following initial population.
s1 = 1111010101
s2 = 0111000101
s3 = 1110110101
s4 = 0100010011
s5 = 1110111101
s6 = 0100110000
c) Suggest an appropriate fitness function (5 marks)
F (s) = Number of 1s in the binary string s (5 marks)
d) Evaluate the fitness of each individual (6 marks)
F (s1) = 7 (1 marks)
F (s2) = 5 (1 marks)
F (s3) = 7 (1 marks)
F (s4) = 4 (1 marks)
F (s5) = 8 (1 marks)
F (s6) = 3 (1 marks)
Suppose that after performing selection, we get the following population.
s1` = 1111010101 (s1)
s2` = 1110110101 (s3)
s3` = 1110111101 (s5)
s4` = 0111000101 (s2)
s5` = 0100010011 (s4)
s6` = 1110111101 (s5)
e) Apply single point cross over for the couples (s1`, s3`) and (s2`, s6`) at the points 3 and 6
respectively (6 marks)
For couple (s1`, s3`):
s1`` = 1110111101 (1.5 marks)
s3`` = 1111010101 (1.5 marks)
For couple (s2`, s6`):
s2`` = 1110111101 (1.5 marks)
s6`` = 1110110101 (1.5 marks)
f) Mutate the derived population with 0.1 probability (3 marks)
Derived population,
s1`` = 1110111101
s2`` = 1110111101
s3`` = 1111010101
s4`` = 0111000101
s5`` = 0100010011
s6`` = 1110110101
Note: Select 6 (= 10 * 6 * 0.1) random digits and perturb. (0.5 * 6 marks). Following is just
an example.
s1``` = 1111111101
s2``` = 1100111101
s3``` = 1111000101
s4``` = 0111000001
s5``` = 0000010011
s6``` = 1110100101

Mais conteúdo relacionado

Destaque

Linked List Implementation of Stack in C
Linked List Implementation of Stack in CLinked List Implementation of Stack in C
Linked List Implementation of Stack in CKasun Ranga Wijeweera
 
Exercises for Two Dimensional Geometric Transformations
Exercises for Two Dimensional Geometric TransformationsExercises for Two Dimensional Geometric Transformations
Exercises for Two Dimensional Geometric TransformationsKasun Ranga Wijeweera
 
Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...
Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...
Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...Dr Wei Liu
 
Digital Differential Analyzer Line Drawing Algorithm in C
Digital Differential Analyzer Line Drawing Algorithm in CDigital Differential Analyzer Line Drawing Algorithm in C
Digital Differential Analyzer Line Drawing Algorithm in CKasun Ranga Wijeweera
 
Multi-objective Optimisation of a Water Distribution Network with a Sequence-...
Multi-objective Optimisation of a Water Distribution Network with a Sequence-...Multi-objective Optimisation of a Water Distribution Network with a Sequence-...
Multi-objective Optimisation of a Water Distribution Network with a Sequence-...djw213
 
Implementation of k-means clustering algorithm in C
Implementation of k-means clustering algorithm in CImplementation of k-means clustering algorithm in C
Implementation of k-means clustering algorithm in CKasun Ranga Wijeweera
 
Himanshu Arora_Nurse Scheduling using GA
Himanshu Arora_Nurse Scheduling using GAHimanshu Arora_Nurse Scheduling using GA
Himanshu Arora_Nurse Scheduling using GAHIMANSHU ARORA
 
Principles of Object Oriented Programming
Principles of Object Oriented ProgrammingPrinciples of Object Oriented Programming
Principles of Object Oriented ProgrammingKasun Ranga Wijeweera
 
Dominance-Based Pareto-Surrogate for Multi-Objective Optimization
Dominance-Based Pareto-Surrogate for Multi-Objective OptimizationDominance-Based Pareto-Surrogate for Multi-Objective Optimization
Dominance-Based Pareto-Surrogate for Multi-Objective OptimizationIlya Loshchilov
 
Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...
Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...
Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...Evangelos Ntotsios
 
Complexity in Ambiguous Problem Solution Search: Group Dynamics, Search Tac...
Complexity in Ambiguous Problem Solution Search:   Group Dynamics, Search Tac...Complexity in Ambiguous Problem Solution Search:   Group Dynamics, Search Tac...
Complexity in Ambiguous Problem Solution Search: Group Dynamics, Search Tac...Dr. Elliot Bendoly
 

Destaque (19)

Wave ECG
Wave ECGWave ECG
Wave ECG
 
Flood Filling Algorithm in C
Flood Filling Algorithm in CFlood Filling Algorithm in C
Flood Filling Algorithm in C
 
Linked List Implementation of Stack in C
Linked List Implementation of Stack in CLinked List Implementation of Stack in C
Linked List Implementation of Stack in C
 
Exercises for Two Dimensional Geometric Transformations
Exercises for Two Dimensional Geometric TransformationsExercises for Two Dimensional Geometric Transformations
Exercises for Two Dimensional Geometric Transformations
 
Computing the Area of a Polygon
Computing the Area of a PolygonComputing the Area of a Polygon
Computing the Area of a Polygon
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...
Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...
Optimisation and Tradeoff Analysis Tool for Asset Management Planning and Pro...
 
Digital Differential Analyzer Line Drawing Algorithm in C
Digital Differential Analyzer Line Drawing Algorithm in CDigital Differential Analyzer Line Drawing Algorithm in C
Digital Differential Analyzer Line Drawing Algorithm in C
 
Exercises for Convexity of Polygons
Exercises for Convexity of PolygonsExercises for Convexity of Polygons
Exercises for Convexity of Polygons
 
Multi-objective Optimisation of a Water Distribution Network with a Sequence-...
Multi-objective Optimisation of a Water Distribution Network with a Sequence-...Multi-objective Optimisation of a Water Distribution Network with a Sequence-...
Multi-objective Optimisation of a Water Distribution Network with a Sequence-...
 
Implementation of k-means clustering algorithm in C
Implementation of k-means clustering algorithm in CImplementation of k-means clustering algorithm in C
Implementation of k-means clustering algorithm in C
 
Himanshu Arora_Nurse Scheduling using GA
Himanshu Arora_Nurse Scheduling using GAHimanshu Arora_Nurse Scheduling using GA
Himanshu Arora_Nurse Scheduling using GA
 
Logix2017
Logix2017Logix2017
Logix2017
 
Access modifiers
Access modifiersAccess modifiers
Access modifiers
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Principles of Object Oriented Programming
Principles of Object Oriented ProgrammingPrinciples of Object Oriented Programming
Principles of Object Oriented Programming
 
Dominance-Based Pareto-Surrogate for Multi-Objective Optimization
Dominance-Based Pareto-Surrogate for Multi-Objective OptimizationDominance-Based Pareto-Surrogate for Multi-Objective Optimization
Dominance-Based Pareto-Surrogate for Multi-Objective Optimization
 
Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...
Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...
Multi-Objective Optimization Algorithms for Finite Element Model Updating. Nt...
 
Complexity in Ambiguous Problem Solution Search: Group Dynamics, Search Tac...
Complexity in Ambiguous Problem Solution Search:   Group Dynamics, Search Tac...Complexity in Ambiguous Problem Solution Search:   Group Dynamics, Search Tac...
Complexity in Ambiguous Problem Solution Search: Group Dynamics, Search Tac...
 

Mais de Kasun Ranga Wijeweera

Algorithms for Convex Partitioning of a Polygon
Algorithms for Convex Partitioning of a PolygonAlgorithms for Convex Partitioning of a Polygon
Algorithms for Convex Partitioning of a PolygonKasun Ranga Wijeweera
 
Digital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing AlgorithmDigital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing AlgorithmKasun Ranga Wijeweera
 
Getting Started with Visual Basic Programming
Getting Started with Visual Basic ProgrammingGetting Started with Visual Basic Programming
Getting Started with Visual Basic ProgrammingKasun Ranga Wijeweera
 
Variables in Visual Basic Programming
Variables in Visual Basic ProgrammingVariables in Visual Basic Programming
Variables in Visual Basic ProgrammingKasun Ranga Wijeweera
 
Conditional Logic in Visual Basic Programming
Conditional Logic in Visual Basic ProgrammingConditional Logic in Visual Basic Programming
Conditional Logic in Visual Basic ProgrammingKasun Ranga Wijeweera
 
Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]Kasun Ranga Wijeweera
 

Mais de Kasun Ranga Wijeweera (20)

Decorator Design Pattern in C#
Decorator Design Pattern in C#Decorator Design Pattern in C#
Decorator Design Pattern in C#
 
Singleton Design Pattern in C#
Singleton Design Pattern in C#Singleton Design Pattern in C#
Singleton Design Pattern in C#
 
Introduction to Design Patterns
Introduction to Design PatternsIntroduction to Design Patterns
Introduction to Design Patterns
 
Algorithms for Convex Partitioning of a Polygon
Algorithms for Convex Partitioning of a PolygonAlgorithms for Convex Partitioning of a Polygon
Algorithms for Convex Partitioning of a Polygon
 
Geometric Transformations II
Geometric Transformations IIGeometric Transformations II
Geometric Transformations II
 
Geometric Transformations I
Geometric Transformations IGeometric Transformations I
Geometric Transformations I
 
Introduction to Polygons
Introduction to PolygonsIntroduction to Polygons
Introduction to Polygons
 
Bresenham Line Drawing Algorithm
Bresenham Line Drawing AlgorithmBresenham Line Drawing Algorithm
Bresenham Line Drawing Algorithm
 
Digital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing AlgorithmDigital Differential Analyzer Line Drawing Algorithm
Digital Differential Analyzer Line Drawing Algorithm
 
Loops in Visual Basic: Exercises
Loops in Visual Basic: ExercisesLoops in Visual Basic: Exercises
Loops in Visual Basic: Exercises
 
Conditional Logic: Exercises
Conditional Logic: ExercisesConditional Logic: Exercises
Conditional Logic: Exercises
 
Getting Started with Visual Basic Programming
Getting Started with Visual Basic ProgrammingGetting Started with Visual Basic Programming
Getting Started with Visual Basic Programming
 
CheckBoxes and RadioButtons
CheckBoxes and RadioButtonsCheckBoxes and RadioButtons
CheckBoxes and RadioButtons
 
Variables in Visual Basic Programming
Variables in Visual Basic ProgrammingVariables in Visual Basic Programming
Variables in Visual Basic Programming
 
Loops in Visual Basic Programming
Loops in Visual Basic ProgrammingLoops in Visual Basic Programming
Loops in Visual Basic Programming
 
Conditional Logic in Visual Basic Programming
Conditional Logic in Visual Basic ProgrammingConditional Logic in Visual Basic Programming
Conditional Logic in Visual Basic Programming
 
Assignment for Variables
Assignment for VariablesAssignment for Variables
Assignment for Variables
 
Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]
 
Assignment for Events
Assignment for EventsAssignment for Events
Assignment for Events
 
Mastering Arrays Assignment
Mastering Arrays AssignmentMastering Arrays Assignment
Mastering Arrays Assignment
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Genetic Algorithm Example

  • 1. GENETIC ALGORITHM EXAMPLE Author: Kasun Ranga Wijeweera Email: krw19870829@gmail.com (TOTAL MARKS = 30) Suppose we want to maximize the number of ones in a string of 10 binary digits. a) What is the best possible string? (5 marks) 1111111111 (5 marks) b) How much number of strings can be generated for this problem? (5 marks) 210 = 1024 (5 marks) Now we are going to apply genetic algorithms to solve this problem. We toss a fair coin 60 times and get the following initial population. s1 = 1111010101 s2 = 0111000101 s3 = 1110110101 s4 = 0100010011 s5 = 1110111101 s6 = 0100110000 c) Suggest an appropriate fitness function (5 marks) F (s) = Number of 1s in the binary string s (5 marks) d) Evaluate the fitness of each individual (6 marks) F (s1) = 7 (1 marks) F (s2) = 5 (1 marks) F (s3) = 7 (1 marks) F (s4) = 4 (1 marks) F (s5) = 8 (1 marks) F (s6) = 3 (1 marks)
  • 2. Suppose that after performing selection, we get the following population. s1` = 1111010101 (s1) s2` = 1110110101 (s3) s3` = 1110111101 (s5) s4` = 0111000101 (s2) s5` = 0100010011 (s4) s6` = 1110111101 (s5) e) Apply single point cross over for the couples (s1`, s3`) and (s2`, s6`) at the points 3 and 6 respectively (6 marks) For couple (s1`, s3`): s1`` = 1110111101 (1.5 marks) s3`` = 1111010101 (1.5 marks) For couple (s2`, s6`): s2`` = 1110111101 (1.5 marks) s6`` = 1110110101 (1.5 marks) f) Mutate the derived population with 0.1 probability (3 marks) Derived population, s1`` = 1110111101 s2`` = 1110111101 s3`` = 1111010101 s4`` = 0111000101 s5`` = 0100010011 s6`` = 1110110101 Note: Select 6 (= 10 * 6 * 0.1) random digits and perturb. (0.5 * 6 marks). Following is just an example.
  • 3. s1``` = 1111111101 s2``` = 1100111101 s3``` = 1111000101 s4``` = 0111000001 s5``` = 0000010011 s6``` = 1110100101