Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 : Create a 0 / 1 Knapsack problem by your own. There must be 8 different products ( A - H ) for

Question1:
Create a 0/1 Knapsack problem by your own. There must be 8 different products
(A-H) for your problem. You have to carry the different products in your bag in a way
such that the reward is maximized (set the reward by yourself) without exceeding
the weight limit (set the weight limit 12). You can carry an object exactly once but
you always have to carry the object labeled "H". Assuming you are asked to use
Genetic Algorithm for this problem, answer the following questions. [10]
Encode the problem and create an initial population of 4 different chromosomes.
Chromosome length must be 5.
Explain what would be an appropriate fitness function for this problem. Use the
fitness function and perform natural selection to choose the 2 fittest chromosomes.
Using the selected chromosomes perform a single-point crossover to get 2
offspring.
Perform mutation and check the fitness of the final offspring. Explain your work.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

Students also viewed these Databases questions