Skip to content
ml-recall

#knapsack

1 question from Genetic Algorithms

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Single choice

mediumAI-checkedGenetic Algorithms

A genetic algorithm solves a 0/1 knapsack problem with capacity 12. Each chromosome is a bit string whose ii-th bit says whether item ii is packed. The fitness is the total value of the packed items if their total weight fits, and 0 otherwise.

Item 1 2 3 4 5
Value 10 7 4 9 3
Weight 5 4 2 6 1

Which chromosome has the highest fitness?

Choose one option