CS 302 - Data Structures & Algorithms II - Spring 2005
Homework 18
Loyola College
>
Department of Computer Science
>
CS 302
>
Homework
> Homework 18
Due
Friday, April 15 at the beginning of class
Assignment
Read Handout on Induction
Exercise 1 and 4 in the handout
Consider the following recursive function:
int p (int x) { if (x < 3) return x; else return p(x-1) * p(x-3); }
Let m(x) be the number of multiplication operations that the executtion of p(x) preforms.
Write a recursive definition of m(x).
Prove that your answer to Part a is correct by using mathematical induction.