Combinatorial optimization: Knapsack problem 3

Aus Operations-Research-Wiki
Version vom 1. Juli 2013, 13:20 Uhr von Hellwich (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „ == 1. Theory == Given an amount of objects (xj) and every object having a certain value (cj) and using a certain capacity (aj), the combinatorial optimizatio…“)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Wechseln zu: Navigation, Suche

1. Theory

Given an amount of objects (xj) and every object having a certain value (cj) and using a certain capacity (aj), the combinatorial optimization determines the subset of these elements with that maximize the sum of the items value under integer consideration of the variables for a given capacity limit.

In formal terms this leads to:

Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): \max z=\sum c_{j}x_{j}


Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): \sum x_{j}a_{j}\leq b


xj = 0 or 1

cj = value of object j

aj = needed capacity of object j

b = existing capacity

The original problem was described in the process of packing a backpack (knapsack). The backpack has a certain capacity (e.g. 60 pounds) and one has to choose which things he wants to pack into the bag as all the things won´t fit in. As every item has a certain value and is using a certain capacity, one has to find the combination of items that maximizes the item´s value sum without exceeding the capacity limit of the backpack. The solution has to be integer as an item either fits in into the backpack without exceeding the capacity limit, or it does not fit in because it exceeds the capacity limit of the backpack.


2. Example

A student is facing the time in which s/he has to prepare and take exams. S/He has examined that in order to prepare properly (i.e. to pass the exam) s/he has a total time capacity of 100 preparation hours. As the student is already in 10th semester of her/his Bachelor s/he decided that s/he wants to gain as many credits as possible in the upcoming exam time. The student has some options concerning how many and which exams to write. S/He examined that s/he has a total number of 7 exams out of which s/he can choose in order to maximize the amount of credits gained in the upcoming exam period. Different exams need different preparation times and are weighted with different amounts of credits. The student also decided that the preparation time for a particular exam is either fulfilled completely or the exam is not taken at all. The ambitious student now is wondering which exams s/he should take in order to maximize the amount of credits that s/he can gain in this exam period without violating the total preparation hour’s capacity.

Can you help the student?