The University of Edinburgh · FACULTY OF MATHEMATICS

MATH10065 Chap.4 Resource Allocation and Knapsack Models

- one subject, every graph, every model, every mark
5 Chapters2-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 4 of 10 · MATH10065

Resource Allocation and Knapsack Models

Carry remaining capacity as the state

A resource-allocation problem distributes a finite quantity across activities. Before each activity, the state records remaining capacity. The decision assigns some of that capacity now, and the next state subtracts the allocation.

Immediate return comes from the activity's discrete return table.

Compare every feasible split

For each current allocation, add immediate return to the optimal value of the remaining capacity at the next stage. Maximise across feasible allocations and store both the best value and allocation.

Unused capacity can be optimal unless exact allocation is required.

Recognise knapsack variants

Zero-one knapsack admits at most one copy of each item; bounded and unbounded variants change the decision domain. Item weight and capacity share a unit, while item value belongs to the objective.

A policy is recovered by following stored allocations and updating the remaining capacity stage by stage.

Read return tables discretely

Do not interpolate between listed allocations unless the model explicitly permits it. Gains from an additional resource unit can rise or fall, so a constant marginal-return assumption may miss the optimum.

Enumerate every feasible current allocation, including zero, and carry the exact remainder into the next-stage lookup.

Preserve ties during recovery

Two allocations can produce the same best value. Store both until an authorised secondary criterion distinguishes them. A later implementation cost, restriction or fairness rule may select between tied policies.

If no secondary objective exists, report alternatives rather than creating a preference from row order.

Connect values to the final plan

Starting with total capacity, apply the stored first allocation and subtract it. Continue using the new remainder until every activity is processed. Sum the chosen activity returns independently and compare that total with the initial value-function entry.

This catches a policy accidentally read from the wrong capacity row.

In this chapter

What this chapter covers

  • 01

    Remaining capacity

  • 02

    Return table

  • 03

    Allocation recurrence

  • 04

    Knapsack choice

  • 05

    Policy recovery

Worked example · free

Allocate five training slots

Q [6 marks]. Returns for A by slots 0 to 5 are 0,7,12,15,17,18; for B they are 0,5,11,16,20,23. Find the best five-slot split. This mark allocation is not an official assessment scheme; it separates enumeration, valuation and reporting.
Capacity becomes the next state.Capacity becomes the next state. Each current allocation leaves a different remainder, and the future value is looked up using that remainder.capacity 5before stageallocate 2remain 3allocate 4remain 1future valuefrom remainder
Capacity becomes the next state. Each current allocation leaves a different remainder, and the future value is looked up using that remainder.
  • 2Enumerate splits.
  • 2Add returns.
  • 2Report allocation.
Totals for A allocations 0 to 5 are 23,27,32,26,22,18. Allocate 2 to A and 3 to B for return 32.
Sia tip — Report the argmax allocation, not only its value.
Glossary

Key terms

Capacity State
Capacity State records the resource remaining before the current allocation, determines which discrete choices are feasible and indexes the future-value entry used after the selected allocation is subtracted.
Return Table
A Return Table gives the contribution from feasible discrete allocations and must be read at listed quantities without unstated interpolation between resource levels.
Knapsack Model
A Knapsack Model selects items subject to finite capacity and a stated zero-one, bounded or unbounded multiplicity rule.
FAQ

Resource Allocation and Knapsack Models FAQ

Can an optimal allocation leave capacity unused?

Yes, unless the model requires exact use. If remaining options add little value, violate limits or consume capacity needed elsewhere, the maximum-return policy can leave slack capacity. The objective rewards return rather than resource consumption by itself.

What should I do when two allocations tie?

Retain both argmax policies until a legitimate secondary criterion is supplied. Choosing the first row introduces an unstated preference. A later requirement, risk measure or implementation constraint may distinguish policies that share the same objective value.

How is allocation dynamic programming related to knapsack?

Both use remaining capacity as a state and compare current value with future value from the remainder. Knapsack restricts item selection according to its zero-one, bounded or unbounded variant, while a general allocation table permits listed resource quantities.

Study strategy

Exam move

Create a compact return table and calculate one column of candidate totals for each remaining capacity. Hide the chosen-allocation column, recover the policy from the values and check that allocations never drive capacity below zero. Begin with two activities so every split can be enumerated, then add a third stage and use stored future values. Mark ties rather than selecting the first row.

Compare zero-one, bounded and unbounded item rules by writing the allowed decision set before the recurrence. When a capacity unit remains unused, verify whether exact allocation was required instead of treating slack as automatic failure. Recover the full plan from total capacity, subtracting each chosen allocation and checking the next lookup row. Sum the selected returns independently.

Finish with a changed capacity that creates a tie, and explain which additional criterion would be needed to select one implementation without changing the stated objective. Build one table with diminishing marginal returns and another with irregular increments so interpolation is visibly unsafe. Remove an activity limit and note how the feasible decision set changes.

For knapsack, separate item weight, value and multiplicity in three columns. This prevents a high-value item from being selected when its weight exceeds the current remainder. State any unused capacity in the conclusion rather than hiding it.

Working through Resource Allocation and Knapsack Models in MATH10065? Sia is AskSia’s AI Mathematics tutor — ask any MATH10065 Resource Allocation and Knapsack Models question and get a clear, step-by-step explanation grounded in how MATH10065 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 10 of your subjects at The University of Edinburgh, plus 1,000+ more Bibles across the AskSia library.
Sia - your MATH10065 tutor, unlimited, worked the way the exam marks it
The full 2-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works