ab = ba, (ab)c = a(bc), a(b + c ) = ab + ac

all follo w fro m th e meanin g o f additio n an d multiplicatio n i n term s

of countin g an d wil l b e take n fo r granted .

With thi s narro w meanin g o f "number, " subtractio n an d divisio n

are no t alway s possible .

The symbo l b — a represent s "th e numbe r which , whe n adde d

to a, give s 6, " an d ther e i s obviousl y n o suc h numbe r whe n b a.

Therefore, thi s symbo l ca n onl y b e use d legitimatel y (i n vie w o f th e

meaning of "number " here ) afte r b a has been proved. Fo r example ,

the las t algorith m abov e coul d hav e sai d tha t t i s t o b e replace d b y

t — k becaus e i t ha s determine d k i n suc h a wa y tha t t k.

Division require s a similar restriction . Th e symbo l b/a represent s

"the numbe r which , whe n multiplie d b y a, give s 6. " Fo r randoml y

chosen a an d b ther e i s ver y rarel y an y suc h number . Again , th e

notation b/a wil l b e used , bu t onl y whe n b has bee n show n t o b e a

multiple o f a .

However, division with remainder work s i n al l case s i n whic h a

is no t 0 : Give n tw o number s a an d b with a ^ O , ther e ar e number s

q an d r fo r whic h b = qa + r an d r b. Moreover , q an d r ar e

determined b y a an d b by mean s o f th e simpl e algorithm :

Input: Tw o number s a an d b with a ^ 0

Algorithm:

Let q = 0 an d r = b

While r a

Reduce r b y a an d ad d 1 to g

End

Output: Th e quotien t q and th e remainde r r o f th e division .

or, mor e efficiently ,

Input: Tw o number s a an d b with a ^ O

Algorithm:

Let q = 0 an d r = b

While r a

Set k = 1

While r 2ka

Multiply k b y 2

End