36:
in which the goal is to fill a container (the "knapsack") with fractional amounts of different materials chosen to maximize the value of the selected materials. It resembles the classic
293:
343:
189:
139:
588:
528:
242:
40:, in which the items to be placed in the container are indivisible; however, the continuous knapsack problem may be solved in
298:
144:
101:
48:. It is a classic example of how a seemingly small change in the formulation of a problem can have a large impact on its
17:
64:
of the knapsack, together with a collection of materials, each of which has two numbers associated with it: the weight
33:
360:, that considers the materials in sorted order by their values per unit weight. For each material, the amount
60:
An instance of either the continuous or classic knapsack problems may be specified by the numerical capacity
49:
484:
524:
518:
556:
488:
353:
37:
568:
564:
449:
41:
544:
514:
357:
582:
239:
to be in the range from 0 to 1. In this case the capacity constraint becomes
29:
523:, Algorithms and Combinatorics, vol. 21, Springer, pp. 459–461,
560:
45:
517:; Vygen, Jens (2012), "17.1 Fractional Knapsack and Weighted Median",
432:
Because of the need to sort the materials, this algorithm takes time
73:
of material that is available to be selected and the total value
493:
Algorithm Design: Foundations, Analysis, and
Internet Examples
371:
If the sum of the choices made so far equals the capacity
448:
materials. However, by adapting an algorithm for finding
230:
Some formulations of this problem rescale the variables
209:; the continuous knapsack problem differs by allowing
301:
245:
191:
In the classic knapsack problem, each of the amounts
147:
104:
98:
of each material, subject to the capacity constraint
352:The continuous knapsack problem may be solved by a
337:
287:
183:
133:
82:of that material. The goal is to choose an amount
520:Combinatorial Optimization: Theory and Algorithms
491:(2002), "5.1.1 The Fractional Knapsack Problem",
547:(1957), "Discrete-variable extremum problems",
389:between the sum of the choices made so far and
452:, it is possible to solve the problem in time
295:and the goal is to maximize the total benefit
414:In the remaining case, the algorithm chooses
8:
288:{\displaystyle \sum _{i}x_{i}w_{i}\leq W,}
495:, John Wiley & Sons, pp. 259–260
326:
316:
306:
300:
270:
260:
250:
244:
172:
162:
152:
146:
119:
109:
103:
44:whereas the classic knapsack problem is
469:
367:is chosen to be as large as possible:
7:
509:
507:
505:
503:
479:
477:
475:
473:
338:{\displaystyle \sum _{i}x_{i}v_{i}.}
184:{\displaystyle \sum _{i}x_{i}v_{i}.}
134:{\displaystyle \sum _{i}x_{i}\leq W}
218:to range continuously from zero to
14:
141:and maximizing the total benefit
1:
356:, first published in 1957 by
18:theoretical computer science
26:fractional knapsack problem
22:continuous knapsack problem
605:
589:Combinatorial optimization
400:, then the algorithm sets
375:, then the algorithm sets
34:combinatorial optimization
50:computational complexity
200:must be either zero or
339:
289:
185:
135:
340:
290:
186:
136:
561:10.1287/opre.5.2.266
485:Goodrich, Michael T.
299:
243:
145:
102:
549:Operations Research
24:(also known as the
545:Dantzig, George B.
385:If the difference
348:Solution technique
335:
311:
285:
255:
181:
157:
131:
114:
56:Problem definition
489:Tamassia, Roberto
444:) on inputs with
302:
246:
148:
105:
596:
573:
571:
541:
535:
533:
511:
498:
496:
481:
450:weighted medians
393:is smaller than
354:greedy algorithm
344:
342:
341:
336:
331:
330:
321:
320:
310:
294:
292:
291:
286:
275:
274:
265:
264:
254:
238:
226:
217:
208:
199:
190:
188:
187:
182:
177:
176:
167:
166:
156:
140:
138:
137:
132:
124:
123:
113:
97:
81:
72:
63:
38:knapsack problem
604:
603:
599:
598:
597:
595:
594:
593:
579:
578:
577:
576:
543:
542:
538:
531:
515:Korte, Bernhard
513:
512:
501:
483:
482:
471:
466:
440: log
426:
419:
405:
398:
382: = 0.
380:
365:
350:
322:
312:
297:
296:
266:
256:
241:
240:
236:
231:
224:
219:
215:
210:
206:
201:
197:
192:
168:
158:
143:
142:
115:
100:
99:
95:
88:
83:
79:
74:
70:
65:
61:
58:
42:polynomial time
12:
11:
5:
602:
600:
592:
591:
581:
580:
575:
574:
536:
529:
499:
468:
467:
465:
462:
430:
429:
424:
417:
412:
403:
396:
383:
378:
363:
358:George Dantzig
349:
346:
334:
329:
325:
319:
315:
309:
305:
284:
281:
278:
273:
269:
263:
259:
253:
249:
234:
222:
213:
204:
195:
180:
175:
171:
165:
161:
155:
151:
130:
127:
122:
118:
112:
108:
93:
86:
77:
68:
57:
54:
13:
10:
9:
6:
4:
3:
2:
601:
590:
587:
586:
584:
570:
566:
562:
558:
554:
550:
546:
540:
537:
532:
530:9783642244889
526:
522:
521:
516:
510:
508:
506:
504:
500:
494:
490:
486:
480:
478:
476:
474:
470:
463:
461:
459:
455:
451:
447:
443:
439:
435:
427:
421: =
420:
413:
410:
407: =
406:
399:
392:
388:
384:
381:
374:
370:
369:
368:
366:
359:
355:
347:
345:
332:
327:
323:
317:
313:
307:
303:
282:
279:
276:
271:
267:
261:
257:
251:
247:
237:
228:
225:
216:
207:
198:
178:
173:
169:
163:
159:
153:
149:
128:
125:
120:
116:
110:
106:
96:
89:
80:
71:
55:
53:
51:
47:
43:
39:
35:
31:
27:
23:
19:
552:
548:
539:
519:
492:
457:
453:
445:
441:
437:
433:
431:
422:
415:
408:
401:
394:
390:
386:
376:
372:
361:
351:
232:
229:
220:
211:
202:
193:
91:
84:
75:
66:
59:
25:
21:
15:
555:: 266–277,
32:problem in
30:algorithmic
464:References
304:∑
277:≤
248:∑
150:∑
126:≤
107:∑
583:Category
28:) is an
569:0089098
46:NP-hard
567:
527:
20:, the
525:ISBN
557:doi
460:).
16:In
585::
565:MR
563:,
551:,
502:^
487:;
472:^
227:.
90:≤
52:.
572:.
559::
553:5
534:.
497:.
458:n
456:(
454:O
446:n
442:n
438:n
436:(
434:O
428:.
425:i
423:w
418:i
416:x
411:.
409:d
404:i
402:x
397:i
395:w
391:W
387:d
379:i
377:x
373:W
364:i
362:x
333:.
328:i
324:v
318:i
314:x
308:i
283:,
280:W
272:i
268:w
262:i
258:x
252:i
235:i
233:x
223:i
221:w
214:i
212:x
205:i
203:w
196:i
194:x
179:.
174:i
170:v
164:i
160:x
154:i
129:W
121:i
117:x
111:i
94:i
92:w
87:i
85:x
78:i
76:v
69:i
67:w
62:W
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.