What is the definition for Ackermann’s function?

Category: QuestionsWhat is the definition for Ackermann’s function?
Editor">Editor Staff asked 4 weeks ago

What is the definition for Ackermann’s function?
 
(a) A(1,i) = i+1 for i>=1
 
(b) A(i,j) = i+j for i>=j
 
(c) A(i,j) = i+j for i = j
 
(d) A(1,i) = i+1 for i<1
 
The query is from Trees in section Trees of Data Structures & Algorithms I
 
This question was addressed to me during an online interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Correct option is (a) A(1,i) = i+1 for i>=1
 
Easy explanation – The Ackermann’s function is defined as A(1,i) = i+1 for i>=1. This form in text grows faster and the inverse is slower.