- Amalul Anugrah Amin (1103213054)
- Faraday Barr Fatahillah (1103213028)
- Purwantoro Aji Nugroho (1103213002)
In a Knapsack problem, Bobe wants to go to the office carrying a bag. He has three options for bags with maximum weights of 3kg, 4kg, and 5kg, respectively.
The problem is that Bobe wants to bring some essential items to the office, but these items must fit into one of the available bags. Let's create a genetic algorithm related to the issue Bobe is facing, and implement this algorithm for each bag he can take to the office.
Here is the list of items that Bobe can bring:
| Code | Item | Weight(g) | Priority |
|---|---|---|---|
| B1 | Laptop Charger | 1000 | 8 |
| B2 | Laptop | 3000 | 9 |
| B3 | Power Bank | 200 | 6 |
| B4 | Phone Charger Pouch | 100 | 7 |
| B5 | ANC Headset | 400 | 5 |
| B6 | Earbuds | 100 | 4 |
| B7 | Wireless Mouse | 50 | 7 |
| B8 | Flash Drive | 10 | 6 |
| B9 | Keyboard | 500 | 4 |
| B10 | Notebook | 100 | 2 |
| B11 | Pencil Case | 200 | 1 |
| B12 | Water Bottle | 1500 | 5 |
| B13 | Umbrella | 700 | 6 |
| B14 | USB Hub | 100 | 5 |
| B15 | Medicinal Pouch | 600 | 6 |
| B16 | Sunscreen Bottle | 400 | 2 |
Now, let's create a genetic algorithm to solve this Knapsack problem for each available bag.