How would you go about parallelizing a recursive function that can't be written in for loops (like Ackermann function)?
I am a high school student and I am exploring a career in computer science, and while I've been able to solve many other similar problems, I haven't found an efficient solution for this. #computer-science #computer-programming #parallel-computing
2 answers
Steve Lewis
Steve’s Answer
I found a discussion about this on a technical forum that may help you:
http://softwareengineering.stackexchange.com/questions/238729/can-recursion-be-done-in-parallel-would-that-make-sense
Manish’s Answer
The Ackermann function can only be calculated using a while loop, which keeps repeating an action until an associated test returns false. Such loops are essential when the programmer doesn't know at the outset how many times the loop will be traversed. (It's now known that everything computable can be programmed using while loops