Discrete Mathematics and its Applications - 14.
a) What is a recursive algorithm?
b) Describe a recursive algorithm for computing the sum of n numbers in a sequence.
Recursive Algorithm - 23. Give a recursive algorithm for computing n * a using only addition, where n is a positive integer and a is a real number. (add a to itself n times).
Archimedes found his approximation to Pi by inscribed polygons - Archimedes found his approximation to Pi by inscribed polygons -
Start with a circle of radius 1 and a suitable starting polygon and solve for an inscribed polygon of 96 sides.
Next, start with ...
Recursive algorithms - Write a recursice algorithm to find x^n mod m whenever n,x and m are positive integers based on the fact that :
x^n mod m = (x^(x-1) mod m * x mod m)mod m
Approximation with Taylor polynomials - Suppose that the function F:R->R has derivatives of all orders and that:
F"(x) - F'(x) - F(x) = 0 for all x
F(0)=1 and F'(0)=1
Find a recursive formula for the coefficients of the nth Taylor po ...