r/learnmath • u/[deleted] • Nov 05 '19
Anyone wanna help me analyse this function for fun?
/r/googology/comments/drypej/weird_function_needs_analysing/2
u/Cyfar Nov 05 '19
Code in Python 3.8
def f(t):
if len(t) == 0:
return 1
elif len(t) == 1:
return t[0] + 1
elif 0 in t:
t2 = [e for e in t if e != 0]
return f(t2)
else:
new_t = [t[0] - 1]
for i in range(1, len(t)):
tmp_t = t.copy()
tmp_t[i] -= 1
new_t.append(f(tmp_t) + 1)
return f(new_t)+1I find f(1, n) = 3*n + 2 empirically. It's not exactly the same function from its behaviour with multiple 0 because f(1,0,1) = f(1,1). It could be modified though. Have fun.
1
1
u/ominousfire New User Nov 05 '19
Okay I had my fun with this.
If t_n is an n tuple of 1's then:
f(t_1) = 2
f(t_2) = 8
f(t_3) = this
f(t_4) = this
f(t_5) = this
The repeating patterns within the system were quite interesting to note. Also I didn't full solve for the first element of t5, and I'm pretty sure I put an extra one or five in there somewhere, but the patterns should remain. And no, I'm not solving for t6, although with the right notation you could probably describe what pattern pieces go where.
1
Nov 05 '19
It seems like the lowest entry and the length of the array determine if the answer is on the order of exponentiation, tetration, quintation, etc.
2
u/ominousfire New User Nov 06 '19
Ah, yah you could look at it in terms of its order.
I was looking at it more from the perspective of putting everything in terms of the f(t_n) tuples and observing the function's patterns in terms of the lower tuples.
More so while you can't solve for f(t_n) for n greater than 2, you could note f(t_3) has a value, and so does f(t_4), and make these a sort of independent variable set similar to some forms of differential equations (small and large time scale ones- I forget the name of the method). Of course now we have n large time scale variables, as an analog comparison.
That is: We can arrange f(t_n) into an n-1 independent variable function (t1 - t_n-1). This makes sense because if we try hard enough everything is a function of f(t_1). Of course each of these variables has value, so its interesting to see your function continuously selecting the same values.
I didn't get very far with what I wanted to do with your function, but it was a good start for an afternoon.
2
Nov 06 '19
This is cool, I haven't experimented with using the functions of tuples of 1 as variables themselves, but that's what I'm gonna do now.
2
u/ominousfire New User Nov 09 '19 edited Nov 09 '19
I know this is a couple days ago, but I finally remembered something else about your function, that being that for f(m, n) your definition is surprisingly similar to the Ackerman function. I'm not sure if your initial intention was to research it, but you may find the information there (as well as on arxiv) (as well as Knuth Up Arrow notation) useful if you were unaware of it.
The important properties of the Ackerman function are that it is "disgustingly large", restricted to two inputs (unlike yours which accepts a tuple of length n), and not primitively recursive (which was saw in my exploration of defining higher tuples of 1's in terms of lower 1 tuples). I don't know if these statements apply to your function though, I haven't proven them, and I don't think I will as computational properties of functions is not my specialty.
Also, on a side note, I solved f(m, n).
2
Nov 10 '19
This deserves more upvotes! Yeah, I noticed the ackermann similarity. It feels like this function is a "generalisation" of the ackermann function for n arguments, with iterations proportional to both the number of arguments and the SIZE of the arguments.
Quite the feat to have solved f(m,n), and by hand too. It's interesting that the numbers 30 and 5 turn up there. I wonder what significance they have? I tended to see the fibonacci numbers appear when experimenting with the function's inputs. Maybe there's some strange connection.
2
u/ominousfire New User Nov 10 '19
The Fibonnaci numbers probably appear because of the similar method of creation: recurssive counting. Do note: 30 is actually 6*(5) = (5+1)*5, which I've rewritten as
If you want to know why your function continually spews out 5's and 5+1's, consider a different function where you increment and / or decrement by a, b, c (where a & b are increments and c is a decrement), for arbitrary a, b, c instead of 1. Specifically let a = b = c. You will find 5 --> 5a across the number I believe. What this really says is for an iteration of this function, 5 increments happen.
I would also note: your function grows faster on f(m,n) than the Ackerman function, but only for certain values of f(m,n). Specifically this implies the existence of a function describing the area where f(m, n) > A(m, n).
In any case, you're not going to be able to do much with this function computationally. f(3, 1) = 93750 is and f(3,2) is like 65,000 digits. You're going to have to do it by hand because of that.
Side note: couple of error(s) I made in that image:
Don't divide our modified up arrow definition by b. It's not needed.
1
u/JeanLoup14 Nov 05 '19
Are you sure about f(n,1) = f(1,n) ? I find f(1,2) = 13 and f(2,1) = 29
And your formula of f(2,n) does not seem to be correct ? I have for all n, f(2,n) = 6.25*5^n - 9/4
Or maybe I have misunderstood the definition of the function
1
Nov 05 '19
I did rush through it a bit, perhaps my maths is off. But I was really just trying to get a gist of how it grows, the first proportional to n, then n exponentiated, then tetrated, and so on
1
Nov 06 '19
I used my (previously incorrect) result for f(n,1) in the workings for f(2,n), should be fixed now.
1
u/GreedyWishbone Nov 05 '19
TIL there is a study if large numbers
4
Nov 05 '19
Big time. There are some studied numbers which are horrendously, incalculably, unfathomably huge. "Large" is such an understatement.
1
u/Direct-to-Sarcasm New User Nov 05 '19
Like... seven...? ...Eight?
...Nine?!
4
Nov 05 '19
Holy shit there's a NINE?
6
u/marpocky PhD, teaching HS/uni since 2003 Nov 05 '19
Only if you admit the nine axiom, which not all numerologies do.
2
2
2
u/GreedyWishbone Nov 05 '19
Also TIL 1000 is a small number :(
2
6
u/Cyfar Nov 05 '19
Those "..." need much more explanation imo. Also what is the range of i in a_i ?
This function could indeed involve unusually large numbers but if it doesn't show up naturally in any proof there's really no point studying it but for the mathematical challenge.