Knapsack Problemis one of the combinatorial optimization problems that often arise in everyday life, especially in making decisions about selecting goods with limited capacity. This study combines two previous studies that apply genetic algorithms to real cases: the selection of basic necessities and packaged fruits in limited containers. Genetic algorithms are used because they are flexible and able to find more than one optimal solution. The process includes the formation of an initial population, fitness evaluation, selection (roulette wheel), crossover, and mutation. From the two case studies analyzed, it was found that genetic algorithms consistently produce increased fitness between generations and are able to maximize the value of goods without exceeding capacity or budget limits. This study strengthens the potential of genetic algorithms as an effective method in solving Knapsack Problems based on real needs.
Copyrights © 2025