Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability and Random Processes With Applications to Signal Processing and Communications

Authors: Scott Miller, Donald Childers

2nd edition

123869811, 978-0121726515, 121726517, 978-0130200716, 978-0123869814

More Books

Students also viewed these Mathematics questions