What does Computing the Rhythm of Private-Message Sales conclude, in numbers, about “Bubble Splitting: Working-Memory Capacity, Interruption Cost and the Optimal Length of a Private Message by Dynamic Programming”?
Answer: Chapter 1 splits an illustrative 184-character quote by dynamic programming into 5 bubbles at a cost of 46.52, against 142.00 for one sentence per bubble.
Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs; it is not individual legal, compliance or business advice, and it discusses only closing that keeps the rules. Chapter 1 splits an illustrative 184-character quote by dynamic programming into 5 bubbles at a cost of 46.52, against 142.00 for one sentence per bubble.
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: 142.00, 184, 46.52
| message of 184 hanzi in 12 clauses | |
| optimal | 5 bubbles, lengths [23, 39, 45, 46, 31], cost 46.52 |
| split bubbles cost | |
| one bubble | 1 524.40 |
| one clause per bubble | 12 142.00 |
| cut at 50 hanzi | 3 52.60 |
| dynamic programming | 5 46.52 |
| interruption cost A and the optimal split: | |
| A | 1.0: 5 bubbles, mean 36.8 hanzi |
| A | 6.0: 5 bubbles, mean 36.8 hanzi |
| A | 12.0: 3 bubbles, mean 61.3 hanzi |
| A | 30.0: 3 bubbles, mean 61.3 hanzi |
Show the full program
# Chapter 1. p11: optimal split of one private message into bubbles
# Model (illustrative parameters): a quote message is a list of clauses
# with lengths in hanzi and a boundary strength after each clause
# (0 = inside a sentence, 1 = sentence end, 2 = topic change). A bubble
# costs A (one more interruption) plus an overload penalty K * (L - C)^2
# / C when its length L exceeds the chunk capacity C, plus W * (2 - b)
# for ending on a weak boundary b. Dynamic programming finds the split
# of least total cost; three naive splits are scored for comparison.
import math
CLAUSES = [14, 9, 22, 17, 11, 26, 8, 19, 15, 12, 21, 10]
BOUND = [0, 1, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2]
A, C, K, W = 6.0, 40, 1.0, 5.0
def bubble_cost(i, j, a=A):
length = math.fsum(CLAUSES[i:j])
over = max(0.0, length - C)
return a + K * over * over / C + W * (2 - BOUND[j - 1])
def best_split(a=A):
n = len(CLAUSES)
best = [0.0] + [math.inf] * n
cut = [0] * (n + 1)
for j in range(1, n + 1):
for i in range(j):
c = best[i] + bubble_cost(i, j, a)
if c < best[j] - 1e-12:
best[j], cut[j] = c, i
parts, j = [], n
while j > 0:
parts.append((cut[j], j))
j = cut[j]
return best[n], parts[::-1]
def score(parts):
return math.fsum(bubble_cost(i, j) for i, j in parts)
def lengths(parts):
return [int(math.fsum(CLAUSES[i:j])) for i, j in parts]
total = int(math.fsum(CLAUSES))
cost, parts = best_split()
print("message of {} hanzi in {} clauses".format(total, len(CLAUSES)))
print("optimal: {} bubbles, lengths {}, cost {:.2f}".format(
len(parts), lengths(parts), cost))
one = [(0, len(CLAUSES))]
each = [(k, k + 1) for k in range(len(CLAUSES))]
fixed, start, acc = [], 0, 0
for k, ln in enumerate(CLAUSES):
acc += ln
if acc >= 50 or k == len(CLAUSES) - 1:
fixed.append((start, k + 1))
start, acc = k + 1, 0
print("{:<26}{:>8}{:>10}".format("split", "bubbles", "cost"))
for name, p in (("one bubble", one), ("one clause per bubble", each),
("cut at 50 hanzi", fixed), ("dynamic programming", parts)):
print("{:<26}{:>8}{:>10.2f}".format(name, len(p), score(p)))
print("interruption cost A and the optimal split:")
for a in (1.0, 6.0, 12.0, 30.0):
c, p = best_split(a)
print(" A = {:>4.1f}: {} bubbles, mean {:.1f} hanzi".format(
a, len(p), total / len(p)))Single source and citation
Fan, Y. (2026). Instant-Messaging Bubble Rhythm, Read-No-Reply Icebreaking Games and High-Ticket Closing in Private Messages (Version 1.0.0), Chapter 1: Bubble Splitting: Working-Memory Capacity, Interruption Cost and the Optimal Length of a Private Message by Dynamic Programming. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-145 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026145,
author = {Fan, Yafu},
title = {Instant-Messaging Bubble Rhythm, Read-No-Reply Icebreaking Games and High-Ticket Closing in Private Messages},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 2 · First-Reply Latency: the Cooling Curve of an Inquiry, Night-Time Auto-Acknowledgements and Erlang C Staffing
- Chapter 3 · Read but No Reply: Bayesian Updating on Receipts, the Timing of an Icebreaker and a Game of Commitment
- Chapter 4 · Laying the Ground for a Two-Track Quote: Mixed Logit, the Compromise Effect and Anchoring on the Higher Track
- Chapter 5 · Closing a High-Ticket Sale: Refundable Deposits, Default Options and the Threshold for Handing Over to a Human
- Chapter 6 · Placed but Not Paid: Present Bias, Gentle Reminder Pulses and a Year's Account of a Threatening Tone
- Chapter 7 · The Classics Examined: the Chapter on Assessing Feelings in the Guiguzi and Bacon's Of Negotiating
- Chapter 8 · Practice and Refutation: a Closing Skill Pack for Customer Service, a Rule Replay and Pre-Registered Tests