diff f6bf760..6fbd3ac k_server_uniform_computation_v2.txt
diff --git a/k_server_uniform_computation_v2.txt b/k_server_uniform_computation_v2.txt
index 0921493..76d69b5 100644
--- a/k_server_uniform_computation_v2.txt
+++ b/k_server_uniform_computation_v2.txt
@@ -29,27 +29,27 @@ Two features of the statement are essential. There is no bound on the additive t
 The argument replaces the existence theorem by a terminating computation, then wraps that computation inside a schedule whose cost grows only with the binary length of the request counter. Two devices carry the weight. The first is a finite linear-algebraic description of a strongly lazy policy: from configuration probabilities and one-step transition flows, exact rational elimination yields a decision table whose dyadic conditional rows can be sampled with a bounded number of unbiased bits and whose expected movement exceeds the optimum by a multiplicative coefficient bounded by C_0 log^2(k+1) up to a bounded additive loss. The second is a universal filter keeping the table's input word short, combined with a deterministic marking fallback that takes over once the table has made too many positive moves inside the current epoch. Both devices act on request words determined by the raw input alone, so the analytic estimate always applies to a fixed word even when the algorithm's own mode switches at a random time.
 ./pdf/squared-logarithmic-k-server-companion.pdf
 
-The first step is lazification. A service is strongly lazy if, on a request to a point that already holds a server, it moves that server by zero length, and on a request to a point unoccupied by servers it moves exactly one server to that point. From a distinct starting tuple, a strongly lazy service keeps the server positions distinct for all time. Manasse, McGeoch, and Sleator observed that every online policy has a strongly lazy follower whose total cost on every finite word is no larger, path by path, against every realization of the original randomness; the argument uses a matching potential between follower tuple and virtual tuple and the triangle inequality. The follower's decisions depend only on the revealed request and the currently simulated state, so the construction is causal. Consequently the existence theorem may be assumed without loss of generality to promise a strongly lazy policy from any distinct start.
+The first step is lazification. A service is strongly lazy if, on a request to a point that already holds a server, it moves that server by zero length, and on a request to a point unoccupied by servers it moves exactly one server to that point. From a distinct starting tuple, a strongly lazy service keeps the server positions distinct for all time. Manasse, McGeoch, and Sleator observed that every online policy has a strongly lazy follower whose total cost on every finite word is no larger, path by path, against every realization of the original randomness; the argument uses a matching potential between follower tuple and virtual tuple and the triangle ineuality. The follower's decisions depend only on the revealed request and the currently simulated state, so the construction is causal. Consequently the existence theorem may be assumed without loss of generality to promise a strongly lazy policy from any distinct start.
 ./pdf/manasse-mcgeoch-sleator-1990-competitive-algorithms-for-server-problems.pdf
 
