Chapter 5: Q15E (page 370)
Devise a recursive algorithm for computing the greatest common divisor of two nonnegative integers a and b with using the fact that gcd (a,b) = gcd (a,b - a) .
Short Answer
The recursive algorithm is,
Chapter 5: Q15E (page 370)
Devise a recursive algorithm for computing the greatest common divisor of two nonnegative integers a and b with using the fact that gcd (a,b) = gcd (a,b - a) .
The recursive algorithm is,
All the tools & learning materials you need for study success - in one app.
Get started for freeIn the proof of Lemma 1 we mentioned that many incorrect methods for finding a vertex such that the line segment is an interior diagonal of have been published. This exercise presents some of the incorrect ways has been chosen in these proofs. Show, by considering one of the polygons drawn here, that for each of these choices of , the line segment is not necessarily an interior diagonal of .
a) p is the vertex of P such that the angleis smallest.
b) p is the vertex of P with the least -coordinate (other than ).
c) p is the vertex of P that is closest to .
(a) Determine which amounts of postage can be formed using just 4-cent and 11-cent stamps.
(b) Prove your answer to (a) using the principle of mathematical induction. Be sure to state explicitly your inductive hypothesis in the inductive step.
(c) Prove your answer to (a) using strong induction. How does the inductive hypothesis in this proof differ from that in the inductive hypothesis for a proof using mathematical induction?
Prove that is nonnegative whenever n is an integer with
Give a recursive algorithm for finding whenever n! and m are positive integers.
Devise a recursive algorithm for computing where n is a nonnegative integer, using the fact that . Then prove that this algorithm is correct.
What do you think about this solution?
We value your feedback to improve our textbook solutions.