What does Packing, Refund Ladders and Depreciation for Studios conclude, in numbers, about “Online Arrivals: Greedy Placement, Littlewood Protection Levels and the Minimum Booking Length”?
Answer: Chapter 2 shows that placement rules which spread the load evenly do worst, and that holding 4 blocks for higher-paying orders by Littlewood's rule earns 1581 yuan more.
Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs; the book is not individual tax, legal or investment advice. Marked boxes separate published evidence, runnable Python calculations (22 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 1581
| fare ratio 1600/2600 = 0.6154 | ||
| hold y | P(late>=y) | expected revenue (late demand mean 5) |
| 0 | 1.0000 | 20350 |
| 1 | 0.9933 | 20763 |
| 2 | 0.9596 | 21247 |
| 3 | 0.8753 | 21692 |
| 4 | 0.7350 | 21931 |
| 5 | 0.5595 | 21807 |
| 6 | 0.3840 | 21252 |
| 7 | 0.2378 | 20308 |
| 8 | 0.1334 | 19073 |
| best hold 4 (Littlewood says 4), gain over 0: 1581 yuan | ||
| if late mean is really 3: hold 2, cost of holding 4 = 591 | ||
| if late mean is really 7: hold 6, cost of holding 4 = 672 |
Show the full program
# Chapter 2. p22: how many Saturday blocks to hold back (Littlewood).
# 12 half-day blocks (4 studios x 3 blocks of 4 hours). Package clients
# book early at 1600 yuan a block, demand Poisson(11); late commercial
# clients pay 2600 a block, demand Poisson(5), and arrive after the
# package clients. Holding back y blocks means selling at most 12 - y
# to packages. Littlewood's rule: protect the y-th block while
# P(late demand >= y) > 1600 / 2600. Exact expectation by enumeration.
# Prices and demand means are illustrative.
import math
CAP, PL, PH = 12, 1600, 2600
def pois(m, k):
return math.exp(-m + k * math.log(m) - math.lgamma(k + 1)) if m else (
1.0 if k == 0 else 0.0)
def revenue(y, ml, mh):
out = []
for dl in range(60):
lo = min(dl, CAP - y)
left = CAP - lo
eh = math.fsum(pois(mh, dh) * min(dh, left) for dh in range(60))
out.append(pois(ml, dl) * (PL * lo + PH * eh))
return math.fsum(out)
def littlewood(mh):
y = 0
while math.fsum(pois(mh, k) for k in range(y + 1, 80)) > PL / PH:
y += 1
return y
print("fare ratio {}/{} = {:.4f}".format(PL, PH, PL / PH))
print("hold y P(late>=y) expected revenue (late demand mean 5)")
best = None
for y in range(0, 9):
tail = math.fsum(pois(5, k) for k in range(y, 80))
r = revenue(y, 11, 5)
if best is None or r > best[1]:
best = (y, r)
print("{:6d} {:10.4f} {:10.0f}".format(y, tail, r))
print("best hold {} (Littlewood says {}), gain over 0: {:.0f} yuan".format(
best[0], littlewood(5), best[1] - revenue(0, 11, 5)))
for mh in (3, 7):
y = littlewood(mh)
loss = revenue(y, 11, mh) - revenue(littlewood(5), 11, mh)
print("if late mean is really {}: hold {}, cost of holding {} = {:.0f}"
.format(mh, y, littlewood(5), loss))Single source and citation
Fan, Y. (2026). One-Dimensional Time-Slot Packing for Multi-Format Studio Sets, Dynamic Cancellation-Option Ladders and Accelerated Depreciation of High-Wear Equipment (Version 1.0.0), Chapter 2: Online Arrivals: Greedy Placement, Littlewood Protection Levels and the Minimum Booking Length. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-173 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026173,
author = {Fan, Yafu},
title = {One-Dimensional Time-Slot Packing for Multi-Format Studio Sets, Dynamic Cancellation-Option Ladders and Accelerated Depreciation of High-Wear Equipment},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Time-Slot Packing: the 11/9 Bound of First Fit Decreasing, Exact Dynamic Programming and the Idle Share of Fragmented Calendars
- Chapter 3 · The Cancellation-Option Ladder: Pricing Each Step by the Chance of Resale, Service Escape and Seasonal Dynamic Ladders
- Chapter 4 · Overbooking as a Newsvendor Problem: the Marginal-Booking Rule, the Cost of Compensation and the Trap of Correlated No-Shows
- Chapter 5 · Accelerated Depreciation of High-Wear Equipment: Double Declining Balance, Units of Production, the Present Value of the Tax Shield and Economic Life
- Chapter 6 · Deposits and Damage Waivers: the Incentive-Compatibility Boundary under Moral Hazard and a Three-in-One Quotation Calculator
- Chapter 7 · Classical Sources: the Song Rental Office for State Houses and the Roman Contract of Hire
- Chapter 8 · Practice and Falsification: a Checklist for the Principal of a Venue, the Distilled Kit and a Pre-Registered Test