The Insane Ackermann Function
ฝัง
- เผยแพร่เมื่อ 10 ก.พ. 2025
- Researchers proved that navigating certain systems of vectors is among the most complex computational problems and involves a function called the Ackermann function. Find out how an easy-sounding problem yields numbers too big for our universe.
Watch our full video explainer: • How Vector Addition Ke...
Read the article: www.quantamaga...
--------
VISIT our website: www.quantamaga...
LIKE us on Facebook: / quantanews
FOLLOW us Twitter: / quantamagazine
@QuantaScienceChannel
#math #computerscience
New favourite word unlocked: quinquagintillion
they done achieved quagmiremillion
Googology words are fun
i know that one from cookies clicker
Me in fourth grade, after coming across 'antidisestablishmentarianism'
The risk assessment always running within my mind has prompted me to return and add apostrophes.
Quinquagintillionaire
Ackerman has only one function: to pwn titans
I'm glad people are still using pwned in 2024.
@@PhazerXP I am a product of my time
jj
Knew it'd be commented
lol
"Ackermann function"
"Colossal number"
Aot mentioned
Yep
Mid
Shingeki no Kyojin 😂👌😁
Lmao that is a wonderful coincidence that I didn't notice.
irrelevant 🤷♂️
pov: you've been inventing your sorting algorithms and ended up with complexity of A(n) ☠️
Fun fact: There are some algorithms whose time complexity is the inverse of the ackermann function.
@@FreeFireFull so pretty much constant
@@FreeFireFullsuch as?
@@theairaccumulator7144 Searching through a disjoin-set forest
@@theairaccumulator7144 the union and find operations for a weighted union find with path compression.
zeke won't enjoy studying this function
💀
I searched for someone mentioning AOT
Hello fellow AOT fan
hi brother
Collosal Number also mentioned 😂
in the 50's scientists once attempted to calculate A[5], but the piece of paper on which the calculations were performed quickly turned into a black hole
Since they disappeared, they couldn't tell us what they saw.
Lol
Meanwhile A[69] just chilling
In other words, the Ackerman function would be useful for describing the weight of your mum.
my guy
Gotta change your phone's password, or your dead body won't be found even after n(4) years 😅😅😅
@@MrBrilliant-produde
Your brit is hanging out
The weight of CaseOh
You've def earned it for summoning a titanic fandom.
Titanic?
He's referring to Attack on Titan@@yuvrajdas9552
@yuvrajdas9552attack on Titan(ic)
@yuvrajdas9552 Attack on Titan because of the character Levi *Ackerman* . Also "growing colossally" would aptly describe what happens when the humans transform into titans.
And after tetration (for 4)
You get pentation (for 5)
Pentation is just a tower of tetration
Tetration of tetration
Tetration 5 times is pentation of five
It is represented by a 5 with a small five on its left side bottom (5 with ⁵ at bottom left)
So as n>3 it just n{n-2}n
Do you happen to know how high it goes before we don't have standard ways of notating it? Or is there a repeatable pattern at some point? I would've guessed pentation would be just more exponents stacked up, so you'd quickly end up with an absurd amount of exponents towered up but nobody has any need to ever write that.
@@concerninghobbits5536 yeah
It is surely very large
It might have more than a million digits
So A(n) as n>3 its just n{n-2}2
Before you ask what's that this is BEAF notation so a{n}b is equal to a↑ⁿb (n is just n Arrow for shorthand)
(a is number we gonna repeat)
(b is how much we gonna repeat)
what you get? 😧 pen*t*ation?
Is this by Levi or mikasa?!
TATAKAE
Naaah, it's Kenny
@@phantomphoenix8828 more like "Keeenneeaayyyy!"
Levi and Civita
Their common ancestor, Wilhelm.
In college an assignment was "Write an essay on why Ackermann is so hard to compute". I was the night operator of a large mainframe, and could get away with telling users the computer will be down for "maintenance" all weekend! Ha! I wrote an incredibly (IMHO) version of Ackermann. I wrote an interrupt routine for the teletype output, so that I could delete the entire OS and have the entire memory to myself. Also, this particular machine had a cool feature: its 16 internal registers were shadowed by the first 16 words of memory, and if you set the right switch, and loaded code into the registers, if your subroutine was 16 instructions or less, it would run in the registers, which were 10x faster. Additionally, I cut out tests for end of stack and arranged it so that the final pop would cause an interrupt, thus saving all software tests on stack boundaries. And more! Anyway, running continuously for over 24 hours, I got A(4,1)!! The prof, who did not like me (Mia culpa, I was a wise ass lol), gave me an F. Because I never wrote the essay!
This might be the hottest thing ive ever read
And SQUARE it is mad
AND THAT'S JUST AT 4!!!!!!!!!!
For those that don’t know how to visualize “squaring” it, it is equivalent to think of each atom of the universe containing an equally sized universe within itself.
So imagine there are multiple universes of equal size, and the number of universes is equal to the number of atoms in one of them. The total number of atoms across all universes is the square of the number of atoms in our (observable) universe.
It is not really a number that can be comprehended by us.
fr😭
@@JordanMetroidManiac so sad, I was just about to comprehend 1 universe
Yes and it is just the "number of zeros". You know, like a million has 6. This number is a bit out of comprehension or calculation or anything, just crazy...
It's actually very simple and beautiful idea, suppose you give me a list of functions f_n(x) with x natural, each growing faster than the one before. Now I could apply the diagonal n -> f_n(n) Which grows faster than each f_n.
To get Ackermann you just choose some functions f_n, there are variations, the one I learnt was f_1(x)=2x and we get f_(n+1)(x) by iterating f_n(f_n(...f_n(1))...) x times, so that f_2(x)=2^x, f_3(x)=2^2^...^2 x times etc.
Hope you have a wonderful day😊
A. Look up fast growing hierarchy.
B. f_2(x) = (2^x)*x not just 2^x
oh you mean fast growing hierarchy where fω(n) = fn(n)
where f_1(n) is fⁿ0(n) which is 2n {the n is superscript} f_2(n) is fⁿ1(n) which is 2ⁿ×n so fα(n) is fⁿα-1(n)
English please 🙏 ?
Didn't know Mikasa was this good at math
Ah yes, the Ackermann function, the mathematical attempt to scale Levi's power level.
Its main use was to demonstrate a total computable function that is not primitively recursive. The original has three arguments. You essentially showed A(n, n, n) here, where all arguments are equal.
Thanks. I did wonder how you'd express tetrations for numbers other than 4
I can't wait to see 3b1b make an analytic continuation video about the Ackerman function.
What is A[pi]? What would the analytic continuation look like?
Interesting question
first youd have to do something like A[3.5]
youre looking at fractional hyperoperations, which is something fascinating but im not sure theres any documentation on
@@LumegrinA[3.5] would be two 3.5's with 1.5 up arrows in between but so far I haven't heard of anyways to have a fractional number of up arrows.
@@nickronca1562 hyper-3.5 yes
@@Lumegrin Fractional Hyperoperations has to be the coolest phase I’ve heard in a long time. I agree I thinking that working on the solution to a rational might give insight into the solution between A(3) and A(4). It feels like this multi-function (if that’s the right term) is highly ill behaved. Is there a Taylor series expansion for tetration?
I’m glad mathematicians finally discovered a function that can help us calculate CaseOh’s true weight.
levi going crazy w this one
''This escalated quickly''
You got this completely wrong. This has nothing to do with the Ackerman function, except that both grow fast.
The Ackerman function is a recursive function with 3 arguments. And it grows even faster and takes much longer to compute.
That is was I learned.
A very fast function rhat can only implement recursive, not interactive.
A pure recursive function.
There is a Computerphule video about it for example.
I immediately searched this up on Google. You were right, @Domo3000.
Thank you for saying this, I thought I was going insane watching this haha
There is an ackerman 1 argument function, 2 arguments and 3. They are all closely related.
I see you all looked this up on Wikipedia, and then boldly and confidently completely misunderstood what Wikipedia said. Well done, you've made yourselves look like idiots.
A(m, n, p) is the original form of the function, as Ackermann described it.
A(n) as described in the video is an alternate representation of the EXACT SAME FUNCTION.
The Ackermann function doesn't grow faster than the Ackermann function, because it obviously IS the Ackermann function. There are ways of configuring it with A(m, n, p) that grow faster than the one typically used for A(n), however.
Dunning-Kruger strikes again!
I drove past Qinquagintillion on my way to Muskoka
Ackermann Function with Graham's number as both of the parameters.
at the scale of grahams number, this is really not that much bigger
G_64 is A^64(4) - to make Graham's number be small, you want to use better tools, not boring "function applications".
Like use ordinals to define recursion and grab a large ordinal and have it define recursion of n:->n+1… Or pull out busy beaver, or other powerful tools.
That's smaller than G(65) lmao
Ack function < Graham Number why? So we gonna use BEAF notation a{n}b a is what number gonna repeat,n is n Arrow for shorthand,b is how much repeat to a uhh let's start with graham first
G_0 = 4
G_1 = 3{4}3 or 3↑↑↑↑3(hexation) ≈ A(5)
G_2 = 3{3{4}3}3 you should do inside first then outside
G_3 = 3{3{3{4}3}3}3
G_n = 3{...{4}...}3 with n times
If you want to dwarf Graham's number, it's more fun to use faster growing function, like the TREE function or busy beaver game. Both of those would quickly surpass anything you put into the Ackermann or g function.
I'm glad we know how many atoms there are in the universe, I would have thought that would be impossible to know.
"Observable universe" and an upper bound. The point is this grows so fast that it blows past such upper bounds, squared.
so you believe in an unobservable universe? without observable evidence for it?
@@adamsmith7885 I mean, suppose you have a flashlight. And you know the flashlight has a 1 meter range. And in every direction you see stuff, with no special edge at 1 meter. Would it be reasonable to assume "what I can observe is an artifact of my measuring device, and not the limit of reality"?
We can observe some chunk of the universe. Assuming "it probably doesn't stop right at the edge of what we can see" seems reasonable.
@@adamnevraumont4027 you aren't familiar with what "Observable Universe" means. It doesn't mean "observed-so-far universe".
@@adamsmith7885 I am glad you are telepathic. Keep up the good work. This is not sarcasm. No really, no sarcasm at all. It is pure praise at your amazing abilities. Be content at how impressed everyone is.
Bro pronounced it so well that I officially am going to use that word to express large quantities.
Like I could write a quinquagintilion words
The clan must've been REALLY advanced to have named themselves after a literal mathematical function (AOT reference, btw)
Now ... Generalize.
Step 1. Let addition be f1, multiplication be f2, etc.
Then we can have operations for fN. In the video, we saw
f2(2,2) = 2 * 2.
We could also say
f2(5,4) = 5 * 4
Step 2. Let the function f be numbered with nonpositive N.
f0(a,b) = a
f_-1(a,b) = a-b
f_-2(a,b) = a/b
When we get to N
I had never seen Ackerman's function actual meaning besides being purely recursive. This content is good stuff!!
KENNYYYY!
oh, you haven’t grown at all!
@@mincat1412 AoT reference: ✅
4 tetrated by 4 is actually not 10^153, it is approximately 10^10^153. To put this into perspective:
take every atom in the universe and square it
for every atom in that new universe with the squared number of atoms, add a new zero. (1 -> 10 -> 100) and you'll eventually get 4 tetrated by 4
(Oh and if anyone's curious, A(5) is approximately equal to (10^2184)#3#4 using hyper notation)
ackermann(1) = 2
ackermann(2) = 4
ackermann(3) = 27
ackermann(4) = incomprehensibly large
Going from 27 to roughly 1 quinguagintillion in one go is kinda crazy
You can also write tetration with only 2 symbols. Instead of putting the "exponent" on the top right of the base, you write it on the top left.
Quintation being the next step and you write it either with three arrows as you showed or on the bottom left.
Pentation on the bottom right
How would A(0) be? I can't think of any operations below addition, and A(0) = 0 seems like an incomplete answer...?
it would be 1 since the first hyperoperation is the successor function which is just adding 1 to a number
@@Freddie_Office What about A(-1), A(-2) etc?
It can’t be 0 because the function is A(n), and zero is not a natural number.
@@Gregey I kinda mean it in the hypothetical sense, trying to make sense to the question if it was possible
@ It would probably be 1, kinda like 0!
It's really dope hearing someone talk about tetration! In my opinion, it's a very under-discussed operation!
In beaf terms, A(n)={n,n,n-2}
Was it like n{n-2}n ?
even cooler is the disjoint set union runtime can be optimized to inverse ackermann, which unlike ackermann grows extremely slowly, becoming near O(1)
What about pentation, hexation, septation, octation, nonation, decation, undecation, dodecation?
I like the fast growing heiarchy which defines functions recursively. f_0(n) = n+1, f_1(n) = f_0(f_0(f_0...(n)), where f_0 is applied n times.
Each function is defined in terms of the previous in the same way, i.e. f_m+1(n) = f_m(f_m(f_m...(n)), where f_m is applied n times.
Since this is very similar to the operations described in the video, where each is the previous repeated, this hierarchy approximates that behaviour, so f_0(n) = n+1 (addition), f_1(n) = 2*n (multiplication), f_2(n) = n*2^n (slightly faster than an exponential, but the exponential term dominates) etc.
So, VERY roughly, A(n) =~ f_n-1(n)
This means A(n) actually grows about at the same rate as the first fast growing heirarchy function with a "transfinite" index. This is called omega (I'll write it as w), and defined by f_w(n) = f_n(n). This models the behaviour of A(n), in an extremely loose way.
But we can just add one to the index in the fast growing heirarchy and produce something that grows much faster:
f_w+1(n) = f_w(f_w(f_w...(n)) where f_w is applied n times. This grows much much faster than A(n). Like it's not even close.
GREAT VIDEO 📹 👍 👏 👌
The fact that it’s not worth a quinquagantillion, but a quinquantillion digits long is absolutely insane
My favorite part about this is that you called it a tower of powers
I remember the inverse of this function being the time complexity of union-find when optimized with path compression and union by rank
Well, that escalated quickly
it really did
Good. Now extend it to the rationals
you know, you will never forget the first feeling of realizing the full power of Googleology and no, I’m not talking about the arrow notation of the whip, not about Gray’s number, but about such titans as TREE(n) (By the way, this function is many times the function A(n)) about such as Rayo number R(n) about people like FOOT(n) and so on and so on....
typically in a comp sc curriculum you get to learn about the ackermann function. theres even faster growing functions. investigating these kind of features has been largely motivated by results from georg cantor's work.
Its threatening to watch that two pop up on the final image with no volume
After tetration comes pentation, which actually will be autocorrected on some devices because it doesn’t recognize it as a word..
The Ackerman function really reminds me of f_ω(n) = f_n(n) ≈ 2↑(n-1)n, which is presented, in the ”Numberphile”-video: ”TREE vs. Graham’s Number - Numberphile”:
f_ω(0) = f_0(0) = 0+1 = 1;
f_ω(1) = f_1(1) = 2*1 = 2;
f_ω(2) = f_2(2) = 2²*2 = 8;
f_ω(3) = f_3(3) = 121-Million-Digit-Number;
f_ω(4) = f_4(4) = [10↑³4; 10↑³5];
and so on….
The legendary infinite ordinal -indexed function, in the Fast-Growing Hierarchies / FGH (just in case you’re a bit rusty on the meaning of the index: ”ω”). 😅
Do a video on fractional inputs to A()
Can it take negative or non-integer inputs?
Actually, A(4) is 4^1.34e+154, the number can't even be written, there's not enough of anmything to write it
I guess you mean that all of its *digits* can't be written. The number itself can be written very easily: A(4).
You misspelled anything
A(4)=4^1.34e+154, neither of which can be written. Thus, this post does not exist.
*This sentence is not true*
Great video. I remember implementing karatsuba and dft integer multiplication for a final project in my advanced algorithms class. I have to say I felt quite smug after your karatsuba performance was equally as shit as mine 😂
I was not expecting this ackerman
The reason why it tests the limits of computation it's not because the numbers are large but because it is a small simple testable example of a non-primitive recursive function
it´s used to slay titans and protect eren
"and square it" oh you ate that
For something really fast-growing, check out Goodstein sequences.
What is the importance of this function? , i need more information about it
This is why mathematicians ought to be licensed.
A new busy beaver value was recently proven BB(5)=47,176,870
The Busy beaver function is the fastest growing function which is still computable and grows even faster than this.
The busy beaver function isn't computable. If it were, you could solve all kinds of problems like the halting problem, simply by knowing that the longest computation a program that big will take is BB(...)
How do you know how many atoms are in universe, Did you count it?
Is there a furnctional equivalent that does A[x} for non-integer values of x? (Like gamma function is to factorial)
i wonder how quickly the equivalent for the commutative hyper-operations is.
suppose you have some binary operation + and you want to create a hyperoperation •, then we define the commutative hyperoperations as:
ln(a•b)=ln(a)+ln(b)
clearly this turns addition into multiplication, but it also turns multiplication into a new operation, which is like a commutative version of exponentiation. this new operation is a^ln(b)=b^ln(a)=exp(ln(a)ln(b))
then just do the ackermann function thing with this. not sure if itd work well because the domains of the commutative hyperoperations are weird
Benannt nach einem gewissen Sparkassenvorstand und beschreibt die Geschwindigkeit mit der Gelder in schwarze Kassen verschwinden?
This is not the full ackermann function.
The full process is described recursively, as this version relies on knuth arrows, which ackermann does not have credit to.
Ackermann's function relies on the "Ackermann's Worm" which is a weaker version of the Beklemishev Worm.
You begin with a number, and a "row" number.
eg 2 [1]
1. If list empty, return row
2. Else, increment row,
3. If last term = 0, delete it
4. Else, replace the last term with "row" copies of last term - 1
Process for A(2,1) is as follows:
2[1]
1,1[2]
1,0,0,0[3]
1,0,0[4]
1,0[5]
1[6]
0,0,0...[7]
[14]
A(2,1) = 14
The *true limits* of computation are the Busy-Beaver fns. Ack was just the 1st fn to prove "non-primitive" recursive fns exist and are computable
I don't think it counts if the function isn't computable in the first place. :-) There are lots of uncomputable functions that show the limits of computation.
@@darrennew8211 I agree
So A[5] is what operation? Pentation? Like the G function?
I mean, the limits of computation as in "if you try to calculate a number with more digits than there are atoms in the observable universe you can't".
Thank you
Me and the boys about to pull up to the ackerman function
Goodstein sequence is insane too it grows faster that any functions tho it does converge to zero
How does that demonstrate the limits of computation?
Actually it's 4^4^4 which has around 150 zeros.
While A(4) = 4^4^4^4 is waaaay bigger (4 to the power of the former number)
We can finally measure how heavy caseoh is
I think you calculated my brain cells in the first equation 🥹
So what is A(inf) or A(-inf) or even A(0.5) would be?
Imagine being a fan of Attack on Titan and hearing about the Ackermann function.
What happens if we try this with decimals or negative numbers though? 🤔
That escalated quickly
Thats a crazy sequence
I’m more interested in what happens when you input a non-integer
What about A[G(64)] i.e, Graham's Number??
A(G64)?
That’s G64{G64-2}G64
G64 followed by G64 arrows...
Ackermann woke up and thought of doing somethin big 😭
The word "squaring" is true... but it doesnt do justice to how big that is. It is if every atom in the universe had a universe inside it.
"One! I can count to one
Two! I can count to two
There! I can count to three
Four! I CAN COUNT NO MORE!"
when i heard the number of the particles in the universe _squared_ my jaw literally fell off
That escalated quickly! /anchorman
and if you repeat the tower of powers, you get funky 16ths
I'm curious what's before one in that function
So a[5] ... and so on ?? It's a virtual cliffhanger! That's computationally complex!!!
note: this is the single-argument ackermann function
the actual function is 3-arguments long
finally someone from googology server
All the atoms in the "visible" universe. The difference is extremely big, as the research on this topic suggest that the universe is -if not totally- almost flat (infinite).
quinquagintillion is a word I’ve never heard before
What will be A[5] ?
As soon as I heard, "Tower of Powers" I immediately though of Frank Zappa and "Bobby Brown".
What's the next higher function?
What about smth like A[3.5]? Seems unreasonable to have the 3.5th hyperoperation and do it 3.5 times
This would break the function. First it's important to note that the most commonly used version of the Ackerman function is actually a binary function. It's implemented in such a way that if either of the inputs to the function are greater than zero, it subtracts one from them and they get fed back into the function recursively until they equal zero, at which point the function returns. Since you can't obtain 0 by iteratively subtracting 1 away from a non-integer number (such as 3.5), the function is only defined for the natural numbers.
@@csdrew22 i just wondered if it can be generalized, just like how factorial can be applied to all real numbers when its just a recursive function and was only defined for natural numbers
It’s Impossible to do it with decimals
So Yeah. My answer is idk
Or if i guess…
It’s 3.5{1.5}3.5