This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Give a recursive (divide and conquer idea) function (in a pseudo-code) to compute C(n,m). b. What is the worst case running time for 10(a) as a function of n? c. Give a dynamic programming algorithm to compute C(n,m). Hint. The algorithm constructs a table generally known as Pascals triangle. d. What is the worst case running time for 10(c) as a function of n? Try to be as exact as possible. a. Function RCOMBINATION(n,m):integer begin if m==0 or m==n then begin RCOMBINATION:=1; return; end RCOMBINATION:= RCOMBINATION(n-1,m)+ RCOMBINATION(n-1,m-1); end...
View Full Document
- Spring '03