Chapter 5: Q4E (page 370)
Trace Algorithm 3 when it finds gcd (12,17) . That is, show all the steps used by Algorithm 3 to find gcd (12,17).
Short Answer
The value of gcd(12,17) is 1.
Chapter 5: Q4E (page 370)
Trace Algorithm 3 when it finds gcd (12,17) . That is, show all the steps used by Algorithm 3 to find gcd (12,17).
The value of gcd(12,17) is 1.
All the tools & learning materials you need for study success - in one app.
Get started for freeUse strong induction to show that every positive integer n can be written as a sum of distinct powers of two, that is, as a sum of subset of the integers and so on. [Hint: For the inductive step, separately consider the case where is even and where it is odd. When it is even, note that is an integer.]
Prove that the first player has a winning strategy for the game of Chomp, introduced in Example 12 in Section 1.8, if the initial board is two squares wide, that is, a board. [Hint: Use strong induction. The first move of the first player should be to Chomp the cookie in the bottom row at the far right.]
Prove that whenever n is a nonnegative integer.
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) .
Let be the statement that in a triangulation of a simple polygon with sides, at least one of the triangles in the triangulation has two sides bordering the exterior of the polygon.
a) Explain where a proof using strong induction that is true for all integers runs into difficulties.
b) Show that we can prove that is true for all integers by proving by strong induction the stronger statement for all integers , which states that in every triangulation of a simple polygon, at least two of the triangles in the triangulation have two sides bordering the exterior of the polygon.
What do you think about this solution?
We value your feedback to improve our textbook solutions.