In principle, each recursion can be implemented as a + stack cycle, because the fact that it is mainly implemented at the machine (hardware) level is just a bunch of branches and a stack for storing return addresses and arguments.
Take a loop that repeats until the condition is met, and instead of the recursive invokation, just push the parameters for the next iterations (and possibly the last state) onto the stack, and return to the starting point of the loop.
EDIT: (since it is clear that you are talking about a tail recursive backtrack, not a simple recursion):
From wikipedia : In computer science, a tail call is a subroutine call that happens inside another procedure as its final action . As far as I know, a function with several recursive calls is not tail recursion by definition , and since backtracking algorithms have more than one call, they are not tail recursive.
Also note that a program that has only loops and constant space can be transferred to the second program P ', which runs in polynomial time (since there are no more than 2^CONST states, which is basically CONST' , and checking each of them is executed during polynomial time, therefore, the results of CONST'*p(n) time, which is still polynomial), therefore , if P=NP , this is not possible , as this will allow us to solve SAT in polynomial time, translating the solution of inverse tracking into a loop based polynomial. (And I believe that a further reduction from HP is possible to show that this is impossible anyway).
source share