Solution Found!
a. Prove: If a and d are positive integers and q and r are
Chapter 4, Problem 22E(choose chapter or problem)
QUESTION: Prove: If a and d are positive integers and q and r are integers such that a = dq + r and 0 < r < d, then?a = d(?(q + 1)) + (d ? r )and0 < d ? r < d.b. Indicate how to modify Algorithm 4.8.1 to allow for the input a to be negative.
Questions & Answers
QUESTION: Prove: If a and d are positive integers and q and r are integers such that a = dq + r and 0 < r < d, then?a = d(?(q + 1)) + (d ? r )and0 < d ? r < d.b. Indicate how to modify Algorithm 4.8.1 to allow for the input a to be negative.
ANSWER:Solution:
Step 1:
In this question we have to prove an equality and use this to modify Algorithm 4.8.1 to allow for the input a to be negative.