Chapter 5: Q19E (page 371)
Prove that Algorithm 3 for computing gcd (a,b) when a and b are positive integers with a < b is correct.
Short Answer
The recursive algorithm is proved.
Chapter 5: Q19E (page 371)
Prove that Algorithm 3 for computing gcd (a,b) when a and b are positive integers with a < b is correct.
The recursive algorithm is proved.
All the tools & learning materials you need for study success - in one app.
Get started for freeProve that for every positive integer n,
Let be the statement that when nonintersecting diagonals are drawn inside a convex polygon with sides, at least two vertices of the polygon are not endpoints of any of these diagonals.
a) Show that when we attempt to prove for all integers n with using strong induction, the inductive step does not go through.
b) Show that we can prove that is true for all integers n with by proving by strong induction the stronger assertion , for , where states that whenever nonintersecting diagonals are drawn inside a convex polygon with sides, at least two nonadjacent vertices are not endpoints of any of these diagonals.
Prove that if n is an integer greater than 6.
Use the well-ordering principle to show that if x and y are real numbers with x<y, then there is a rational number r with x<r<y. [Hint: Use the Archimedean property, given in Appendix 1, to find a positive integer A with . Then show that there is a rational number with denominator A between x and y by looking at the numbers , where is a positive integer.]
How does the number of multiplications used by the algorithm in Exercise 24 compare to the number of multiplications used by Algorithm 2 to evaluate ?
What do you think about this solution?
We value your feedback to improve our textbook solutions.