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 yP(late>=y)expected revenue (late demand mean 5)
01.000020350
10.993320763
20.959621247
30.875321692
40.735021931
50.559521807
60.384021252
70.237820308
80.133419073
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