Question

Question 10. Consider the function defined by f(n) = 2n where n is a positive integer....

Question 10. Consider the function defined by f(n) = 2n where n is a positive integer.

(i) Can this function be computed by a Turing machine? Why or why not? (

ii) Is this function primitive recursive? Why or why not?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. The function can be computed by a turing machine as it can be computed by a modern computer. Since a turing machine can simulate ANY computer algorithm, it can simulate the above function as well.

2. A function that can be implemented using only do-loops is called primitive recursive. The function can be written using loop and running it 2 times adding the value of n to a sum varibale initialised to 0. Hence it is a primitive recursive function.

Hope this helped. Please do upvote and if there are any queries please ask in comments section.

Add a comment
Know the answer?
Add Answer to:
Question 10. Consider the function defined by f(n) = 2n where n is a positive integer....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT