Question: please help 5. Consider the following recursive algorithm. 0 Input: a positive integer n. o Recursive step: If n is even then divide by 2;

please help

please help 5. Consider the following recursive algorithm. 0 Input: a positive

5. Consider the following recursive algorithm. 0 Input: a positive integer n. o Recursive step: If n is even then divide by 2; if n is off then replace in by 311 + 1. o If you get the answer 1 then stop; else repeat the recursive step. For example, if you start with 3, the algorithm goes 3, 10, 5, 16, 8, 4, 2, 1. You see that it takes 7 steps before it stops. Fill in the table below with the number of steps it takes before it stops for the initial choice 1The way I do this is I enter \"4276372320 + 371800\" on the calculator on my phone, then from the answer I subtract the integer before the decimal point to give me a decimal between lIII and I, then I multiply that by 371803

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!