Let x be a
non
negative integer.
F(0) = 0
and
F(x) = 2 * F( x - 1) + x2,
when x > 0.
III. Analyze the time of your both programs in terms of Big-Oh notation.
Note:
You may check your programs by entering the following data:
|
// clock_t is pre-defined type in time.hORclock_t Begin_time, End_time;
int time;
Begin_time = clock();
//......
//.....
//....
End_time = clock();
time = End_time - Begin_time; //duration time
#include <time.h>
// clock_t is pre-defined type.
// CLOCKS_PER_SEC is a pre-defined constant in time.hclock_t Begin_time, End_time;
double time;
Begin_time = clock();
//......
//.....
//....
End_time = clock();
time = (double)(End_time - Begin_time) / CLOCKS_PER_SEC; //duration time
V. Research deeper in these two topics. Summarize your reading
and your computer work.
Write a formal paper including all references.
VI. Make a PowerPoint presentation about your topic and present to
class.