-Proof. Simulate the original policy as a virtual process. Let c denote the follower tuple and v the virtual tuple, and put Phi(c, v) = min_{pi in S_k} sum_{j=1}^k d(c_j, v_{pi(j)}), where S_k is the symmetric group on k letters. This is the cheapest perfect matching between the two tuples; the minimum is a finite minimum over permutations and exists even if the virtual tuple repeats positions. Initially Phi(c, v) = 0. Suppose the virtual policy just served request r at cost eta, taking v to v'. Applying the triangle inequality to a previously minimizing matching gives Phi(c, v') le Phi(c, v) + eta. If c already covers r, the follower moves zero length. Otherwise fix a minimizing matching between c and v' together with a virtual label at r, move the matched follower label to r at cost m, and obtain c'. The matching edge from that follower label to its partner at r decreases from length m to zero while all other edges keep their length, so Phi(c', v') le Phi(c, v') - m; combined with the previous bound, m + Phi(c', v') le Phi(c, v) + eta. Summing this inequality over the requests of any finite word and using that the potential is zero initially and nonnegative at the end gives total follower cost at most total virtual cost. Because the follower moves only at requests not already covered by its own tuple, its positions remain distinct whenever the initial tuple is distinct. All decisions used only the revealed request and the currently simulated state, so the construction is causal.
+Proof. Simulate the original policy as a virtual process. Let c denote the follower tuple and v the virtual tuple, and put Phi(c, v) = min_{pi in S_k} sum_{j=1}^k d(c_j, v_{pi(j)}), where S_k is the symmetric group on k letters. This is the cheapest perfect matching between the two tuples; the minimum is a finite minimum over permutations and exists even if the virtual tuple repeats positions. Initially Phi(c, v) = 0. Suppose the virtual policy just served request r at cost eta, taking v to v'. Applying the triangle ineuality to a previously minimizing matching gives Phi(c, v') le Phi(c, v) + eta. If c already covers r, the follower moves zero length. Otherwise fix a minimizing matching between c and v' together with a virtual label at r, move the matched follower label to r at cost m, and obtain c'. The matching edge from that follower label to its partner at r decreases from length m to zero while all other edges keep their length, so Phi(c', v') le Phi(c, v') - m; combined with the previous bound, m + Phi(c', v') le Phi(c, v) + eta. Summing this ineuality over the requests of any finite word and using that the potential is zero initially and nonnegative at the end gives total follower cost at most total virtual cost. Because the follower moves only at requests not already covered by its own tuple, its positions remain distinct whenever the initial tuple is distinct. All decisions used only the revealed request and the currently simulated state, so the construction is causal.
 ./pdf/manasse-mcgeoch-sleator-1990-competitive-algorithms-for-server-problems.pdf
 
 The second step is a finite flow system. Fix the metric on X = {1, ..., n} and define D = max_{x,y} d(x,y), delta = min_{x ne y} d(x,y), so 0 < delta le D. Fix a distinct initial tuple u = (1, ..., k), even when the true starting tuple s may repeat points. For a prescribed horizon H, let C be the set of ordered k-tuples of distinct points of X, and let T(c, r, j) denote the tuple obtained from c by replacing its jth coordinate with r. The allowed-label set is J(c, r) = {j : c_j = r} when r belongs to c, and J(c, r) = {1, ..., k} otherwise. Introduce unknowns p_{w,c} for the probability of configuration c after the finite word w, unknowns f_{w r, c, j} for the joint probability that configuration c is used before the next request r and label j serves it, and one coefficient a. The defining constraints are
  p_{w,c} ge 0,  sum_c p_{w,c} = 1,  p_{∅, c} = [c = u], 
  f_{w r, c, j} ge 0,  sum_{j in J(c,r)} f_{w r, c, j} = p_{w,c}, 
  sum_{substack{c in C, j in J(c,r)  T(c,r,j) = c'}} f_{w r, c, j} = p_{w r, c'}, 
-for every word w in X^{le H}, |w| < H, request r in X, and configuration c' in C, together with a coefficient constraint a ge 0 and one inequality per nonempty word x = r_1 ... r_h with h le H:
+for every word w in X^{le H}, |w| < H, request r in X, and configuration c' in C, together with a coefficient constraint a ge 0 and one ineuality per nonempty word x = r_1 ... r_h with h le H:
  sum_{i = 1}^h sum_{c in C} sum_{j in J(c,r_i)} f_{r_1 ... r_i, c, j}, d(c_j, r_i) le a, OPT_u(x). 
 OPT_u(x) denotes the offline minimum for the word x from the tuple u; it is computable by a finite dynamic program over the finitely many tuples of X^k reachable from u. Explicitly, let Gamma_w(c) be the minimum cost of serving w from u and finishing at tuple c, with +∞ marking an unreachable tuple; start with Gamma_{∅}(u) = 0 and all other entries +∞, and use
  Gamma_{w r}(c') = min_{substack{c in X^k, 1 le j le k  T(c, r, j) = c'}} (Gamma_w(c) + d(c_j, r)),  OPT_u(w) = min_{c in X^k} Gamma_w(c). 
 These recurrences use only rational arithmetic and comparisons and never divide by OPT_u(x); a word with zero optimum gives a zero right-hand side in the coefficient constraint. Finite-horizon linear descriptions of randomized k-server strategies in exactly this marginal-and-flow form appear in Moemke's competitive-ratio approximation scheme on fixed finite metrics.
 ./pdf/moemke-1303.2963-competitive-ratio-approximation-scheme.pdf
 
-The system is feasible and bounded: by the existence theorem and lazification, a real solution exists with a = C_0 log^2(k+1), obtained from the probability distribution of the source policy. Since all coefficients are rational, the feasible set for a after projecting out the p and f variables is a nonempty half-line [a_*, ∞) with rational endpoint a_*. To compute a_* exactly, replace each equality by a pair of weak inequalities, eliminate all variables except a one at a time by Fourier-Motzkin elimination, and reverse the eliminations by choosing the largest lower bound at each variable. To eliminate a variable z, divide every inequality in which z occurs by the (nonzero) rational coefficient of z, split the resulting affine bounds into lower bounds z ge L_i(y) and upper bounds z le U_j(y), keep all inequalities independent of z, and add every comparison L_i(y) le U_j(y); if either family is empty, add nothing. This is an exact existential projection. Each elimination removes one variable and a finite set of inequalities, so starting from finitely many the procedure terminates after finitely many eliminations. After all eliminations, the feasible a-values are given by finitely many weak rational inequalities in one variable. That set is nonempty because the real solution already exhibited belongs to it, and it includes the constraint a ge 0, so its least value is the maximum of finitely many rational lower bounds. That maximum is rational and belongs to the feasible set. Compute it, then reverse the eliminations one variable at a time. At each reversal, evaluate the already-computed values inside the bounds and choose the largest lower bound if one exists; otherwise choose the smallest upper bound if one exists; otherwise choose zero. The projection inequalities ensure that the chosen value also respects any upper bounds. Repeating this yields a rational solution of the full system. Because both the Fourier-Motzkin step and the back-substitution work with rationals, the coefficient a computed this way is a rational number satisfying 0 le a_* le C_0 log^2(k+1); neither C_0 nor the source policy enters the computation. The elimination and its dual were introduced by Dantzig and Eaves in 1973; Subramani's exposition documents the step-by-step algorithm.
+The system is feasible and bounded: by the existence theorem and lazification, a real solution exists with a = C_0 log^2(k+1), obtained from the probability distribution of the source policy. Since all coefficients are rational, the feasible set for a after projecting out the p and f variables is a nonempty half-line [a_*, ∞) with rational endpoint a_*. To compute a_* exactly, replace each equality by a pair of weak ineualities, eliminate all variables except a one at a time by Fourier-Motzkin elimination, and reverse the eliminations by choosing the largest lower bound at each variable. To eliminate a variable z, divide every ineuality in which z occurs by the (nonzero) rational coefficient of z, split the resulting affine bounds into lower bounds z ge L_i(y) and upper bounds z le U_j(y), keep all ineualities independent of z, and add every comparison L_i(y) le U_j(y); if either family is empty, add nothing. This is an exact existential projection. Each elimination removes one variable and a finite set of ineualities, so starting from finitely many the procedure terminates after finitely many eliminations. After all eliminations, the feasible a-values are given by finitely many weak rational ineualities in one variable. That set is nonempty because the real solution already exhibited belongs to it, and it includes the constraint a ge 0, so its least value is the maximum of finitely many rational lower bounds. That maximum is rational and belongs to the feasible set. Compute it, then reverse the eliminations one variable at a time. At each reversal, evaluate the already-computed values inside the bounds and choose the largest lower bound if one exists; otherwise choose the smallest upper bound if one exists; otherwise choose zero. The projection ineualities ensure that the chosen value also respects any upper bounds. Repeating this yields a rational solution of the full system. Because both the Fourier-Motzkin step and the back-substitution work with rationals, the coefficient a computed this way is a rational number satisfying 0 le a_* le C_0 log^2(k+1); neither C_0 nor the source policy enters the computation. The elimination and its dual were introduced by Dantzig and Eaves in 1973; Subramani's exposition documents the step-by-step algorithm.
 ./pdf/subramani-wvu-fourier-motzkin-elimination-notes.pdf
 
-From the rational solution, define causal conditional rows by q_{w, r, c}(j) = f_{w r, c, j} / p_{w,c} when p_{w,c} > 0, and put all mass on the smallest allowed label when p_{w,c} = 0. Each row is a rational probability distribution supported on the allowed labels J(c,r), including rows at configurations the unrounded policy does not reach. Along a fixed word w, induction using the mass, outflow, and inflow constraints shows that the causal policy generated by these rows has exactly the marginals p and f, and therefore that the flow system's coefficient constraint is the expected-cost bound. Rounding follows. Fix b the least nonnegative integer with 2^b ge k H^2. In each row reserve its smallest allowed label j_0 and set widehatwidehat q_q_{w,r,c}(j) = 2^{-b}floor( 2^b q_{w,r,c}(j) ) for j ne j_0, with the residual mass widehatwidehat q_q_{w,r,c}(j_0) = 1 - sum_{j ne j_0} widehatwidehat q_q_{w,r,c}(j). The new row is supported on J(c,r) and its total variation distance from the original is at most k 2^{-b}. Sampling with b unbiased bits, using the numerators of the row with common denominator 2^b, uses exactly b random bits per decision and requires no rejection loop. Coupling the rounded and unrounded causally generated services until their first differing label choice, on a word of length h le H, gives discrepancy probability at most h k 2^{-b}, since at any agreeing step the conditional discrepancy probability is at most k 2^{-b}. On the complement the two costs are equal; on the discrepancy event the difference is at most h D. Hence the expected movement of the rounded table from u on any word w of length h le H satisfies
+From the rational solution, define causal conditional rows by q_{w, r, c}(j) = f_{w r, c, j} / p_{w,c} when p_{w,c} > 0, and put all mass on the smallest allowed label when p_{w,c} = 0. Each row is a rational probability distribution supported on the allowed labels J(c,r), including rows at configurations the unrounded policy does not reach. Along a fixed word w, induction using the mass, outflow, and inflow constraints shows that the causal policy generated by these rows has exactly the marginals p and f, and therefore that the flow system's coefficient constraint is the expected-cost bound. Rounding follows. Fix b the least nonnegative integer with 2^b ge k H^2. In each row reserve its smallest allowed label j_0 and set qhat_q_{w,r,c}(j) = 2^{-b}floor( 2^b q_{w,r,c}(j) ) for j ne j_0, with the residual mass qhat_q_{w,r,c}(j_0) = 1 - sum_{j ne j_0} qhat_q_{w,r,c}(j). The new row is supported on J(c,r) and its total variation distance from the original is at most k 2^{-b}. Sampling with b unbiased bits, using the numerators of the row with common denominator 2^b, uses exactly b random bits per decision and requires no rejection loop. Coupling the rounded and unrounded causally generated services until their first differing label choice, on a word of length h le H, gives discrepancy probability at most h k 2^{-b}, since at any agreeing step the conditional discrepancy probability is at most k 2^{-b}. On the complement the two costs are equal; on the discrepancy event the difference is at most h D. Hence the expected movement of the rounded table from u on any word w of length h le H satisfies
  𝔼[cost_{T_H, u}(w)] le a, OPT_u(w) + k h^2 2^{-b} D le a, OPT_u(w) + D. 
 A rounded trajectory can reach a configuration whose unrounded marginals were zero. That possibility causes no exception, because the table has already assigned such a configuration a legal row and reaching it can only occur after a discrepancy, whose cost is already absorbed.
 For every positive integer H there is a terminating deterministic procedure on rational input that constructs a rational number a and a finite table defining a strongly lazy policy T_H from u such that 0 le a le C_0 log^2(k+1) and
@@ -79,31 +79,31 @@ Raw-block and completed-block counters are updated using every raw request, inde
 Two estimates close the movement analysis: one per epoch, and one over the number of epochs. Fix a finite request word sigma independent of all random bits, and fix the deterministic index at which the routine begins. Choose one optimal labeled service of the whole word starting from s. For each nonempty epoch E, including its possibly truncated final portion, let O_E be that service's movement during E and let w_E be the filter's full kept word in E. Both the epoch boundaries and w_E depend only on the raw request word, hence are deterministic.
 
 The epoch estimate reads: for every such epoch, from any actual entering tuple, the expected actual cost in that epoch satisfies
- 𝔼[cost_{rm actual}(E)] le 2 a, O_E + (2a+2) k D. 
+ 𝔼[cost_{actual}(E)] le 2 a, O_E + (2a+2) k D. 
 The bound is uniform in the actual entering tuple.
 
 The proof is by shadowing. Run a shadow copy of the table from u on the full word w_E, and let V_E be its cost. More precisely, assign independent blocks of b unbiased bits to the successive positions of that deterministic word; use the same blocks for the actual table-mode decisions and reserve later blocks for the shadow's analysis of what would have happened had the algorithmic service not switched. Dropped requests leave the table-mode tuple unchanged, so the shadow and the virtual service agree through every table-mode decision, including the triggering move that takes the positive-move count to M+1. The shadow therefore has the ordinary full-table law, without conditioning on whether or when the switch occurs. By the finite-table proposition and by the filter lemma, which bounds the length of w_E by H,
  𝔼[V_E] le a, OPT_u(w_E) + D. 
 Table-mode cost is at most V_E. If there is a switch, its common prefix already contains M+1 positive moves of length at least delta each, so V_E ge (M+1) delta ge F, and the marking cost bound established for fallback then pays the entire fallback using a second copy of V_E. If there is no switch, the second copy is unnecessary. Thus, pathwise,
- cost_{rm virtual}(E) le 2 V_E, 
+ cost_{virtual}(E) le 2 V_E, 
 including a switch on the final raw request or on the final kept request, and including any truncation of an epoch. The expectation in the display for V_E is always applied to a fixed full word.
 
-The comparison between actual and virtual is by first use. Within an epoch, the first time a label is used, both its actual and its virtual position arrive at the same requested point; by the triangle inequality, the actual cost of that first use exceeds the virtual cost by at most D, the maximum of the distance between the two entering positions. All subsequent costs of that label agree, until the next virtual reset. Labels never used cost nothing. Therefore
- cost_{rm actual}(E) le cost_{rm virtual}(E) + kD, 
+The comparison between actual and virtual is by first use. Within an epoch, the first time a label is used, both its actual and its virtual position arrive at the same requested point; by the triangle ineuality, the actual cost of that first use exceeds the virtual cost by at most D, the maximum of the distance between the two entering positions. All subsequent costs of that label agree, until the next virtual reset. Labels never used cost nothing. Therefore
+ cost_{actual}(E) le cost_{virtual}(E) + kD, 
 which also covers a virtual hit on which the actual chosen label happens to have to move, and it allows repeated actual positions at the entry to an epoch.
 
-The last comparison is between the table's optimum and the whole-word optimum. For each label j, keep only its visits at times retained in w_E, and shortcut its other visits inside E by direct metric paths; beginning these retained visits from its original epoch-entering point costs no more than its original movement during E. Replacing that point by u_j adds at most D to the first retained visit by the triangle inequality; if there is no retained visit, the label costs zero. The resulting k paths constitute a legal labeled service of w_E from u, because each path visits the point chosen by the whole-word optimum at every kept time, with the same label. Consequently
+The last comparison is between the table's optimum and the whole-word optimum. For each label j, keep only its visits at times retained in w_E, and shortcut its other visits inside E by direct metric paths; beginning these retained visits from its original epoch-entering point costs no more than its original movement during E. Replacing that point by u_j adds at most D to the first retained visit by the triangle ineuality; if there is no retained visit, the label costs zero. The resulting k paths constitute a legal labeled service of w_E from u, because each path visits the point chosen by the whole-word optimum at every kept time, with the same label. Consequently
  OPT_u(w_E) le O_E + kD. 
 Combining these four displays yields
- 𝔼[cost_{rm actual}(E)] le 2a(O_E + kD) + 2D + kD le 2 a, O_E + (2a+2) k D, 
-where the last inequality uses k ge 2. All comparisons involving the entering actual tuple were pathwise and uniform in that tuple; fresh table bits give the same shadow law after any earlier history.
+ 𝔼[cost_{actual}(E)] le 2a(O_E + kD) + 2D + kD le 2 a, O_E + (2a+2) k D, 
+where the last ineuality uses k ge 2. All comparisons involving the entering actual tuple were pathwise and uniform in that tuple; fresh table bits give the same shadow law after any earlier history.
 
 The suffix estimate reads: for every fixed finite word sigma, the routine starting at any deterministic index from an arbitrary actual tuple has expected suffix cost at most
  (4a+2), OPT_s(sigma) + (2a+2) kD, 
 where all parameters R, F, M, H, a are fixed by the instance. The whole-word optimum pays at least delta inside each completed raw block, regardless of its entering tuple, and the completed blocks are disjoint intervals of request times. Let N be the number of nonempty epochs. The empty-suffix case is trivial; otherwise the first N-1 epochs each contain R completed blocks, so
  (N-1) R delta le OPT_s(sigma),  N le 1 + OPT_s(sigma) / (kD), 
 using R delta ge kD. Also sum_E O_E le OPT_s(sigma) because the epochs partition the original word into disjoint parts and the whole-word optimum's movement is additive over any partition of time. Summing the per-epoch estimate over epochs therefore yields
- 𝔼[cost_{rm suffix}] le 2 a, OPT_s(sigma) + (2a+2) kD, N le (4a+2), OPT_s(sigma) + (2a+2) kD. 
+ 𝔼[cost_{suffix}] le 2 a, OPT_s(sigma) + (2a+2) kD, N le (4a+2), OPT_s(sigma) + (2a+2) kD. 
 Only one epoch's fixed charge remains in the bound. A final unfinished epoch may contain arbitrarily many raw requests, since its kept word is still bounded by H and its fallback cost is still bounded by F; no table error or restart charge accumulates with the raw request count. That completes the analysis of the suffix routine on any finite rational instance, assuming its table, filters, and parameters are already available.
 
 The suffix routine takes as given the finite table and the parameters of the instance. Obtaining that table requires one long finite computation independent of the request word. Preprocess by storing n, k, d in a fixed canonical encoding and s likewise: integers without leading zeros, rational distances with positive denominators and relatively prime numerators and denominators, matrix entries in fixed index order. Store the actual labeled tuple s, initialize a binary request counter to zero, and set a flag indicating that suffix service has not started. This takes polynomially many bit operations in L and produces O(L) bits, since rational reduction is polynomial in the encoding length (in the Euclidean algorithm the larger positive magnitude decreases by at least a factor two in every two remainder steps) and n, k le O(L).
@@ -128,10 +128,10 @@ Proof of Theorem 1. The preprocessing and schedule above define one randomized c
 
 Fix any finite request word sigma independent of the random bits. The requests before activation cost at most (t_*-1) D in total, since each moves a single server over distance at most D. If sigma ends before activation, this bound already covers the whole cost. Otherwise, applying the suffix bound from the deterministic start t_*, with the whole-word optimum from s, gives
  𝔼[cost_A(sigma)] le (4a+2), OPT_s(sigma) + (t_*-1) D + (2a+2) kD. 
-The same inequality holds for any shorter word, including the empty word, by nonnegativity of its right-hand side.
+The same ineuality holds for any shorter word, including the empty word, by nonnegativity of its right-hand side.
 
 Since a le C_0 log^2(k+1) and log(k+1) ge log 3 for k ge 2, set
  C = 4 C_0 + 2 / (log 3)^2,  B_{d,k,s} = (t_*-1) D + (2a+2) kD. 
-Then 4a+2 le C log^2(k+1), so the movement inequality of Theorem 1 holds with the absolute constant C and the instance-only additive term B_{d,k,s}. Repeated positions in s cause no difficulty: the suffix comparison allowed arbitrary actual starting tuples, while the existence theorem and the finite table were used only from the distinct virtual tuple u. The polynomial p and the constant C do not depend on the instance, and the algorithm never reads sigma before serving it: requests arrive one at a time and decisions use only the current request and stored state. That proves Theorem 1.
+Then 4a+2 le C log^2(k+1), so the movement ineuality of Theorem 1 holds with the absolute constant C and the instance-only additive term B_{d,k,s}. Repeated positions in s cause no difficulty: the suffix comparison allowed arbitrary actual starting tuples, while the existence theorem and the finite table were used only from the distinct virtual tuple u. The polynomial p and the constant C do not depend on the instance, and the algorithm never reads sigma before serving it: requests arrive one at a time and decisions use only the current request and stored state. That proves Theorem 1.
 
 The construction converts the companion existence theorem into one uniform algorithm on finite rational metrics. The policy the companion theorem promises is never executed or queried; it certifies the feasibility of the finite flow system. A rational solution is computed exactly, and its conditional rows are rounded to dyadic probabilities and sampled with unbiased bits. The deterministic filter keeps a single finite table sufficient for arbitrarily long epochs, without letting the rounding loss grow with raw epoch length. The computational guarantee rests on the permitted dependence on the binary length of the request counter: the constructor's running time T_P determines activation time 2^{T_P} - 1, and the movement before activation enters the additive constant B_{d,k,s}. Those quantities are finite with no size bound asserted. The same ratio with a useful bound on startup movement, or with a uniform per-request bound in L alone, is not obtained by this construction.