CURIUM
How can you share 30 marbles among 7 people without cutting any?

Euclidean division

How can you share 30 marbles among 7 people without cutting any?

By giving 4 marbles to each: 2 remain in the bag, and we write 30 = 7 × 4 + 2. The quotient is 4, the remainder is 2. The equality 30 = 7 × 3 + 9 is correct too, but not an Euclidean division — there are still 9 marbles for 7 players, so distribution is incomplete. The remainder must always be less than the divisor.

MathsArithmetic and numbers

The three levels

Beginner

How can you share 30 marbles among 7 people without cutting any?

By giving 4 marbles to each: 2 remain in the bag, and we write 30 = 7 × 4 + 2. The quotient is 4, the remainder is 2. The equality 30 = 7 × 3 + 9 is correct too, but not an Euclidean division — there are still 9 marbles for 7 players, so distribution is incomplete. The remainder must always be less than the divisor.

Intermediate

What is the remainder of the Euclidean division of −17 by 5?

3, not −2. For relative integers, the remainder must satisfy 0 ≤ r < |b|: it is always non-negative. We write −17 = 5 × (−4) + 3, with a quotient of −4. The equality −17 = 5 × (−3) − 2 is correct, but its negative remainder does not respect the convention.

Expert

How many answers can a computer give for −201 modulo 23?

At least two. In Excel, the formula =MOD(−201;23) returns 6, following −201 = 23 × (−9) + 6. In VBA, R = −201 MOD 23 gives −17, the opposite of the remainder of 201 by 23. The C language long let the sign of the remainder depend on the machine. The general definition of Euclidean rings only imposes |r| < |b|: this flexibility makes implementations non-uniform.