Question

In: Computer Science

Use the well-ordering property to prove the division algorithm. Recall that the division algorithm states that...

Use the well-ordering property to prove the division algorithm. Recall that the division algorithm states that if a is an integer and d is a positive integer, then there are unique integers q and r with 0 ≤ r < d and a = dq + r.

Solutions

Expert Solution

Answer:-----------

The Division Algorithm:- If a is an integer and d is a positive integer with n > 0, then there are unique integers q and r, with 0 <= r < d, and a = dq + r .

Again, this is so basic that one may doubt whether it should even be proved. But the well-ordering principle allows us, in fact, to prove the division algorithm in a rigorous manner:

Let W = { a - td | t∈ Z }
It is obvious that W contains nonnegative integers.
Let V = { v∈ Z | v >= 0}.
By the well-ordering principle, v has a smallest element, which we'll call r. r ∈ V , so r = a - qd for some q and r >= 0 (by the definition of sets W and V, correspondingly).

Now, what's left to prove is that r < n. Let's assume the opposite, namely that r = a - qd >= n .
Rearranging: r - d = a - (q + 1)d >= 0 .
By the definition of V, a - (q + 1)d ∈ V (since it has the form a - td  for some integer t and is nonnegative). But recall that we called r the smallest element of V, and a - (q + 1)d < = r , so we have a contradiction.

Therefore, we see that r < n. This completes the proof..


Related Solutions

use well ordering principle to prove that sqrt(6) is not rational
use well ordering principle to prove that sqrt(6) is not rational
Use the Well-Ordering Principle of the natural numbers to prove that every positive rational number x...
Use the Well-Ordering Principle of the natural numbers to prove that every positive rational number x can be expressed as a fraction x = a/b where a and b are postive integers with no common factor.
Prove the following MST algorithm is correct. You can use the cut property in your proof...
Prove the following MST algorithm is correct. You can use the cut property in your proof if you want, but it's not clear it's the best approach sort the edges according to their weights for each edge e ∈ E, in decreasing order of weight : if e is part of a cycle of G: G = G − e (that is, remove e from G) return G
With respect to the division of property, what is the difference between community property states and...
With respect to the division of property, what is the difference between community property states and states that are not community property states?
In this exercise, we will prove the Division Algorithm for polynomials. Let R[x] be the ring...
In this exercise, we will prove the Division Algorithm for polynomials. Let R[x] be the ring of polynomials with real coefficients. For the purposes of this exercise, extend the definition of degree by deg(0) = −1. The statement to be proved is: Let f(x),g(x) ∈ R[x][x] be polynomials with g(x) ? 0. Then there exist unique polynomials q(x) and r(x) such that f (x) = g(x)q(x) + r(x) and deg(r(x)) < deg(g(x)). Fix general f (x) and g(x). (a) Let...
(A) Prove division with remainder makes sense for integers as well as natural numbers. In other...
(A) Prove division with remainder makes sense for integers as well as natural numbers. In other words prove the following. Proposition: Let d be a nonzero integer. For any integer n, there exist unique integers q and r such that n = dq + r and 0 ≤ r < |d|.
Can any genius explain me about well-ordering principle - Proofs using well-ordering principle. with some examples.
Can any genius explain me about well-ordering principle - Proofs using well-ordering principle. with some examples.
In the Forward Chaining algorithm, after the algorithm stops, prove that for those atoms that are...
In the Forward Chaining algorithm, after the algorithm stops, prove that for those atoms that are not assigned to true during the inference process, there exists a model in the KB in which the atom is true and there exists a model in the KB in which the atom is false.
Write an algorithm to determine if two binary trees are identical when the ordering of the...
Write an algorithm to determine if two binary trees are identical when the ordering of the subtrees for a node is ignored. For example, if a tree has root node with value R, left child with value A and right child with value B, this would be considered identical to another tree with root node value R, left child value B, and right child value A. Make the algorithm as efficient as you can. Analyze your algorithm’s running time. How...
Recall the truncated distribution function F* and the algorithm for generating from it, as given in...
Recall the truncated distribution function F* and the algorithm for generating from it, as given in Sec. 8.2.1. (a) Show that the algorithm stated in Sec. 8.2.1 is valid when F is continuous and strictly increasing. (b) Show that the following algorithm is also valid for generating X with distribution function F* (assume again that F is continuous and strictly increasing): 1. Generate U , U(0, 1). 2. If F(a) # U # F(b), return X 5 F21(U). Otherwise, go...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT