What does Code-Switching Thresholds and Monolingual Precision conclude, in numbers, about “An Upper Bound on Insertion Density, and the Register Signal”?
Answer: Insertion density is not a switch but a continuous quantity. The register benefit has diminishing returns, the readability loss accelerates, and the cost of decoding failure is proportional to density and to the share of readers who do not know the words. Under illustrative parameters, at a coverage of 0.95 the optimum is 2.16 inserted words per hundred characters with an upper bound of 5.10, and at a coverage of 0.50 or below nothing should be inserted. The register signal carried by insertion can be measured as mutual information, and in the synthetic table it removes only a small part of the uncertainty about register. Under a reliability requirement for single messages the allowed density is far below the average optimum, and one-to-one messages should take the smaller of the two.
Scope of the numbers: Parameters are illustrative and all calculations are generated by the book's programs; nothing corresponds to a real customer, conversation or sale, and Malay, Hokkien, Cantonese, English and Mandarin are treated as equals. This is not linguistic doctrine and not business advice to any individual or company.
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: 0.50, 0.95, 2.16, 5.10
| p | d* | U(d*) | d_max | per 300 chars at d* |
| 0.95 | 2.16 | 2.104 | 5.10 | 6.5 |
| 0.85 | 1.32 | 1.075 | 3.10 | 3.9 |
| 0.70 | 0.53 | 0.280 | 1.19 | 1.6 |
| 0.50 | 0.00 | 0.000 | 0.00 | none |
| insertion pays at all only if p > 1 - A/C = 0.50 |
Show the full program
# Chapter 5. p51: an optimum and an upper bound for insertion density.
# Utility per 100 characters with d insertions:
# U(d) = A ln(1 + d) - B d^2 - C (1 - p) d
# A: register signal with diminishing returns; B: readability penalty;
# C: expected cost of each word a fraction 1 - p of readers cannot decode.
# A = 3.0, B = 0.15, C = 6.0 are illustrative (author's hypothesis).
# d* solves U'(d) = 0; d_max is the positive root of U(d) = 0, the density
# beyond which inserting is worse than writing in one language.
import math
A, B, C = 3.0, 0.15, 6.0
def u(d, p):
return A * math.log1p(d) - B * d * d - C * (1 - p) * d
def du(d, p):
return A / (1 + d) - 2 * B * d - C * (1 - p)
def bisect(f, lo, hi):
for _ in range(200):
mid = (lo + hi) / 2
if f(lo) * f(mid) <= 0:
hi = mid
else:
lo = mid
return (lo + hi) / 2
if __name__ == "__main__":
print(" p d* U(d*) d_max per 300 chars at d*")
for p in (0.95, 0.85, 0.70, 0.50):
if du(0.0, p) <= 0:
print("{:>5.2f} 0.00 0.000 0.00 none".format(p))
continue
ds = bisect(lambda d: du(d, p), 0.0, 20.0)
dm = bisect(lambda d: u(d, p), ds, 40.0)
print("{:>5.2f} {:>6.2f} {:>8.3f} {:>7.2f} {:.1f}".format(
p, ds, u(ds, p), dm, 3 * ds))
pc = 1 - A / C
print("insertion pays at all only if p > 1 - A/C = {:.2f}".format(pc))Single source and citation
Fan, Y. (2026). Information Theory of Code-Switching, Lexical-Gap Compensation and Monolingual Precision Equivalence in Multilingual Markets (Version 1.0.0), Chapter 5: An Upper Bound on Insertion Density, and the Register Signal. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-381 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026381,
author = {Fan, Yafu},
title = {Information Theory of Code-Switching, Lexical-Gap Compensation and Monolingual Precision Equivalence in Multilingual Markets},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Not Laziness: Switch Points Obey Two Grammars
- Chapter 2 · The Information at a Switch Point: Surprisal, Word Length and Uniform Density
- Chapter 3 · The Bit Ledger and the Degree of a Lexical Gap
- Chapter 4 · The Audience-Coverage Threshold: When an Inserted Word Becomes a Decoding Failure
- Chapter 6 · Monolingual Constructional Equivalence: Precision Without Insertion
- Chapter 7 · Classical Sources: Yan Fu's Three Difficulties, Confucius on Names, Jerome's Sense for Sense and Schleiermacher's Two Paths
- Chapter 8 · Field Tools and Checker Specifications: the Insertion Ledger, Four-Kit Checkers and a Pre-registered Test