kanima
- 6
- 0
Hi, there, I was wondering if anyone knew a good way to implement if-statements in recursion-theoretic terms. Basically, I've come to the understanding that primitive recursion is analogous to a for-loop and mu-recursion to more general while-loops, but is there in general a simple analog of an if-statement in recursion theory?
For example, suppose that given partial recursive functions g and h I had the following algorithm which takes x as input.
if x < 50 then
How could I define a partial recursive function computing the above algorithm? What if the condition x < 50 were replaced by some more general recursive predicate R(x)?
I suspect this shouldn't be so difficult but I am quite new to this subject. If this is the case, I would be quite glad if someone would share their knowledge me.
Thanks!
For example, suppose that given partial recursive functions g and h I had the following algorithm which takes x as input.
if x < 50 then
return g(x)
elsereturn h(x)
How could I define a partial recursive function computing the above algorithm? What if the condition x < 50 were replaced by some more general recursive predicate R(x)?
I suspect this shouldn't be so difficult but I am quite new to this subject. If this is the case, I would be quite glad if someone would share their knowledge me.
Thanks!