User blog comment:Ikosarakt1/Coding strings as ordinals (for Friedman's n(k))/@comment-5529393-20130715142426

You can get a larger order type than w^w. The problem is that you are only ordering strings where the letters are in descending order. Here's a way to get order type w^w^w:

WIth one letter, you just get the finite ordinals: A^n corresponds to the ordinal n.

With two letters, the B letters separate the string into substrings consisting of A only, so we can think of it as a sequence of finite ordinals, which correspond to ordinals up to w^w. For example,

AAABBAABAAAAABAAAABAA

3, 0, 2, 5, 4, 2

3w^5 + 3w^3 + 5w^2 + 4w + 2

So with two letters we get ordinals up to w^w.

Similarly, when we add the letter C, the letter C divides the string into substrings consisting of A and B only. So we get a sequence of substrings corresponding to ordinals up to w^w, so we get ordinals up to (w^w)^w = w^(w^2). In general, with n letters we get ordinals up to w^(w^(n-1)), and the nth letter corresponds to the ordinal w^(w^(n-2)). The final order type is w^(w^w).

n(k) is very difficult to determine, but it may be easier to determine the similar function F(k). Friedman's F(k) is defined as the longest sequence of strings {X_i} using k letters or less such that X_i has length less than or equal to i+1, and for no i < j is X_i a subsequence of X_j. We can define a hierarchy of functions H_alpha(k) to be the length of the sequence of strings {X_i} defined by a "greedy" algorithm:  we define X_1 as the string corresponding to the ordinal alpha, then for each i > 1 we define X_i as the string of length less than or equal to i+k corresponding to the largest ordinal less than the ordinals of all the previous strings. Then we can express H_alpha(k) recursively as

H_0(k) = 0

H_(alpha+1) (k) = H_alpha (k+1) + 1

For limit alpha, H_(alpha) (k) = H_{alpha[k+1]) (k+1) + 1

where alpha[k] is the largest ordinal less than alpha corresponding to a string of length less than or equal to k.  (I once came up with a recursive definition that was more explicit than this, but that was a few years ago.)

It is a reasonable conjecture that the greedy algorithm is optimal, so that F(k) = H_{(w^w^(k-2))*2} (1). But it wouldn't surprise me if it was false either. In any case, we have a lower bound, so for instance we can prove that F(k) > f_{w^(k-2)}(2) for instance.

n(k) is much more tricky, and I doubt that it is possible to come up with simple recursive equations that would generate n(k). This is because each subsequent block subsequence in the longest sequence for n(k) depends greatly on the previous block subsequence. So we can't use the greedy algorithm above. We do know that n(k+4) > f(k), so n(k+6) > f_{w^k} (2). But, unlike the bound for F(k), this bound appears to be very weak.