Question: Using the Strong Principle of Mathematical Induction, write a proof that the decimal to base-6 conversion algorithm that was discussed in class on April 18


Using the Strong Principle of Mathematical Induction, write a proof that the decimal to base-6 conversion algorithm that was discussed in class on April 18 (and that is posted in the Handouts folder of the Content page on D2L) does indeed compute the coefficients of the base-6 expansion of the input integer n. More precisely, let b greaterthanorequalto 2 be a fixed positive integer. Using the strong principle of mathematical induction, prove for all integers n greaterthanorequalto 1 that when the algorithm is applied to the inputs n and b, the output integers r[0], r[1], ellipsis, r[k] satisfy the equation n = r[0] middot b^0 + r[1] middot b^1 + r[2) middot b^2 + ellipsis + r[k - 1] middot b^k_1 + r[k] middot b^k. (The discussion in class of the correctness of the division algorithm may provide you with some inspiration for writing your proof. The proof of Theorem 5.4.1 in the textbook could also provide you with some small amount of inspiration.) Algorithm (Decimal to base-b conversion). The inputs of the algorithm are positive integers n greaterthanorequalto 1 and b greaterthanorequalto 2. The aim of the algorithm is to produce a sequence of base-b digits r[0], r[1], ellipsis, r[k] so that the base-b representation of n is (r[k]r[k-1] ellipsis r[2]r[1]r[0])_b. In other words, the integers r[0], r[1], ellipsis, r[k] should satisfy 0 lessthanorequalto r[j]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
