•
•
•
•
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
![]() |
•
•
Join Date: Sep 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
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.
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.
•
•
Join Date: Jun 2005
Location: Cambridge, MA
Posts: 1,302
Reputation:
Rep Power: 7
Solved Threads: 41
![]() |
•
•
•
•
•
•
•
•
DaniWeb Computer Science and Software Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax asp blog business software computer dell design developer development erp systems experiment firefox howto india intel internet it java linux media microsoft mmorpg msdn networking news office open open-source operating programming project management rss science security software software selection source sql sun super system technology evaluation toread vista warez web wiki windows xp
- binomial coefficient (Software Developers' Lounge)
- matlab program help (Legacy and Other Languages)
- WHY(term does not evaluate 3 arguments) (C++)
- polynomials (Java)
- how to let the user select and change the coefficients of a cubic (C)
- July PR update? (Search Engine Optimization)
- Function that returns void (C++)
Other Threads in the Computer Science and Software Design Forum
- Previous Thread: time and complexity
- Next Thread: Help in parallel algos



Linear Mode