Skip to main content
2 answers
5
Asked 942 views

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

+25 Karma if successful
From: You
To: Friend
Subject: Career question for you

5

2 answers


0
Updated
Share a link to this answer
Share a link to this answer

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

0
0
Updated
Share a link to this answer
Share a link to this answer

Manish’s Answer

Excerpted from: https://www.daviddarling.info/encyclopedia/A/Ackermann_function.html

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
0