Euclidean Division

The Euclidean division or whole division is an operation which, with two natural entireties called dividing dividend and , associates two entireties called quotient and remains . Initially defined in the whole natural nonnull, it spreads with the whole relative and the Polynôme S, for example.

This division is at the base of the modular Arithmétique and gives place to the creation of the congruences on the entireties.

Definitions

Euclidean division in the positive whole

\ forall (has, b) \ in \ mathbb {NR} \ times \ mathbb {NR} ^*, \ exists! (Q, R) \ in \ mathbb {NR} \ times \ mathbb {NR}, a=b.q+r \ quad and \ quad R < b

With two entireties has and B , with B not no one, Euclidean division associates a single quotient Q and a single remainder R , all two entireties, checking:

  • a = b.q+r \,
  • r < B \;

The assertion of the existence and the unicity of the remainder and the quotient is called Théorème of Euclidean division for the positive entireties .

Euclidean division in the relative whole

\ forall (has, b) \ in \ mathbb {Z} \ times \ mathbb {Z} ^*, \ exists Q, R \ in \ mathbb {Z}/a=b.q+r \ quad and \ quad |R| < |B|

With two entireties has and B , with B not no one, Euclidean division associates a quotient Q and a remainder R , all two entireties, checking:

  • a = b.q+r \,
  • |R| < |B|\;

The assertion of the existence of the remainder and the quotient is called Théorème of Euclidean division for the entireties .

If it were possible to define a division such as the unicity of the quotient and of the remainder is guaranteed, it would be nevertheless incompatible with the major general case in the Euclidean rings.

Euclidean division in the whole of the polynomials

See also: Polynomial and Euclidean division

Euclidean division according to the decreasing powers exists if the ring is defined on a body: \ forall (has, B) \ in \ mathbb {K} \ times \ mathbb {K} ^*, \ quad \ exists! Q, R \ in \ mathbb {K}, A=B.Q+R \ quad with \ quad \ operatorname {deg} (R) < \ operatorname {deg} (B)

With two polynomials has and B with coefficients in a body K with B not no one, Euclidean division associates a single quotient Q and a single remainder R , all two polynomials, checking:

  • A=B.Q+R \,
  • \ operatorname {deg} (R) < \ operatorname {deg} (B)
Unicity is guaranteed here, on the other hand it is necessary that K is a body. If not division is still sometimes possible, if for example the coefficient of the Monôme dominating of B is equal to 1.

Euclidean division in a ring

See also: Euclidean Ring

In certain types of just unit commutative rings, one can define an Euclidean division by

has = bq + R with R = 0 or v (R) < v (b) v being an application of has - { 0 } in \ mathbb Euclidean N called stathme . This application checks the following property: if has and B is two elements of has such as B divides has , then v (b) \ scriptstyle {\ Leq} v (A).
These rings are called Euclidean rings.

Algorithms of calculation

One is interested in calculation of Euclidean division of two entireties, knowing as a preliminary the operations of addition, subtraction, multiplication, and comparison, between integers. It is easy to bring back the problem to two positive entireties, and one restricts oneself with this case.

The algorithms described below calculate the quotient of Euclidean division; it is quite clear that the remainder from of deduced. Attention, the opposite would not be true.

First method, natural but naive, request far too many calculations for great numbers. One presents then two current methods, of similar complexity: the first is appropriate for calculations in bases 2 , and thus for data-processing programming; the second method, primarily equivalent, is an adaptation for the base of usual numeration, the decimal base, and is thus appropriate for calculations for the hand. It is the algorithm taught at the school.

Naive method

To carry out the Euclidean division of has by B , one builds a strictly decreasing continuation (a_i) defined by a relation of recurrence of step 1: a_0=a, then a_ {i+1} =a_i-b=a- (i+1) \ times b. There thus exists a smaller entirety I such as a_I: i.e. a-I \ times b, which is still written 0 \ Leq have \ times b. The quotient of sought division is thus I, and the remainder a-I \ times b.

The number of steps of this algorithm is thus I= \ frac {has} {B} ; each stage requires a subtraction and a comparison; the complexity of calculation grows linearly with has , i.e. exponentially with the size of has - if one agrees to measure the size of an entirety by the number of figures which its binary development requires (or decimal if it is preferred, that modifies the things only one constant), this size is about the logarithm of the entirety.

Current, binary method

A simple improvement consists in making a dichotomic research , on the quotient: instead of traversing like previously all the entireties since 0 while waiting for to fall on the good quotient, one will start by quickly finding an entirety which one will be sure that it is larger than the sought quotient; in the finished list of remaining possible quotients, one will make a binary search.

The first calculation is done simply by considering the geometrical continuation 2^n. As long as 2^n \ times B \ a, one increments N of 1 with each stage. That is to say N smallest entirety such as 2^N \ times B >a \, . The number of stages to find this entirety is about log_2 \ left (\ frac {has} {B} \ right) . Each one of these stages requires only one multiplication by two (even easier than an addition, for a binary writing), and a comparison.

For the second calculation, one builds two continuations (\ alpha_n) and (\ beta_n) ; one will store undervaluing sought quotient, the other of raising strict. One thus poses \ alpha_0=2^ {N-1} and \ beta_0=2^N, then by recurrence:

if \ frac {\ alpha_n+ \ beta_n} {2} \ times B \ a, then one can refine undervaluing it, and one thus poses \ alpha_ {n+1} = \ frac {\ alpha_n+ \ beta_n} {2} and \ beta_ {n+1} = \ beta_n \,
on the other hand, if \ frac {\ alpha_n+ \ beta_n} {2} \ times B > a, one can refine raising it, and one poses \ beta_ {n+1} = \ frac {\ alpha_n+ \ beta_n} {2} , and \ alpha_{n+1} = \ alpha_n \, .

One easily shows by recurrence that with each stage N of this second calculation, \ alpha_n and \ beta_n are two entireties, both multiples of 2^ {N-1-n} and of which the difference is worth 2^ {N-1-n} ; this remark in particular makes it possible to show that the continuations are well defined until n=N-1, and that \ alpha_ {N-1} and \ beta_ {N-1} differs only from 1 ; since they are respectively one undervaluing broad and one raising strict quotient, \ alpha_ {N-1} est the sought quotient.

The maximum number of stages for this calculation is about log_2 \ left (\ frac {has} {B} \ right) (one of the dichotomies could give the good quotient before the NR - 1 ème stage, it is the case of equality of the comparison, in which case one can stop the front algorithm), which each one requires only one addition, a division by two (easy in binary writing, it is not obviously an Euclidean division not hidden), a multiplication (which can be avoided, by managing more variables), and a comparison.

By concaténant the results of two calculations, one sees that this algorithm has a complexity which grows logarithmiquement with \ frac {has} {B} , and thus linearly with the size of has . The improvement is thus very clear.

Current, decimal method

That is to say two natural entireties has and b \ neq 0 which one wants to carry out division. One starts by finding the smallest power of 10 such as b \ times 10^ {N_1+1} \ geq a; according to the theorem of Euclidean division, there exists then a single entirety 0 \ Leq q_1<10 such as: q_1 \ times 10^ {N_1} \ times B \ Leq a< (q_1+1) \ times 10^ {N_1} \ times b. One thus brings back oneself to make the division of a-q_1 \ times 10^ {N_1} \ times b by b; the preceding inequality shows that the first power of 10 such as 10^ {N_2} \ times b will exceed a-q_1 \ times 10^ {N_1} \ times b will be strictly smaller than 10^ {N_1+1} ; it is noted 10^ {N_2+1} . One builds a succession of natural entireties thus (N_i) strictly decreasing; it is worth thus 0 with a certain row; one builds the continuation of entireties 0 \ Leq q_i< 10 associated same façonqu' one built q_1. The sought quotient will be \ sum_i q_i10^ {N_i} : indeed the inequality which gives q_r for the first occurrence of N_r=0 will be: 0 \ Leq a-b \ times \ sum_i q_i10^ {N_i} <10^ {N_r} \ times b=b, which is well the definition of the quotient.

It is noticed that this method is divided like the preceding one into two stages: initially a search for a power rather large, which again asks for a number of calculation logarithmic curve in has , i.e. linear in the size of has ; then a calculation of all the coefficients q_i associated with the various powers of 10 lower than the rather large power obtained. For each calculation of q_i, the algorithm asks for in fact a calculation of Euclidean division intermediate; but the quotient is to be sought only among the entireties of 0 with 9 ; it is thus done quickly by using tables.

This method is that used in primary education lorqu' it acts Poser a division.

In other rings

See too

With reading front

With reading afterwards

Random links:John Utaka | Mwai Kibaki | Bad seed | Disorders of the vicinity | Muli Katzurin | Jodocus_Badius