Recursive problem

ahmed p.samir.p at gmail.com
Thu Feb 13 01:55:20 EST 2014


So we had to do a project for our python class and we came across a recursive problem. The code we had to write was as follows:

T(n)
if n == 1
return 1
else
for any number(k) between 1 and n - 1
2 * T(n-k) + 2^i - 1

from this we need to get the minimum number which would be produced depending on k. I don't know how to go about doing this. Any help would be appreciated. Thanks in advance.



More information about the Python-list mailing list