Move the zero-temperature walls from 16 lattice steps away to 32. If each cell update can err by 0.01 °C, the largest possible error in the center thermometer rises by about 0.02044 °C on these two grids. Repeat the doubling on larger and larger squares, keeping the same local tolerance, and that added allowance tends to 0.0203996 °C. Why should each doubling have a definite price?
What gets doubled?
Our thermometer reads the center cell minus the average of its four nearest neighbors. Every cell keeps half its temperature and takes one eighth from each of those neighbors. All cells update from the same old grid, and values immediately outside the square stay at zero. Begin with an exact grid. At each update, each cell may add any signed error between −ε and +ε.
Let Cmε be the least error allowance that covers every run length on an odd m × m square, m ≥ 3. The wall is d = (m + 1)/2 lattice steps from the center. Doubling d therefore takes a square of side m to a square of side 2m + 1. Here is what the exact backward calculation gives on a few such squares.
| Grid side m | Wall distance d | Factor Cm |
|---|---|---|
| 3 | 2 | 4.81250 |
| 7 | 4 | 7.06419 |
| 15 | 8 | 9.16249 |
| 31 | 16 | 11.21728 |
| 63 | 32 | 13.26095 |
The last two factors differ by 2.04366902 before rounding the displayed values. We will prove that the extra allowance on doubling tends to (8/e) log(2) ε ≈ 2.03995678ε. Here e is the base of the natural logarithm. The nine-cell calculation gives 77/16 exactly for the first row. To understand a whole family of grids, we need to recognize what its backward weights look like as the number of ticks grows.
Read the weights in a single heat pulse
Start at tick zero with one unit of heat at the center and zeros everywhere else. Call this initial array e₀. Write A for one averaging update, and ptd = Ate₀ for the resulting pulse on the square with wall distance d. Its entries tell us where each fraction of the original unit has gone.
Now compare the pulse before and after its first update. The center fell from 1 to 1/2, each neighboring cell rose from 0 to 1/8, and all other cells stayed at zero. Double the old value minus the new value at each location. We get 1 at the center and −1/4 at its four neighbors. These are exactly the final thermometer weights. In symbols, q = 2(I − A)e₀, where I leaves the grid alone.
Moving a reading backward through one tick applies the transpose of A to its weights. Here two adjacent cells send each other the same fraction, so A is symmetric. Applying it t times to q moves both copies of the pulse by t ticks. The weight of a cell error made t ticks before the reading is its entry in the array
wt = Atq = 2(ptd − pt+1d).
Thus a cell that is losing heat from the pulse has a positive backward weight. A cell gaining heat has a negative one. Give each allowed local error the sign of its weight to attain the largest reading error. Writing ‖v‖₁ for the sum of the absolute entries of an array v, the sharp factor after N updates is
Dtd = ptd − pt+1d,
Cm,N = 2 ∑t=0N−1 ‖Dtd‖₁.
The factors increase to Cm. The question about grid size has become a question about how much a heat pulse changes from tick to tick.
Where the logarithm comes from
First let the pulse spread on the infinite lattice with no walls. Denote it by pt and its change by Dt = pt − pt+1. Picture each unit of heat as the probability mass of a walker. In a tick it stays put with probability 1/2 and takes each cardinal step with probability 1/8. The variance of either coordinate increases by 1/4 per tick. After t ticks the width is of order √t in each direction, so the pulse occupies an area of order t. Spreading a fixed mass over that area suggests a profile of height 1/t in the scaled coordinate z = x/√t.
Try a Gaussian of mass one with the variances from our update. We can test its shape on the lattice before using it to estimate the error. Feed a Fourier wave of frequency θ = (θ₁, θ₂) through one tick. The two opposite shifts along each axis pair into a cosine. The wave keeps its shape and its amplitude is multiplied by
a(θ) = 1/2 + (cos θ₁ + cos θ₂)/4.
Near zero this is 1 − |θ|²/8 + O(|θ|⁴). The pulse is spread over √t cells in each direction, so test a wave of frequency η/√t with η fixed. After t ticks its multiplier tends to
a(η/√t)t → exp(−|η|²/8).
This is the Fourier transform of the proposed Gaussian in the scaled coordinate. At the original position x the density is gt(x) = [2/(πt)] exp(−2|x|²/t), where |x| is Euclidean distance from the center. Its height falls near the center and rises farther out. Differentiating gives the old density minus the new one per unit of time.
−∂gt(x)/∂t = t−2 F(x/√t),
F(z) = (2/π) exp(−2|z|²)(1 − 2|z|²).
How much change survives when we take absolute values? In polar coordinates u = 2|z|² has density exp(−u) under the unit-time Gaussian. The change switches sign at u = 1. Integrating (1 − u) exp(−u) from 0 to 1 gives 1/e. The exterior contributes another 1/e in magnitude. Since the scaled cell area is 1/t, the sum of absolute pulse changes is approximately 2/(et). Doubling to recover the thermometer weights gives 4/(et) per tick.
The wall becomes relevant on the time scale t ≈ d², when the width √t is comparable with its distance from the center. Adding 4/(et) through that many ticks gives (4/e) log(d²) = (8/e) log d, up to a bounded error. This explains the two factors of two in the answer. The thermometer doubles the change of the pulse, and doubling a distance multiplies its characteristic time by four.
To prove the prediction, three things need checking. Replacing a lattice pulse by a Gaussian must have a summable error. The wall must contribute a bounded correction, including all ticks after d². And to recover a definite cost per doubling, that correction must approach the same constant on successive squares.
Check the pulse estimate on the lattice
The Fourier check above identified the pulse profile at each fixed scaled frequency. To estimate the change in one tick, subtract the next multiplier from the present one. This gives (1 − a)at. We need an error estimate strong enough to sum over every cell.
In Fourier inversion set η = √t θ. For |η| ≤ t1/8, expanding log a shows that t(1 − a)at, evaluated at θ = η/√t, differs from (|η|²/8) exp(−|η|²/8) by at most
C t−1(1 + |η|⁶) exp(−c|η|²).
The constants c and C are positive and independent of t. The bound is integrable in η. For the rest of the integral, a(θ) ≤ exp(−c|θ|²) in a neighborhood of zero, and a is bounded strictly below one elsewhere on the frequency square [−π, π]². That part decays exponentially in a positive power of t. Inverting the leading multiplier gives the Gaussian profile F above. The area element contributes a factor 1/t, and undoing the multiplier scaling contributes another 1/t. Uniformly in the cell x,
Dt(x) = t−2F(x/√t) + O(t−3).
We still have to add over infinitely many cells. Inside the disk |x|² ≤ B t log(t + 1) there are O(t log(t + 1)) cells. Their combined error is O(t−2 log(t + 1)). Weighting them by |x|² instead gives O(t−1 log²(t + 1)). For the remaining cells use |Dt| ≤ pt + pt+1. Each coordinate is a sum of independent increments between −1 and 1. Hoeffding’s inequality bounds the mass outside the disk by O(t−5) for a sufficiently large fixed B. Even after weighting by |x|², this tail stays bounded, since a walk of t + 1 steps travels at most t + 1. The Gaussian tails obey the same bounds.
Finally the mesh of x/√t has spacing t−1/2. Replacing the Riemann sum for |F| by its integral costs O(t−1/2) before the overall 1/t factor. On each mesh cell the oscillation is at most its diameter times the maximum of |∇F| there, and those maxima decay like a polynomial times a Gaussian. Likewise the integral of |z|²|F(z)| is finite. This gives the two estimates needed to control the effect of a wall.
‖Dt‖₁ = 2/(et) + O(t−3/2),
∑x |x|² |Dt(x)| ≤ K.
One constant K works for all t ≥ 1. For the general local Gaussian approximation with finite differences, see Lawler and Limic, Random Walk: A Modern Introduction, Chapter 2, Exercise 2.11.
Account for the missing heat at the wall
Put the center at the origin. The interior cells satisfy |x|∞ < d, where |x|∞ is the larger absolute coordinate. To make a pulse vanish on the wall x₁ = d, put a copy with the opposite sign at (2d, 0). At the wall, the two pulses have equal magnitude because their centers are equally far away. Repeat across both pairs of walls. The copy displaced by 2dk, for k = (k₁, k₂) in ℤ², gets sign (−1)k₁+k₂.
Adding these signed copies inside the original square gives its pulse exactly. At tick zero there is just the center unit inside. The sum vanishes at each wall by pairing reflected terms, and each interior cell follows the original update because that update commutes with reflections and translations. These data determine the entire evolution. Subtracting successive pulses gives the same folding rule for Dtd.
The interiors of the translated squares are disjoint. Folding can reduce the sum of absolute values only through cells outside the center square or on its boundary lines. The triangle inequality gives
0 ≤ ‖Dt‖₁ − ‖Dtd‖₁
≤ 2 ∑|x|∞ ≥ d |Dt(x)| ≤ 2K/d².
The last inequality follows from the uniform bound ∑x |x|²|Dt(x)| ≤ K. Taking a larger K if necessary includes t = 0. Through the first d² ticks the total correction from folding is therefore bounded independently of d.
What happens after d² ticks?
From horizontal coordinate i, the expected time for that coordinate to hit either wall is 4(d² − i²). You can check this proposed quadratic directly. It is zero at ±d, and one update reduces its expected value by exactly 1 because the walker’s horizontal step has mean zero and variance 1/4. This verifies the mean hitting-time recurrence, whose finite boundary-value solution is unique. The vertical coordinate can hit a wall sooner, so its mean time to leave the square is at most 4d² from every cell.
A unit pulse’s remaining mass at tick s is its probability of surviving to that tick. Sum over s and you get its expected exit time. For a signed array v, the absolute sum after s ticks is at most the sum obtained by running its absolute entries forward. Applying the exit estimate to each starting cell gives
∑s ≥ 0 ‖Asv‖₁ ≤ 4d² ‖v‖₁.
At tick T = d² the folded change has absolute sum at most the free value, which is O(1/d²). Use that change as v. The factor 4d² cancels the 1/d², so the entire later contribution is bounded. The early folding error and the late tail together prove Cm = (8/e) log d + O(1). For a run of N ticks the same split gives
Cm,N = (4/e) log(1 + min{N, d²}) + O(1),
with one bounded error independent of both N and m.
Why doubling has a definite cost
A bounded remainder in the logarithmic law could still oscillate as the grid grows. To compare squares with wall distances d and 2d, we need the remainder to settle to the same constant. Subtract the part of each tick’s weight already accounted for by the free lattice. Define
Rd,t = ‖Dtd‖₁ − ‖Dt‖₁ for t < d²,
Rd,t = ‖Dtd‖₁ for t ≥ d².
Measure time in units of d² and distance in units of d. At a fixed scaled time s > 0, take t = ⌊sd²⌋ and y = x/d. The walls now sit at ±1. In a reflected copy indexed by k, the pointwise pulse estimate gives a limiting profile s−2F((y + 2k)/√s) for d⁴Dt(x + 2dk). Give each copy its reflection sign and call their sum Ls(y).
Ls(y) = ∑k ∈ ℤ² (−1)k₁+k₂ s−2F((y + 2k)/√s),
f(s) = ∫(−1,1)² |Ls(y)| dy.
Then d²‖Dtd‖₁ tends to f(s). To see this, keep finitely many copies first. Their approximation errors tend to zero uniformly as y ranges over the square. Multiplying the sum of their absolute combined weights by the mesh area 1/d² gives the integral. Next include the more distant copies. Those with |k|∞ > M lie at distance at least Md from the center and occupy disjoint cells. By the second-moment bound, their contribution to the scaled norm is at most K/M². We may thus pass from any fixed collection to the whole reflected pulse. Also d²‖Dt‖₁ tends to 2/(es).
There is enough control to integrate these limits over all scaled times. For s < 1, the bound on the loss under reflection gives d²|Rd,⌊sd²⌋| ≤ 2K. For s ≥ 1, the expected exit time is at most 4d² from every cell. By Markov’s inequality, after 8d² ticks at most half of a unit pulse remains in the square. Each such block therefore contracts the absolute sum of any signed field by at least a factor of two. Starting at t = d², where ‖Dd²d‖₁ = O(d−2), this bounds d²|Rd,⌊sd²⌋| by C exp(−cs) for s ≥ 1.
Each tick occupies an interval of width 1/d² in scaled time. Thus summing Rd,t over ticks is exactly integrating d²Rd,⌊sd²⌋ over s. Dominated convergence gives a finite limiting integral. Its integrand is f(s) − 2/(es) up to s = 1 and f(s) thereafter. This accounts for the whole boundary correction.
On the free lattice, the differences ‖Dt‖₁ − 2/(et) are summable. The harmonic sum through d² − 1 minus log(d²) also converges. Hence the free sum through that tick, less (4/e) log d, has a limit. Add the boundary correction and multiply by the thermometer’s factor of two. For a fixed constant β we obtain
Cm = (8/e) log d + β + o(1).
Doubling the wall distance takes the side from m to 2m + 1. The same β occurs at both sizes and cancels on subtraction. What remains tends to (8/e) log 2.
A guarantee you can use at any grid size
For a decision on a specific square, we can put explicit numbers in the bound. On one axis, an update B keeps half the mass and sends a quarter each way. Our two-dimensional update chooses one of the two axes with equal probability and applies B on it. After k updates on a single axis the kernel bk(j) is 4−k times the binomial coefficient “2k choose k + j.” Indeed, a step has the same distribution as the sum of two fair 0-or-1 variables minus one.
How far can that binomial row move in one tick? On the support of bk+1, the ratio bk(j)/bk+1(j) equals 2((k + 1)² − j²)/((k + 1)(2k + 1)). It decreases with |j|. The change bk − bk+1 is therefore nonnegative on one central interval [−r, r] and nonpositive beyond it. Its signed sum is zero. Twice the sum over that central interval gives its absolute sum. Terms in (I − B)bk telescope inside the interval, leaving just the difference between two neighboring edge weights.
‖bk − bk+1‖₁ = bk(r) − bk(r + 1)
= bk(r)(2r + 1)/(k + r + 1) ≤ 1/(k + 1).
The last inequality uses (2r + 1)bk(r) ≤ 1. Each of the 2r + 1 central entries has mass at least bk(r), and total mass is one.
Now condition on the number K of horizontal updates among t ticks. Given K, the two-axis pulse is the product of bK horizontally and bt−K vertically. After another horizontal update the absolute sum of the changes is at most 1/(K + 1), since the vertical factor sums to one. The vertical update gives the same bound on average by symmetry. Averaging the two choices and using K’s binomial distribution gives
‖Dt‖₁ ≤ E[1/(K + 1)]
= ∫₀¹ ((1 + x)/2)t dx ≤ 2/(t + 1).
Here 1/(K + 1) = ∫₀¹ xK dx. Reflection can only decrease the norm, so the same inequality holds on our square. Write Hn = 1 + 1/2 + ⋯ + 1/n. Summing the first N ticks and restoring the thermometer factor gives Cm,N ≤ 4HN.
For the all-time bound, stop the early sum at T = 4d² = (m + 1)². The mean exit-time estimate bounds the sum of all subsequent thermometer weights by 8d²‖DTd‖₁ ≤ 16d²/(T + 1) < 4. We have proved
Cm ≤ 4H(m+1)² + 4.
For a known run length use the smaller of the two guarantees and multiply by the local tolerance ε. At side 63 the all-time guarantee is 39.58042ε, rounded upward. The sharp value calculated from the backward weights is about 13.26095ε. When a decision is close, the exact weighted calculation tells us how much of the conservative allowance is actually needed.
Proof note and related reading
The printable note collects the lattice estimate, the reflection and exit-time arguments, the limiting boundary correction, and the finite certificate. Download the five-page grid-size proof (PDF).
To see which cell errors attain the bound on a particular run, return to the signed grid and change its run length. Trace an error from the first update.
Remove the holding step and every move switches the color of its cell. What happens to the error when two successive pulses occupy opposite colors? When a heat pulse switches color works out the new law and follows the comparison into higher dimensions.