Chapter 5: Q8E (page 370)
Give a recursive algorithm for finding the sum of the first n positive integers.
Short Answer
The recursive algorithm is,
Chapter 5: Q8E (page 370)
Give a recursive algorithm for finding the sum of the first n positive integers.
The recursive algorithm is,
All the tools & learning materials you need for study success - in one app.
Get started for free(a) Find the formula for by examining the values of this expression for small values of n.
(b) Prove the formula you conjectured in part (a).
Let P(n) be the statement that , where n is an integer greater than 1.
a) What is the statement P(2)?
b) Show that P(2) is true, completing the basis step of the proof.
c) What is the inductive hypothesis?
d) What do you need to prove in the inductive step?
e) Complete the inductive step.
f) Explain why these steps show that this inequality is true whenever n is an integer greater than 1.
Give a recursive algorithm for finding the minimum of a finite set of integers, making use of the fact that the maximum of n integers is the smaller of the last integer in the list and the minimum of the first n - 1 integers in the list.
Use strong induction to show that when a simple polygon P with consecutive vertices is triangulated into n-2 triangles, the n-2 triangles can be numbered so that is a vertex of triangle i for .
Prove that divisible by 8 whenever n is an odd positive integer.
What do you think about this solution?
We value your feedback to improve our textbook solutions.