User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 456,468 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,813 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser: Programming Forums
Views: 1352 | Replies: 4
Reply
Join Date: Sep 2007
Posts: 6
Reputation: xraaz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
xraaz xraaz is offline Offline
Newbie Poster

Question alog for binomial coefficients

  #1  
Sep 16th, 2007
function C(fl, k)
if k 0 or 1< = n then return 1
elsereturn C(fl—1,k—1)+C(fl—1,k)


Analyse the time taken by this algorithm under the (unreasonable) assumption that the addition C(fl — 1, k — 1)+C(fl —1, k) can be carried out in constant time once both C(fl —1, k —1) and C(n —1, k) havebeen obtained recursively.Let t(n) denote the worst time that a call on C(fl, k) may take for all possible values 0f k, 0<= k <= n. Express t(n) in the simplest possible form in thete notation.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 6,515
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 31
Solved Threads: 488
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: alog for binomial coefficients

  #2  
Sep 16th, 2007
We're not here to do your homework. Try it yourself first.
I'm here to prove you wrong.
Reply With Quote  
Join Date: Jun 2005
Location: Cambridge, MA
Posts: 1,302
Reputation: Rashakil Fol has a spectacular aura about Rashakil Fol has a spectacular aura about 
Rep Power: 7
Solved Threads: 41
Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Salamander Man

Re: alog for binomial coefficients

  #3  
Sep 17th, 2007
It depends on your numeric representation.
You can adblock jbennet's avatar.
Reply With Quote  
Join Date: Sep 2007
Posts: 6
Reputation: xraaz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
xraaz xraaz is offline Offline
Newbie Poster

Re: alog for binomial coefficients

  #4  
Sep 17th, 2007
Originally Posted by Rashakil Fol View Post
It depends on your numeric representation.



thanks for the hint
Reply With Quote  
Join Date: Sep 2007
Posts: 6
Reputation: xraaz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
xraaz xraaz is offline Offline
Newbie Poster

Re: alog for binomial coefficients

  #5  
Sep 17th, 2007
Originally Posted by Narue View Post
We're not here to do your homework. Try it yourself first.




i have not asked for the answer just give me a hint
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Computer Science and Software Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Computer Science and Software Design Forum

All times are GMT -4. The time now is 2:24 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC