Division algorithm
Encyclopedia : D : DI : DIV : Division algorithm
The division algorithm is a theorem in mathematics which precisely expresses the outcome of the usual process of division of integers. The name is something of a misnomer, as it is a theorem, not an algorithm, i.e. a well-defined procedure for achieving a specific task — although the division algorithm can be used to find the greatest common divisor of two integers.
Statement of theorem
Specifically, the division algorithm states that given two integers a and d, with |a| > |d| ≠ 0
There exists unique integers q and r such that a = qd + r and 0 ≤ r < | d |, where | d | denotes the absolute value of d.
The integer
- q is called the quotient
- r is called the remainder
- d is called the divisor
- a is called the dividend
Examples
- If a = 7 and d = 3, then q = 2 and r = 1, since 7 = (2)(3) + 1.
- If a = 7 and d = −3, then q = −2 and r = 1, since 7 = (−2)(−3) + 1.
- If a = −7 and d = 3, then q = −3 and r = 2, since −7 = (−3)(3) + 2.
- If a = −7 and d = −3, then q = 3 and r = 2, since −7 = (3)(−3) + 2.
Proof
The proof consists of two parts — first, the proof of the existence of q and r, and secondly, the proof of the uniqueness of q and r.
Existence
Consider the set
- [S = \left\\right\}]
- If d < 0, then −d > 0, and by the Archimedean property, there is a nonnegative integer n such that (−d)n ≥ −a, i.e. a − dn ≥ 0.
- If d > 0, then again by the Archimedean property, there is a nonnegative integer n such that dn ≥ −a, i.e. a − d(−n) = a + dn ≥ 0.
It only remains to show that 0 ≤ r < |d|. The first inequality holds because of the choice of r as a nonnegative integer. To show the last (strict) inequality, suppose that r = |d|. Since d ≠ 0, r > 0, and again d > 0 or d < 0.
- If d > 0, then r = d. Let q
' = q + 1; then q' is an integer and q' d = (q + 1)d = qd + d = qd + r = a, i.e. a − q' d = 0. - If d < 0, then r = −d. Let q
' = q − 1; then q' is an integer and q' d = (q − 1)d = qd − d = qd + r = a, i.e. a − q' d = 0.
Uniqueness
Suppose [ \exists q,Q ] and [ r, R ] with [ 0 \leq r,R < |d| ] such that [ a = dq + r ] and [ a = dQ + R. ]
Subtracting the two equations yields: [ d(Q - q) = (r - R)] .
By divisibility rules, we have that since both sides are elements of integers, [ d ] must divide [ (r - R) ]. However, [ -d < r - R < d ] and in this range, the only possible element satisfying this condition is 0. Hence [ r - R = 0 ] or [ r = R ] .
Substituting this into the original two equations quickly yields [ dq = dQ ] (Recall: d is not 0) and thus [ q = Q ] proving uniqueness.
Generalisations
There is nothing particularly special about the set of remainders . We could use any set of |d| integers, such that every integer is congruent to one of the integers in the set. This particular set of remainders is very convenient, but it is not the only choice. See also coset and equivalence relation.
External links
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
