Recurrence relation-there is no initial condition

251 Views Asked by At

I want to find the exact solution of the recurrence relation: $T(n)=2T(\sqrt{n})+1$.

$$m=\lg n \Rightarrow 2^m=n \\ \ \ \ \ \ \ \ \ 2^{\frac{m}{2}}=\sqrt{n}$$

So we have: $T(2^m)=2T(2^{\frac{m}{2}})+1$

We set $T(2^m)=S(m)$, so we get: $S(m)=2S \left( \frac{m}{2}\right)+1$

$$S(m)=2S \left( \frac{m}{2}\right)+1=2^2S\left( \frac{m}{2^2} \right)+2+1= \dots= 2^i S \left( \frac{m}{2^i}\right)+ \sum_{j=0}^{i-1} 2^j$$

If we would have an initial condition, let $S(1)=c$ then we would say that the recursion ends when $\frac{m}{2^i}=1$.

Now that we do not have an inital condition, do we suppose that $S(1)=c$? Or what else could we do?

1

There are 1 best solutions below

0
On

Well, first of all I assume that $T:\mathbb R^{\geq0} \rightarrow \mathbb R$ to avoid certain problems involving irrationals and complex numbers.

We may rewrite the recurrence $T(x)=2T(\sqrt{x})+1$ as $$T(x^2)=2T(x)+1$$

Now, since $T(x^2)=2T(x)+1$, if $x=1$ we get that $T(1)=2T(1)+1$ and thus $T(1)=-1$

Now if we diferentiate both sides with respect to $x$ we gain: $$\frac{d*T(x^2)}{dx}=2\frac{d*T(x)}{dx}$$ then via chain rule we get that $$\frac{d*T(x^2)}{dx^2}*\frac{dx^2}{dx}=2\frac{d*T(x)}{dx}$$ $$T'(x^2)*2x=2T'(x)$$ $$T'(x^2)=\frac{T'(x)}{x}$$ Now, likewise $$T'(x)=\frac{T'(x^{\frac 1 2})}{x^{\frac 1 2}}$$ Thus we may expand uppon the derivatives recurrence as: $$T'(x^2)=\frac{T'(x^{\frac 1 2})}{x*x^{\frac {1}{2}}}=\frac{T'(x^{\frac 1 4})}{x*x^{\frac {1}{2}}*x^{\frac 1 4}}=\frac{T'(x^{\frac {1} {2^n}})}{x*x^{\frac {1}{2}}*x^{\frac 1 4}*...*x^{\frac {1} {2^n}}}$$ Thus, since $a^b*a^c=a^{b+c}$, $$T'(x^2)=\frac{T'(x^{\frac {1} {2^n}})}{x^{\sum\limits_{i=0}^n \frac {1}{2^i}}}$$ Now, let us take the limit as $n$ approaches infinity and evaluate parts of the equation above: $$\lim\limits_{n \rightarrow \infty} x^{\frac {1} {2^n}}=1$$ $$\lim\limits_{n \rightarrow \infty} \sum\limits_{i=0}^n \frac {1}{2^i}=2$$ so $$\lim\limits_{n \rightarrow \infty} x^{\sum\limits_{i=0}^n \frac {1}{2^i}}=x^2$$ In the end we get that $$T'(x^2)=\lim\limits_{n \rightarrow \infty}\frac{T'(x^{\frac {1} {2^n}})}{x^{\sum\limits_{i=0}^n \frac {1}{2^i}}}=\frac{T'(1)}{x^2}$$ Or equivalently: $$T'(x)=\frac{T'(1)}{x}$$ Let $T'(1)=a$, then integrate the above equation with respect to $x$ $$\int T'(x) dx=\int\frac{a}{x}dx$$ $$T(x)=a\ln(x)+C$$ Where $C$ is the integration constant. Since $T(1)=-1$ and $a\ln(1)+C=C$, we gain that $C=-1$, next by evaluating the original relation: $$a\ln(x)-1=2a\ln(\sqrt{x})-2+1$$ $$a\ln(x)-1=2a\ln(x)*\frac 1 2-1$$ $$a\ln(x)-1=a\ln(x)-1$$ So $T(x)=a*\ln(x)-1$ for any real $a$ is the function we were looking for!

P.S.

I originally tried continuing your our original attempt, but to no avail. It does seem like a very interesting method tough.