Syntha Lab RU

Choosing items under the buying budget and the shelf: a greedy set and an exact scan

From a list of items (each taken whole) chooses the set with the highest expected margin under the buying budget and shelf limits: a greedy set by margin per unit of scarcity and the exact set by scan, the gap between them, the use of the budget and the shelf and the value of an extra 10% of budget.

Assortment and sizes For whom: Category managers and buyers who choose items under a budget and a shelf.

Calculate on your data →

At a glance

What question does it answer?
Which items to take whole so that expected margin is highest under the budget and shelf limits and how far the simple greedy layout falls short of the best.
What data is needed?
Cost, expected margin and shelf room for each item.
How to read the result?
Example on the default values (14 items, a budget of 6 m, a shelf of 40): the greedy set gives a margin of RUB 3.49 million, the best set of the scan RUB 3.66 million (a gap of 4.6%). An extra 10% of budget gives RUB 3.96 million, 10% less loses RUB 350,000. Example on the default values: Margin of the greedy set: RUB 3.49 million; Margin of the best set (exact scan): RUB 3.66 million; Gap of the greedy set to the best: 4.6%; Margin when selecting only by margin per rouble of buying: RUB 3.4 million. The figures are illustrative: enter your own to see your result.

Why and how to reason

Budget and shelf are limited, and there are more items than can be bought and placed. We need to choose a set with the highest expected margin. This is a knapsack problem: each item is taken whole (you cannot buy half a coat), and has two prices: money and space. The greedy method sorts items by margin per “unit of scarcity” (margin ÷ (buy ÷ budget + space ÷ shelf)) and takes while they fit. It is fast but not always optimal: a good item may not fit because an expensive one took the budget. The exact method tries combinations and finds the best. In the example with a budget of 6 million and a shelf of 40: the greedy set is 3.49 million, the exact 3.66 million, a gap of 4.6%. The calculation also shows the price of the constraints: a budget plus 10% adds 300 thousand, minus 10% removes 350 thousand.

When to use it

It is useful when forming a buy and allocation under strict budget and shelf limits, especially for expensive items and capsules. Do not use it for mass cheap items: ranking by margin will do there. Assumptions: the expected margin of an item is known and independent of the set, items are indivisible, mandatory ones are always taken, the number of items is limited for exact search. The calculation is also handy as an argument in a talk with finance: it shows what additional budget would give.

How to read the result

Compare the two margins: greedy and exact. A gap of 4.6% means the simple rule loses almost half a million, and the exact set should be used. Budget use (100%) and shelf use (80%) show which constraint binds: the budget. The price of an extra 10% of budget (300 thousand) helps decide whether to ask for more money: compare with the cost of obtaining it. Margin when selecting only by margin per rouble of buying (3.40 million) is lower than the exact set because it ignores the shelf. It is worth checking the composition of the best set by common sense: is it skewed toward one category.

Common mistakes

Entering margin from a “best scenario”, not marking mandatory items, setting shelf in different units, ignoring the dependency of items (complements, substitutes). If there are many items, exhaustive search may be slow: shorten the list by excluding clearly weak ones. Do not enter margin as a category average: it differs between items, and the set will turn out random.

What data is needed?

  • Cost, expected margin and shelf room for each item.
  • The buying budget and the shelf size.
  • Must-have items.

Inputs

FieldUnitValue in the exampleMeaning
Buying budget₽6,000,000How much can be spent on buying these items, at cost excl. VAT. The example value is illustrative.
Shelfshelf units40How much room on the shelf or rails: linear meters, sections or cells; items in the table take the same. Empty: the shelf does not limit. Footwear, accessories and children’s have their own values: take the category data.

How it is calculated

StepFormula
Limitsthe sum of buying ≤ budget; the sum of room ≤ shelf; must-haves are always taken
Greedy setmargin ÷ (cost ÷ budget + room ÷ shelf) in descending order; take while it fits
Exact seta scan of all combinations with pruning by the limits; at an equal margin the cheaper is taken
Value of the budgetthe same scan at a budget ×1.1 and ×0.9

Worked numbers

Default values from the app; in the interactive version you enter your own.

Margin of the greedy set
3.49 m ₽
Margin of the best set (exact scan)
3.66 m ₽
Gap of the greedy set to the best
4.6 %By how much the greedy set is poorer than the best in margin.
Margin when selecting only by margin per rouble of buying
3.4 m ₽A simple rule that ignores the shelf.
Budget used (best set)
6 m ₽
Share of the budget
100 %
Shelf used (best set)
32
Items in the best set
12
Margin with a budget 10% larger
3.96 m ₽Shows the value of extra money: the margin gain over the best set.
Margin lost with a budget 10% smaller
350,000 ₽
Margin of the sets
Bar chart: Greedy set 3.49m, Best set 3.66m, Only by margin per rouble 3.4m01m2m3m4mGreedy setGreedy setMargin: 3.49m3.49mBest setBest setMargin: 3.66m3.66mOnly by margin per roubleOnly by margin perroubleMargin: 3.4m3.4m₽
Data as a table
MeasureMargin
Greedy set3.49m
Best set3.66m
Only by margin per rouble3.4m

Items and choice

ItemCostMarginMargin per roubleShelfGreedyBest
Wool coat1.18 m ₽640,000 ₽0.546——
Down jacket960,000 ₽580,000 ₽0.65yesyes
Basic jeans *520,000 ₽310,000 ₽0.63yesyes
Evening dress740,000 ₽460,000 ₽0.624yesyes
Cotton shirt380,000 ₽230,000 ₽0.612yesyes
Wool sweater610,000 ₽350,000 ₽0.573yesyes
Office trousers450,000 ₽260,000 ₽0.583—yes
Basic T-shirt *240,000 ₽170,000 ₽0.711yesyes
Midi skirt410,000 ₽270,000 ₽0.662yesyes
Scarf150,000 ₽120,000 ₽0.81yesyes
Belt130,000 ₽90,000 ₽0.691yes—
Bag820,000 ₽480,000 ₽0.594yesyes
Hat160,000 ₽100,000 ₽0.631yesyes
Cardigan560,000 ₽330,000 ₽0.593yesyes

The margin of each item is your estimate including the leftover; the method chooses a set from these numbers and is no better than they. Demand for items is taken as independent: duplicate items (substitutes) choose by hand. For footwear count the shelf in pairs and lasts, for accessories in hooks and cells, for children’s in rows.

The greedy set is poorer than the best by 170,000 ₽: take the scan set.

Nuances and limits

  • Trusting an item’s margin as fact: it is an estimate and the set is no better than it.
  • Taking substitute items together: demand is split between them.
  • Not counting the shelf: a set that looks good by margin may not fit.

Terms used

Calculate on your data →