# A Sturmian B-Maximizing Branch In A Collatz Reduction

## Scope

This note isolates a short standalone statement from the right-edge argument.
It is not a Collatz proof by itself.

The statement is:

```text
inside the root cheap tree, the B_d-maximizing branch is
the Sturmian mechanical word generated by the rotation increment log_2 3 - 1
modulo 1.
```

A further consequence is that these finite Sturmian factor lists provide the
combinatorial input for later exact dyadic obstruction constructions. That
consequence requires additional setup beyond this short note.

## Cheap Words

Let

```text
w = (h_1, ..., h_d)
```

be a valuation word with each `h_i >= 1`, and write

```text
S_j = h_1 + ... + h_j
```

for the valuation sum along the first `j` letters.
Set `S_0 = 0` for the empty prefix.

Call `w` cheap if every nonempty prefix satisfies

```text
2^S_j < 3^j.
```

The root cheap tree is the prefix tree whose depth-`d` vertices are the cheap
valuation words of length `d`.

In the affine model, this is the no-contraction side of the affine prefix: after `j` odd
steps, the multiplicative part is

```text
3^j / 2^S_j.
```

So the cheap condition says that no prefix has yet paid enough dyadic division
to contract multiplicatively.

Cheap words are not assumed to have letters only in `{1,2}`. Larger letters are
allowed if the prefix inequalities still hold; the theorem below shows that the
`B_d`-maximizer is the `{1,2}`-valued right-edge word.

## The Extremal Quantity

For a fixed word `w`, let `A_j = A_j(w)` be the affine constant determined along
the first `j` letters of `w` by

```text
A_0 = 0,
A_(j+1) = 3 A_j + 2^S_j.
```

Define

```text
B_j = 3 A_j + 2^S_j.
```

Thus `B_d(w)` means this value after applying the above recurrence to the word
`w` through depth `d`.

By the recurrence, `A_(j+1) = B_j`, so `B_d` is the value of the next affine
constant `A_(d+1)`. Maximizing `B_d` therefore asks which cheap prefix gives the
largest next affine constant at depth `d`.

The right-edge question is:

```text
among all cheap words of fixed length d, which word maximizes B_d?
```

Here `extremal` only means maximizing `B_d` inside the root cheap tree. The
larger Collatz reduction uses this functional through separate arguments.

## The Answer

Let

```text
ell = log_2 3.
```

Define

```text
rho^(d) = (u_1, ..., u_d)
```

by

```text
u_j = floor(j ell) - floor((j - 1) ell).
```

Since

```text
1 < log_2 3 < 2,
```

each `u_j` is either `1` or `2`.

The right-edge theorem says:

1. `rho^(d)` is cheap.
2. For every cheap word `w` of length `d`,

```text
B_d(w) <= B_d(rho^(d)).
```

3. Equality holds if and only if

```text
w = rho^(d).
```

Thus the unique `B_d`-maximizing cheap word is the mechanical word generated by
the rotation increment
`log_2 3 - 1` modulo `1`.

The recurrence gives the exact expansion

```text
B_d = sum_{i=0}^d 3^(d-i) 2^S_i.
```

All weights in this sum are positive. For `i >= 1` cheapness gives

```text
2^S_i < 3^i,
```

so

```text
S_i < i log_2 3,
```

and since `S_i` is an integer,

```text
S_i <= floor(i log_2 3).
```

For `i = 0`, the empty-prefix value is `S_0 = 0 = floor(0)`, so the same bound
holds trivially. Hence

```text
S_i <= floor(i log_2 3)    for every i in {0, 1, ..., d}.
```

Since each term is strictly increasing in its own prefix sum `S_i`, any maximizer
must make the prefix sums as large as possible, subject to the requirement that
the resulting prefix sums come from a single valuation word:

```text
S_i = floor(i log_2 3).
```

These componentwise bounds are simultaneously achievable in a single word. Since
`1 < log_2 3 < 2`, each difference

```text
u_i = floor(i log_2 3) - floor((i - 1) log_2 3)
```

lies in `{1,2}`. So `rho^(d) = (u_1,...,u_d)` is a valid valuation word (all
letters `>= 1`) and its prefix sums are exactly `floor(i log_2 3)` for every
`i in {1,...,d}`. Therefore all bounds `S_i <= floor(i log_2 3)` are met with
equality simultaneously by `rho^(d)`.

It is also cheap. For `i >= 1`, since `log_2 3` is irrational,

```text
floor(i log_2 3) < i log_2 3,
```

so

```text
2^S_i = 2^floor(i log_2 3) < 2^(i log_2 3) = 3^i.
```

The `i = 0` case is not part of the cheap condition, which requires `2^S_j < 3^j`
only for `j >= 1`.

Uniqueness is strict: if any prefix sum is smaller than its bound, then the
corresponding positive summand `3^(d-i) 2^S_i` is smaller, and no other summand
can exceed its bound to compensate. Thus the unique maximizer is the right-edge
mechanical word, which is Sturmian by the rotation coding below.

## Why This Is Sturmian

The finite words `rho^(d)` are compatible prefixes, so they define an infinite
right-edge word `rho`.

Write

```text
alpha = log_2 3 - 1,
tau = 2 - log_2 3.
```

Then the next right-edge letter satisfies

```text
rho_(d+1) = 1 + 1_{frac(d alpha) >= tau}.
```

This follows from `ell = 1 + alpha`, so `frac(d ell) = frac(d alpha)`.
Indeed,

```text
rho_(d+1)
  = floor((d + 1) ell) - floor(d ell)
  = 1 + floor(frac(d alpha) + alpha)
  = 1 + 1_{frac(d alpha) >= 1 - alpha}
  = 1 + 1_{frac(d alpha) >= tau}.
```

Thus right-edge blocks are coded by the irrational rotation orbit

```text
x, x + alpha, ..., x + (t - 1) alpha     mod 1.
```

The coded length-`t` factor changes only when one of these orbit points crosses
the threshold `tau`. The coding discontinuities occur at

```text
tau, tau - alpha, ..., tau - (t - 1) alpha     mod 1.
```

These threshold points determine the continuity intervals of the coding map.
Renaming the symbols `{1,2}` as `{0,1}` does not change factor complexity. The
standard Sturmian complexity theorem for irrational two-interval codings gives
`p(t) = t + 1` directly. Therefore the infinite right-edge word `rho` has exactly
`t + 1` distinct length-`t` factors.

## Conclusion

Thus the root-cheap-tree `B_d`-maximizing branch is the Sturmian mechanical word
with rotation increment `log_2 3 - 1`. Consequently, at each fixed window length,
the right-edge branch has exactly `t + 1` factors.

With additional setup, these finite factor lists provide the combinatorial input
for exact dyadic obstruction constructions.
