On Sat, Sep 10, 2011 at 11:28 AM, teja bala <pawanjalsa.t...@gmail.com> wrote:
> @Gaurav
>
> wat if here is n=1
> den
>  W(0)=?
>
>  i dint get that

See, when you get to W(0) state, that means, you have created a valid
combination. That means, you have gone through one 'path' through the
various possibilities. That is why W(0)=1. It is the 'tail' of the
recursion, i.e. the base case.

When n=1, then, W(1)=W(1-50)+W(1-25)+...+W(1-1)
All but the last factors would call W(n') where n' < 0, and would
result in 0. But the last part would be W(0), which is a valid state.
So W(1) = 0+0+...+W(0)  = 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.
>



-- 
Gaurav Menghani

-- 
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.

Reply via email to