In C, I have implemented the Ackermann function but am now attempting to find largest values for N. For example, if m = 1 find the largest value of n that computes correctly. So far I have been using "guess and check" but it seems there has to be a better, and more accurate, method. Could anyone offer some guidance? The Ackerman function has a lot to do with how many stacks can be processed so perhaps this question is purely arbitrary... Any help appreciated, thanks!
Asked
Active
Viewed 363 times
3
-
Does the function really have a maximal value for any `N`? I mean, if you pick a sufficiently large `M`, you can always get something bigger such as `A(M2, N) > A(M1, N)` if `M2 > M1`... – Apr 07 '13 at 20:42
-
@H2CO3 That is what I am trying to figure out. In all honesty, this was presented as part of an assignment so I almost felt there should be an obvious answer. The more I look into the actual function though, the more I doubt that... Sounding like I may need to consult and ask my professor for clarification. – Jester Jeffrey Apr 07 '13 at 20:45
-
1You definitively should. This function has no maximum. – Apr 07 '13 at 20:49
-
1The key here is "computes correctly," isn't it? The function grows quickly enough that the computer won't be able to compute it. – Kyle Strand Apr 07 '13 at 20:52
-
1@KyleStrand So basically, find `M = max` and `N = max` such as `A(M, N) <= (1 << sizeof(unsigned long long) * CHAR_BIT - 1)`? – Apr 07 '13 at 20:53
-
1Yes, I think that's what @JesterJeffrey is asking. – Kyle Strand Apr 07 '13 at 21:11