1) Explain which one you should choose Memoized-Cut-Rod() or Cut-Rod(). Defend your decision by explaining the comparative advantages. In other words, where does the time saving come from ? (5 points)
2) What is the hidden cost when a recursive algorithm is implemented in a programming language ? (5 points)
4) Explain why we were able to use a) instead of b) (3 points) What is the main benefit doing so (2 points) ? a) max 1≥i≥n ( p[i] + r(n-i) ) b) max 1≥i≥n ( r(i) + r(n-i) ) Feel free to use drawings
0 comments