This is simple..
Find the values for f(n) for n=1,2,3,4,... n-1 which are 0, 1, 2, 3, ... n-2
respectively. (Solve the equation for n=2,3, etc to get the values).
From the pattern you can easily find out that f(n+1)= n.
On Wed, Feb 16, 2011 at 9:15 PM, Vikas Kumar dev.vika...@gmail.com wrote:
f(n)=n-1.
On Wed, Feb 16, 2011 at 7:39 PM, Akshata Sharma akshatasharm...@gmail.com
wrote:
please help..
if f(n+1) = max{ f(k) + f(n-k+1) + 1} for 1 = k = n; f(1) = 0.
Find f(n+1) in terms of n.
Eg: f(4) = ? n = 3; 1= k = 3; f(4) = max{f(1) + f(3) + 1, f(2) +
f(2)+1, f(3) + f(1) +1}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.