Math, asked by Manishdhameja6677, 6 months ago

f(1)=1 f(2n)=f(n) f(2n+1)=f(n)+1.what is the f(2^2019-1019)?

Answers

Answered by ajmerashanta
0

Step-by-step explanation:

Assuming f is only defined on {1,2,...,1994}, we have

for all valid n. Hence,

.

.

.

There is a slick algorithm that can be used to find the maximum value of f(n). First, assume that n is odd (this is because f(2n) = f(n), so f(n*2^k) = f(n)). We can now "increment" by 1 because f(3) = f(1)+1 = 2, then we use a recursive definition to obtain f(7) = f(3)+1 = 3, and so on. We have

.

.

.

The largest k we can allow is 11, because 2^12 is too large for our domain. Hence, the maximum value of f(n) is 11.

Similar questions