",,.
.,
,
", "
.'
'
Fo~in,
lOTH:lR TITLE
?
, .
\
NOTE
47p.; rbr related do=uments, see SE 030 460-465. NSt
...
51 downloads
1110 Views
2MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
",,.
.,
,
", "
.'
'
Fo~in,
lOTH:lR TITLE
?
, .
\
NOTE
47p.; rbr related do=uments, see SE 030 460-465. NSt
AVAILABLE FROM
available in hard copy due t.o copyright restri:tions. Translated "and adapted fromt.b'e B'ussianedition." The [J~iversi~y of Chicago Press, chicaqo, IL 60637' (Or,der
EDRS PRICE
~o.
,
"
GRAN!' '
.
,
.
7ij NS F-G -8 B 47 ff! A"
PUB DATE
,
256693: $3.50) .. ' ,
... •
.!.
:.
Plus postage. p:' ,--MFO;' *C:)llege Mathematics:
Not Available from EDRS. computE\rs; Biqh,er Ec}ucat.i:)l; '. *MathesaticaJ ~pplicat.ions;, +:Mathemat.ics: Mathelati::s :urriculum:. *Mathellatics aducation:' Mathematics " Instruct~~,: *Number Systems .
DES:BIPrORS •
i
. SE, 030 463
,.Ntl .. be,r Systems. Popular Lectures _in Mathe,matics, • :hic!lgo 'tJniv •• Ill. Oept. of Mathematics. , NatiJnal Scie~ce Poundation,. Washington, D.C.
IN S r IT arIO N SPONS AGENCY
r
'f'
.' i
s. v_
"
..
DOCO!WI!' DISUSE
(
..
'
.....
'.
;
.,: .. ,'
"
ABSTRAcr
..
~
The origin, p~opertias, and applications of va~i,~s numbe.; systess are diScussed. lmong the 15 tqpicsdiscuss,ed 'are: -tests for divis'±bility, the binart ,.sys~em,,, the galle of Nill" ' ,~omputer~, and inf111ite numbe,r re?'r~ser..tati'ons. (KK), .1, "
\.
I •
•
\
' ,
,
z:, .
...
;#
•
•
,
,
.
.
•
"
.
****** **** ~******.***.'* ** ***************"************************.***~** slpplied are the . ' , from the oriqinal documen t . . . . ' * L'
R~producti:)ns
by.EDRS
B st that cat~ be m:ija
~.
******************************************** ***** **** **** ******'*. *** 1Ic,**
.,
1'\ . I
'
"
•
'.
~,
'.
.
,
~
".
V.I. DEPARtMENTOf' "EALTN. EDUt;ATIOM a. W.LF Alii I NATIONAL INSTITUTE OF
1
I
"Systems
•
."
$~V" Fomin .
~QUUoTION
THIS OQCUMENT HAS aeEN REPROOUCEOEXACTLV AS RECEivED FRON THE PERSON Olt ORGANIZATION ORIGINATING IT PQ1NTS OF VIEW 011 OPINIONS STATED 00 NOT NECESSAAILV REPR£:· SENTOFFIC;IAL NATIONAL INSTlTU1E OF EOUCATIOH.POSITION OR POLICY-
Numbclr
•
Tiwt.lated""
.Adapted from the'
'.
•
I
•
, . ,
•ucond RUliaft eCI~ by . JoIn w~ .T.II.....and
"
:',
'J1tOCnU p.... . .
.
"PERMISSION TO REPRODUCE THIS MATERIAL IN MICROF1CIiE' ONLY HAS BEEN GRANTED BY
.(
Mar~ 6: Cbp.rles
,
.NSF
.
._
TO THE EDUCATIONAL RESOURCES INFORMATION CEN-TER (ERJC)." ,:: .
•
• I
I.
I
I.
0'
• •
,. \'
..
.
,.
I
--,
,
.
'
•
0'
.
•
.'
•
t
•
,f
..
p'
.'
J
,/
., ,
..
,
41
J
Survey oI$cent Eiut European Mathemati
>-
Lit'erature
•
/ '/
A project conducted by Izaak Wirszup, Department of Mathematics, the University of Chicago.
0
under a grant from the .
./
National jerrce Foundation / r
.
..
!
,
./;'
,
".
'.'
/'
'/
/!
;; /
. ,~
,
'/
/
'
.
... -,
.'
.
,'"
..
,
....
''''.;'\
/
". :.:;,;',': ": ' ~';:'::i<~\:\fh~t::.'l;tr. •
,.1
, c'
, Number.
, <'
Syste~s
:l-
'.
~ ,
.
. '. ~
,
.
.
,
•
"
~
,
I,
4
Translated and
.. \..r
adapted from ~ secoudR~ edition ~y I' Joap W. Tell., and Thomas P. BcansoD
•
,
~
\
De University of Cbicaao <5'
Press Chicago and
London
./ II.
•
*"
.
1:
~
-'.'
1'-
."-
;
~ ~'
,../
.
~
...,.
•
..
. .
\
..
. '.
•
" (
.
•
--'
\
•
. .
,"
"
•
'
/
-
The tJniversity of Chicago Press, Chicago 60637 The University of Chicago Press, ~}d., London
~-, 1974 by The University of chicago \i All rights reserved. Published 1974 Prihted in the United States of/America I
~
International Standard Book i~umbcir: 0--22&-25669-3 Library of Congress Catal0HrCard Number: .1]3--89787
s.
.
Y. FO M IN. an
intema~;onally
• Moscow UnlversiCy. o
ftJ,'
.. •
f'; .•
",
-/'/f .
,I
I
i· ,
known fun"tional analyst,
~
a professor at
• r
I
.'
•
I
.. ..
.
'<:\~:,m;~~;:.:;7:;;''i~', ,:.:(::~~r\k" ;::::;~'''''l·' ~' {',': ::\Y~;~/~'::~;; '::l::ti;':~:?':'\,:;t{:~F;~?~~f,I'~}
.. ,,~,
,Contents, ,
.
,
,
r
..
~,
.. "
,
,
..
,
,
...
, '"
'
0,
.: ,,~ •
"
.
.
..
"
.
". 'Pre/ace
•
••
,
..' \
•
,:':~' ."
"
...
,*
.
•
".
vii
1. Round and Un rounded Numbers :,'> , 2. The Origin# of the Decimal Number .system, ' . . . ' , 3. Oth~r Number Systems and Their'.ptigins 4. Positional and Nonpositional Sy~ms 5., Arythmetjc Operations in Various;~umber Sys,tems' 6. Translating Numbers from One System 10 Al10ther 7. Tests for Divisibility ~,~~;t~ , 8. The Binary 'System .',. ' ':'" ~~' 9. The Game ofNim "':';,.' ,. , 10. The Binary"'Code and Tetegraphy 11. The Binary System-A Guar<Sian. of Secrets . It. A Few Words about Computers 1~ Why£lectronic Machines .. Prefer" the Binary System 14. One Remarkable Property of the Ternary System 15. On Infinite Nurpber Repr,esentations
.
~
1
,.., 3
,-'..
,
4 6
7 9 13 17 .20
,
,
25 .I 26
28 29
31, 34
...
"
.. '"
~
i.. It
~
,f
...
•
; ~
, 6) ~
.1.\;
,
.
(
J
... .
'---
"
,"1
..
...
':
. .
··Preface . ..
....
d.
,,' , .'
.
.
,.
.." .
)
.
.' .ta ..
)
..
./
'
..
to· '
.
•
•
.,
....
,;
...
,
The language of numbers, like anY,language, has its own alphabet. • In the language of numbers 'that is !?OW used virtually worldwid~t the alphabet CGnsistsoften digits. 0 through 9. This langua~ is the decimal -number system. But-this languase has not always.been.(ssed universoYl~. From a pu~ly mathematical point of view. the decimal sy.stem has no inherentb.dvantages over other possible number systems; its popularity is due . not' to mathematical principle, but to a Set of historical and biological factors. . ~ . . \. . In ~nt times the decimal system has received serious competition fro~ the bjnary and ternary. systems, which are '! preferred" Qy modern computers. . ) " In this pamphlet \Ve will discuss the origin. properties, and applications of various number ~~tems ..The reader need not be familiar with mathematics beyond that covered in the high scpool curriculum .. Two'sections (9 and 11) have been added tp the second edition, and several minor corrections have been made.
.
I
•
,
'.
.... r
\ •
. ''':'
'.,
VB
, I
,
/
J
•
f
...
,
•.
..,
•
4".,
.~~
•
..
,
"
"
.'
..
'.
"
.. .,.
,-
, J
"
,
•
o'
.. .
,
~
..-.
•
\
'V
( \
1. Rouod \~ UID'OUDded
Num~
-
:' A man about 49 years ~ld went out for a ~on. MlaIked down the street for about 196 meters, and went into a store; he bought 2 dozen eggs'1he're and then continued walking.... " Doesn't that sound alittie strange rWhen we measure' something approximately, such as distance 'Or someone'sage, we always use round numbers and 'Ordinarily say . ( .. 200 meters," .. 50-year-.old man," and t~Jike. It 'is simpler to operate with .round numbers: They are easier to remember, 2nd arithmetical • computations are easier t~ perform on them. For.example,po 'One has· trouble multiplying 100 by 200 in- his head, but multiplying t\\'o un- . reu~three:digit numbers, such as 147 and 343, is so difficult that almos no one can ~o it without pencil and, paper. . ( I king of round numbers, we do not normally realize that the divisio~of numbers {nto .. r'Ound" and" unrounded" is .dependent on . the wat in which we are writing the nu~ber or, as we ~~uaUy·say. which number s,.}'stem we are using. In investigating this matter, let us first r exkmine1he' d'&imal number system, wnich we all use. In this system .... every positive integer' (whole number) is represented in the form of a . sum ~f ones, tens, hundreds, ~d so 'On; that is, in the form 'Of a,sum of " powers of 10 with coefficients which can assume the values 0 through 9. For example, the notation 2548 den~tes the number consisting of 8. ones, 4 tens,S hundreds, and 2 thousands; so that 2548 ifap abbreviation of the expression \
,,
"
.
•
2 ' 1()3 + 5, 1~
+ 4., 101 +
8, 100.
~'<..'
However, we could, with the same success, represent every f\Ull\ber in the form of a combination of powers, not of the number 10, bqt of any • other positive integer (excc.:pt 1); for example, the number 7. In thi's
• 'v'
8
•
..
\ .\
"
2
..
,.
"
f
•
I
lRound andUnroundcd Numbers \ '
,
system, the so-called\heptary num'~system or the number system with . ' base seven, We wOll',d make calc ations from O'to 6 in, ~usual ' mltnner, but we would take the nu ber 7 as a unit of the next order. ' In our new,heptary n~mbcr system this number is naturally designated
,
~y
,
. '
10
•
•
"
(a unit of the second ord~r). So that we do not confuse,thls designation with the decijnal numberlO~ we attach the subscript 7, so that for s~ven we wnte ' " , ... •
•
~
t
.
, )41"
,
.
Units in the succeeding places serve to denote the numbers 72, 7~, and ' s~ forth. They are designated _"
(100)7" (1000)'1 , etC. We Carl' ~epresent any positive integer by combinations of powers·of seven; that is, any positive integer can be expreS'Sed in the form
/
,aD
•
ale ·7 Ie
,
~
',.
+ °"_1.7 Ie - 1 + ... + . a1· 7'+ 00,
/I.
s-
.
where each of the coefficients a o , att ... ., ak can assume any whole value from 0 to 6. Just as in ..the decimal system, it is natural to drop the writing of the powers of the base and to write the nU,inber..i1l. tbe fOQ11
"
.
(
.
again using the subscript to indicate the base of the !lumber system .. ' t hat we arc USing - .. m t h'IS case, 7. Let us look again at our c!{ample.The decimal nu'IJlbcr 2548 can be represented as ,
, or, using our
n~tation,
.
us (10300h
,
~ '
Thus,
\
.....
)
(2548}lO
I
~
(l0300h .
9
'"....-
,
..
,..
."
,
.
1M' Origin. of th~
.
~
Decimal Number Systl!m
.)
We note ~t round numbers in the newheptary number system will be completely diflerent from round numbers in the d~iIrlal system.
Faa-example,
..'
"(since 147
J.
J.
(147)10 - (300)7 , (143)10 = (1000)7
~~. and. 343 ,.,., 73);' at'the sameti~e, , '
..
','
(100)10 ... (202)7~' (500)10 == (131~h ,f .,. ~ ,.' '. . and so fdhtt Tll;refore. in baSe seven, multiplying(147)lo and (343)10 in your head simpier than multiplYing (100)10 by (10(»~o'. If we used the base..oeven system,'an ~e of 49 years (and not SO) wouUhmdoubted· '. ly be /taktn as "rounded data." and if we S:llid .~ 95 m~ten" or " 196 ~eters." it would naturally be taken as.- an estimate by sight (since (98)10 = (2oo), and (1%)10 = (4(0)7 are round numbers in base seven). We woul~ count objects. by sevens rather than by tens; and so on. In short. if the base seven system were generally accepted, the sentence with which we began would surprise no one. However, the base seven system is not widely used and can in no way /' compete with the decimal system. which is used everywhere. What is the reason for this? ,J. .
is
..
2. The Origin of the Decimal Number System' • 4
Why does the number 10 play such a privileged role? Someone far r~oved from these questions ~ould probably an~wer without thinkirlg • easy to work with the number 10--it.filt round number; it is easy to mUltiply by any number; anq. therefore, it is easy to cdbnt by tens. ,.. hundreds, and so on.~· But"",c have ~iready seen that the situation is actually reversed: The n'umber 10 is round only because it is.,used as the base for the number system. In the· transition to another number system, say the heptary ~S'stem (where ten is written (13h), the '~roundness" of 10 disappears. . ./ ' . . Tile reasons why the Qei;imal system has had such general acceptance are not at all mathem$ical. The ten fingers of two hands were man's first mechan"isrn for counting. It is convenient to CQunt from 'one to ten. dn ,the fingers. After counting to ten. completely using up our~natural . . "counting apparatus." it is natural to take the number 10 as a new. larger unit (a unit of the ne~ higher or4er). Ten tens comprise a unit •
.. I'tis
II
•
/
"I
\
. '
..
... /
..
\.
in
.
:
...
.
,. ~':~
.~.
\
.
'.' ,;~~~,...
.
,\.
.
.011 .~
'
..
"
.. 4
oihcr Number S~k!tnS and Their Origins
•
of the third order;'and so on. Th,us, it is because of man's ten·fingered
,
" .countmg that the deCimal system, which n6w seem~" self-explanatory, originated.'
'
,f
"
..
3. Otbel' Npmbe!' Syste~ aad 1beir 'OriaiDs ' .
I
The decimal system did not always OQCUpy the dominant position. In various historical periods many peoples u~ number. sY,~tc~s other ~." . than the decima A~ one timc,-for example, use· of the Odccimalsystem prather , widespread Its origin is '.also u1ftioubtcdly .• connected ith counting on the flng~rs. The four fin of the hand (excluding the thumb) ." have total of 12 phalanges (11g. 1), so that by usin~ tke thumb to cottnt off 'these phflangcs i~ tum, a peOOn could count from ~t . /'/' ' 1 to 12. Then 12 is taken as a unit of the nlxt order, and so forth. The. duodecimal system , .' has SlJrvived Janguage. to this day: Instead - - -?' of saying "twelve~t/we often say U a ·dozen.··· • 'Fia .. 1,.1 M~y objects (k~iv~s, forks, plates, ~andker. (, d~Jefs, and the lIke) are mo~ often counted by dozens than by tens. (Recall. for example; that a ser;vice is, as a rUle, for 6 or 12,'and much less often for 5 or 10.) Even now the word" gross" is occasionally usedL 'm~aning .. a dozen dozens" (that is, a .unit of the· third order in "the duodecimal system), and several decades '~go it was widely used, especially in the £'world of commerce. A dozenSross was 'called a .. masS, '. but now this meanillg of the word ': mass" is kno~n to few. 1 The English have tmquestion;ble remnants of the duodecimal system -in their system of measures (for example, 1)foot = 12 inches) and iQ. their monetarVsystem where 1 shilling used toeqpal 12 Pe~Ce.~' Let us remark that from a' mathematical point otView the duodecimal system would have several advantages over the decimal sySotem in that tqe n~mber, 12 'is divisible by 2. 3, 4. and 6, while 10 is divisible· only by 2 and 5; in general, a large stock of divisors of the base qf the number system assures certain conv~ces in the use of that system. We shall return to this question in sectiOn 7, when we discuss tests' for' . divisibility,
a
{I/
,~
, ,, ,",
I
il
\ I
ti
1. However, it is possibly the source of such common expressions as a .. mass of men" (compare it with the expression" a thouSand men "),
11
,
\
i
M'"
,' • .,J
• .# , ,t',
5 In ancien'B~lon, where civiliZation and mathematics wero rather~ . \ • advanced, a highly complex" base. sixty system was used. Historians "'-" differ in their explanations of. how such a system arose. One of the hypotheses, though it is not particularly believable. states that there "was.a mingling of two tribes, one of which used the base six system and • the" other' the decimal system. The base sixty system then arose as a ., "' ·.Compromise between~these two systems. " AnoUiei·hypothesis is based on the Babylonian calculation of 'the "~, . year. "Although Babylonian ~onomy was suffi,ciently adva~ tha~~ the leng~ the year could be calculated,"exact1y, the Babylonians found it convenient to designate a period of twelve thirty-day months as a 'w yesr," with an ~xtra month added to every sixth year (except f,?r · ~ional corrections). A year of 360. days naturally leads to the • nflmber sixty, since 360 is six times sixty. It been §uggested, however, that the convenience of. the 36O-day year is itself a result .f the Babylonian use of the sexagesimal system.' Although the .origin ot: the sexagesimal system remains ohscure, its existence and widespread use in pabylon i~ wen es~blished. This system, like the duodecimal, survives to /1 certain extent in our time (for example. ·in th.e division of the hour . into 60 minutes 8.nd the minute into 60 second~ and in the analOgoUi system of measuring angles: 1 degree :::;;: 60 minutes, 1 minute := 60 seconds). On the whole, however, tHe Balfylonian system, although "it' did not require the use of sixty different" digits," is railier cumbersome and less convenient than the 'decimal system. . ." ~ "ccording to the evidence of Stanley, the el'plorer of Africa, in a nurnbet of African tribes the base five (quinary) system of counting is 'widely used, The connection of this system with tke structure of tlte . • · human haild is clear enough. The Aztecs and 'the ~-peoples who lived for ·many centuries in wide area& of the Ameriea~·continent and who develo~ a highly advanced civilization which was almost completely destro+ed by the Spanish contJuistadors in the sixt~nth and seventeenth '&nturies-u~ the'base twenty system. The same base t.wenty. systentl'was used by· the Celts, who lived in Western Europe beginning, in 2000 B.C. Some traces of the Celbi' base twen~ system remain in the French language Qf today. For example... eigltty" .in ·French is quatre-vingt-literaUy "four -twenties." The number also used to occur in the French ,- monetary system: The basic' monetary unit-the franc---was divided .. into 2 0 . , s o u s . ·~.l Of the four systems of count~ng cited abo~the du~ecimal, quina.ry. sexageaimal, and ba.se twenty). which. along with the decimal, have played an appredabJe role \n the development of human c~vilization •
.
.
"
• /,
nas
"
.
.
24
•
,
•
...
l,~) ,
,
,
all (except the sexagesimal~ whose origin' is unclear) are connected in some way With counting on the fingers (or on the fingers and toes); that is, like the ,decimal system, they undoubtedly have, an .. anatomical" origin. _~ ,', ' As. the abo,ye examples show (their number coul"., h,8\1C been. enlit-goo), numerous. traces of these syst~ms of counting 'have ~n pI .~rved in our tirpe in the languages of many peoples, in Il1onetary. .systems, and in systems'" of "me~ure. However, in notatio}1 and in , • calcuia~on, we always use the decimal S5'stem.
.
.'
~
Positional and Nonpositional Systems
6
,.
\ I;.
~,:" .::~. P~~Onal aud Non~tiOnal ~ , • All 'ilie Systefus"of counting whicQ w~ di~ussed above are'''based on-
•
"
~
one general prinriple. Some number p~s chosen~the base of the ': ' . number system-and every number ~,is,"repc-esented in the form of 4 com~i.n~tions of its powers with coefficients sel~dfrom,O to p -~)" .... that lS,' 10 the fOrm . ...,. " . ".
".
..
..
tlkPi' +
Qk_lpk:;l
.
tI
+. .. , +,alP. +
Th~'~e num"be; 'i~· writte~ in the shortened'/o'"rin
,.
•
00'
' . .. ' .!
"
. '
•
, ,a1aO)p.
) ' . ' , " ' -
.
.
'(O~k';"'"
~
-
•
In this notation, the value.of each digit de~ilds on the pIa Jhat the digit occupies. For example, in the number-222, two occur rle times . But the first digit from' the right reprelCnts two units, the secQnd from the right-two tens (twenty), and the third--two hundreds. (Here we have the decimal system in mind. If we used another number"System, 's~!th ba,se P, these three twos would represent the values of 2, 2p, a~d '2 p'J, respectively,) Number systems constructed in this way called positional. " . ' . Other number systems exist-~onposilional number systems constructed on different prinCiples. A well-known example of such a system is the Roman numeral system, In that system there arc several different basic symbols \, the un.t 1 (one), Y (five), X (ten), L (fifty), C (hundred),. and so on -and every number is represented as a combination of tAese symbols. For example, in this system the number 88 is
a:t
LXXXVIII .
.
~:
"
In thiS system the meanmg of a.,mbol does not depend on the place In which it stands, except when a letter of smaller value is placed to the "
1 'J
"" -
,"",,,' ,
.,.
,"
..
'.
'
.;.
A~'hm:liC operali~ In y'arious ~umbu Systems
7
I
left or one with larger value. n, that case, the position of the letters is important. For example. the xpression IV denotes the number four" • while VI denot~s the number ·x .. In general, th~u~h, a ,iveri'lc~~r will ..... ' . denote the same value regardless of"phicement; In the rcp,etentation of the number 88 above,tlie symbol X occurs timeS, each time denoting the same value-ten units. . We often edcounter ~q11lan numerals' today-pn clock faces. "for ex~IllR!e;., they are not Use4 in mathematical practice. ,however. Posi-, \ " tion~tems are more convenient because they allow us to represent iarge nUrllbers using rejrttively few symbols. A more important advan~ , tageof a positional 'sfstem is the' simplicity' of perl-orming arithmetical l. . operations on numbers written in itlch a system. (Try, for comparison, " , . ' ,;:t ' to mUltiply two thrMigit numbers written in Roman numerals.) ", '\'.':..' . . From now on we shall consider only positional sy~tems. .
three
•
'.
'~., I
."'
s.Arlthinetic Operations ia VarldUs Number Systems~,
.,
.
'
For numbers writte~ in the decimal s~tem, we'use a "columnwiSe" .~, method for addition and multiplication, and a diagonal" method for , ~ivision: These rules are completelyappiicable to numbers written if! of any pbsitional system. , Consider addition. In the Jedmal 'system, as well as in any other system, we begin by adding the units, fhen go to the next place. and so on, until we· reach the h~hest available place. We must remember that every tIme the sum in a preceding place has a result greater than or equal to'the base of the number system in which it- is written. we must carryover to the next place. For, example. II
. •
(1)
+ (17043h
,
.
(23651)8
v
..
(4271,4)8 (2)
.~. ,"
,~'t
.
;~'l:!
J/ ~
.
,
, ( 423)6 (1341)6 + ( 521)6
(312'5)6
I
./ "
/ ,~
'
We now turn to multiplication. For t~~ake of definiteness, "Ye choose a specific "ystem, say th~cxary (base six). The basis for multiplication of ,any two numbers is a multiplication table th~t determines the
. o
\ Atithmctic Operations in
8
V~
Number Systems '
•
4
product of any two numbers smaller than the baSe of ihe system.' It is not hard' to verify that the multiplication table for base six looks like
.'1..:....
~.'\~. .'i
',(
r
'1
" >' ,.
'\
,I>,
0
" ""'·-0""
2
3
r-,
,0
0
0
0
2
' 3
4
S
1
•
0
0
0
1 •
0
1
,
S
:t
,
-
,
~.
11
"
j
10 ' 12
2
0
2,
4
3
0
3
10
13
20, II
4
0
4
12
20
24'
32
S
0
S
14
23
32
'41
14
.'
r.> " ,
. ,;:' ',I,,
,,\,
" I
"
'.r
the
and
Here every square contains product' of the numbers of the row column on whose intersection the square lies, with an numbers written in base six (we havc4 0mitted the subscripts in order to make the table more compact). . ', Using this table, it is easy to multiply by colum-ns numbers coa),aining
,any DUDlberof places. For exa!l1ple.
, J
(352)6 • (245)8
X
-
;
, {3124)e (2331)6 (1144)6 (145244)6
Dividing" diagonally" is also possible in any number system. Consider a prohl/m like the following: ' Divide (120101)3 by (102)a . The solution is <"
.
(l20101h
.
(102)3
1(102)3 (1101)3' ,
(11th (102)3 (201)3
(102)a
--
(22)a
,
,/
.
, 1g "" I ,'.
)
,
-
..
,
,
"
o'.;; • '
.
Transloting Numbers from OM Syst
:
,.~:.~
"" ,,'
',"
•
Pr~blem
1. The following half..wr· ten / 'f • .. 5-'
:
.
• J
,",
.,.I~./~'. .9.!', 'J .a
.
(Write th~ divisor, dividend, quotient. an remaind~ i~ the deqIiu~i "" •. ."t '" system and check the accuracy of the t.), '" ',.
.
.'J:. ;'/
,.;t"~'
.• '
.'
~ ... !..~: ',.'
.' . .-::.. 1~J4.twtkr' "
t
,
.
!~~
, .\',/'
,,~t""·"
.i .
~~putation' wasio~'on
"
.,'
the blackboard:
,
+ I-M2. "4,2423
"
"
•
r syst~ll1 theaddc..nds and the sum were. ~tten.. •
,
I
•
•
Problem 2. en we asked .a teacher how many p;upiIs were in his I ~ass;- he a ,ered .... one hundred, children-~4, b(,ys ~d 32 girls.'· .. At fir~t)' an~wer 'astonish~d us~ but then'we:tealized th~t the t~ch~r was ~ply ¥S1ng a' nondeclI~al ..systc:m.Wh~~ system dld he have 10
.
xumd?
"." ,',;"' ". "" ,The'Solut~,~ to thi~l.proh1em is »o{ ,?<,mplicated. Let x be the b~ . I,qf~be ~~r ;~s>~m w~are ~king. Then the teacher's words ~n ..... . ,.. :,.. tha»"h~.,~¢pj}s, of .~ho/h 2x + 4 are boys ~nd 3x + 2 are girls.
, . /. " jitiui " . . . ,
. '. . ~, . 2x + 4 + 3x + 2 = x2 ,
/ ,:">".' ...:~;-~~ ,:-
,
:,. 'or"
"
r \
5x - 6
= 0,
yielding' (x - 6)(x
...
+ 1)
= 0,
_J
or, by the quadratic formula,
± V(25 +
5
2
X=
either
m~thod
24)
5 ± '1 . =-.-2-'
I
/
~
yields
-- 6, x~ = -
.
Xl =
1.
Since ~ I cannot be the base of a number system, x = 6, Thus, th~ teacher's answer was in the base six system, aod he had 36 pupils 16 boys and 20 girls. 6. Translating Numbe~ from One System to Another \<
How do we translate a number written in one system. say the decimal, into another system, say the base seven system? We alre~dy know that tQ write a number A in base seven is to represent it as the sum: ' ,A
=
Gk,7 k
+
ak·_·l,7 k .'i'\.., , + a l ,7
+
ao. . '2
('
.......
~
/
"
,
,; t
. ~,j
T nStlt' g Nu b9rs ftOm On~ System to Another
repr~ntation th~ num~r
tty: i
'
rde: onnd the of A to the r~P d t7 fu1d the coe~ien~ ao, a.1o .. .' '0 ak, eaen of whi~h 11 be s me ~~It be eet1 0 and 6,jhchislve. We divIde our number A ' Y (in nte1J1 ). T e .remainder i.n this division is clearly equal to ~o, in ,in the' re tation of A, aU tqe terms except the last are evenly i 'sibl b ; .1 T n let us take ~he quotient obtained from d,ividing h nu be' A iby 7, and again divide it ~y 7. This newly obtained reinde 'v.:il; De qual to at. W~ continue this process and find all the i its a ,P1 .. :a~ in the base/seven representation of· A, in the form f Sou. ~sivb r, main~ers obta)ned by dividi'ng it rcpeatedJy, hy 7, a~ ~ri ,.,~bo e. Consider •. fo' example, the number" que'.
s, seve,' w~.t,
0
,
, :
~
:
D~J idi~ i'~ .
,
(328,0 .
.1
ge~
7, we a q otient of 469 and a remainder of 4.. 'Conse-' q :cntly ~ri t~ to tKe ba 7, the n\lmber 3287 has its last digit equal t04. T fin t~ next-t~la t digit, we divide our quotient 469 again by 7.IWe, c1 qpotient of 67 and a remainder of O. Consequently, the ne~t-to ast digit of the~umber 3287 to the base 7 i~ Further, we divide 7 b 7. obtaining 9 with a remainder of 4. This remainder of 4 e~rese ts t c 'third digit from the end of 3287 written to the base seven. "i~ally. we divide the last quotient 9 by'1. getting a remairider of 2 .. nd a quoti ~Of 1. The remainder of 2 gives us the fourth digit from ~e::end i~ t e csired notation, and thequotie~t of 1 (which ~e can no n$ef divi by 7) represents the Rfth digit~ from the end (the first '~i~). Thus \ ' • -l ..... \ (3287)10 ~ (I2404h. C" 't'
.
O.
\ C
\
j~S
\ight .sid, of this cquaticm is an abbrcvialion of the ex'pression \
.
~
I . 74
+
2· 7;1 t 4· 72 to· 7
+
4,
is an abbreviation of the expression 3 . 1O~\
-j
2, 102 ' +' 8· 10 + 7. •
we
'The 'omputations that used for translati'ng from the decimal repre, SCiltation of the !lumber J2H7~ into its ~cprC'Sentation to the hase seven ~ arc conveniently arral1gcd as follows: ,
3287
'. •
7
'4
9 2
,/.,,
'"
L
1
.
. "
,;
.
,~
.,
. ,i, _
j'(,,,~',
' r :I ,', ,j
,-
i~'
,I;~,
c
*
'
.'
. ' , .
,
'
·Tninsiating Numbers from One System to Another
'11,
'/ tverything that we haver said above' clearJy applies not only'tq. the seven 'system, 1)ut~to any other such system. A general for
, ' base .' i,
nile
v:Q~hnbi~3 the rebePrese:!Jantionedo~ so~e," nlu m~r A
in tDh~ ~dumbeh r systbeem . ,orm at In tu~ 10 l owmg way: IVI ~ t e num If A oy p in integers; t e ainder thus obtained will be the last digit ()f the base p representa n of the number A~ Dividing the quotient ' obtained from this divlsioJl again by p leaveS us a second 'remainder; I this will be the digit that occupies the next-t~last place; and fo/th. The pr~s continues until we obtain a quotient smaller th~a' ' ";' the base of the system. That quotient is t~e digit that occupie~ the igh~st place. ' '~ .' > ' . ' .~. ,( ,Let us consider o'nc.t m~ example. The problem is to .write ~e num'''·,ber 100 in binary notation. We obtain: I • WIt
•
ase p can
,j,
so
,i
if,
~
.
.,. ~
,
100 I
o
.'
;
,
/"
,
. ~'
,
"
,
1 1 that is,
(100)10
= (llOOlOO)~.
One constantly eO'c~unters ~he pro~lem of translating numbers from the decimal to the binary system when working with computers, a subject about which we shall ha~e more to say later. In the examples we haye considered, !he original number system has been the 9ccimal system. We can, however, translate nUf!lbers from any given systcm to anY9ther by' the same means. To dq so, we . need only not,c t.hat the process of successive divisions carrjed out in the above examples can also be carri~d out in any base in which _we are given the original number representation .
•
Prohlem. Let us assume we have a scale (with two pans) and weights . of I gram, 3 grams, 9 grams, 27 grams, and so on (one c5bject of each weight). Using only this equipment, is it possible to weigh any mass to within an acc~racy Qf one gram ?The answer is yes. We shall present <~iii ;~~.
~'
,1&
..
....
i
.
TransIatina Numbers from One System to ~other
, '12
,.) .the solution .here, relying on the representao.on of positive integers in
•
thetemary system. Suppose the pbject that we wish to weigh weighs A' grams (taking A as·an integer). ,w'e can write the number A in the , ternary system as
.. that is, .. /
'.1> •
. ,. ,
.
t
,4;'
I;" "
.,
.. ,
~' "
,,~,~ ,
"
,"
-
,
,
.,~'
\
,
",-,,~
A~-+a,._1·3·-1 +"'+'1.3+00, . "
'
e :coefficiertts ao, Qlt ••• , a.' ~ -aSsume values of 0, 1, or ,2. pOssible, ,however, to write eachnumbe.r in the ternary'system somewhat differently, so as to use the 8igits-o, 1, dnd ~ 1 (instead ofCt>, 1, and 2). We utilize such a system as follows: We ~Slate the number A from the decimal to the ternary syste,m; using the me~hod of successive divisions that we ,described earlier, except that every titne w¢ diVide by 3 and get a remainder df 2, we will i~ the quotient by 1, , l~ving a remainder of - 1 . ' , ' I As a result, w~n tlie number A,in the .f~}tm of. a ~um: c
. ,
"
,
•
.'
I
" . if"
,
.~". .
.
'tt
J'
r:t<.i ' ~.:
where each of the "coefficients ~1ft' bm.-l, ' .. , bo can assume ,a, value of 1, or -1. For example, the number 100, which, in the usual ternary notation, would have been 10201, would 'have the form 11(-1)01 in this variation, since ~
"
(100)10 ~ (10201)3 = 34
+ 33
.
-
32• + 1 •
. Now, we put the mass weighing A grams on the first pan of the scale, and we put a weight of one gram on the second pan if bo = 1, and on the first pan if b o = - 1. (If b o = 0, we do not use the first weight.) Con· tinuing, we put the 3 gram weight on the second pan if b 1 = 1, and on the first if b1 = - 1, and so on. It easy to see that if we arrange the weights in this manner we can balance the weight J.. And so, with the help of weights of mass 1, 3, 9, and so on, it is possible to balance any integral mass on the scales. If the'weight of the mass is unknown, we choose a distribution of weights that balances the mass and thus , determines the weight.
is
'f
1.9
~,
I
,
,
~'l'"
.
.
,\"
',-''''
~
"
,,\'
...
.. ',.
DivlsJbiJltJl~
Tuts fl"
,
13
",
.,
a
Ut us clarify our disc~~on, with an example. Suppose we have mass weighing 200 grams. Translating 200 into ternary notation,in tbe ~ way, we obtain '
"
-
"
,)
.
.,
'
12' ...
Co~uently, \ '
~ •
•
°
(200)10 = (21102)3 ,
(,
. .
.
,
,
or, in greater de~~ 0')
L
•
'
I
t, '~'
,
100 =
4t
°
2. }~+ 1.33 .
+
1",32
+ 0'· 3 + 2 '....
" •
--
~
,
0.
it
~
~
If 200 is translated into ternary notation,..of the second type,. using"--l , I and not 2, we obtain . . . . , ...
-,
. ... '.
E"
-1 ",-
,
that is,
.
J=
1.3 5
-
1·3'
1.
"
+ 1· 33 +
1·
3~ + l~- 1 •
.
calc~tion.)
(The validity of this last-equality is'easily verified by irect So, in order to balance a mass of 200 grams place on a p~f t'he scales, we need to put weights of I gram and 81 g°t-ams on the same pan and weights of 3, 9, 27, and 243 grams on th~ other pan. 7. Tests fOl' Divisibility
There are sinwle tests that permit, us to detert9line w.hether a given number is divisible, for example, ~y 3, 5, 9, and so forth. Let us recall those tests:
.,
4
•
,
i
!
','
.
Tests for Divisibility
1. Test,of diviSibility by 3. ~,'number is divisible by 3 if and'~niy if the sum of its digitS is divisible'by 3. Forexample. the number 257802, (in which the sum of digits is 2 + 5 + 7 + 8 + 0 + 2 = 24) is divis, ible by 3, but the numbcr'125831(in which the sum of digjts is 20) i~ not
I
~
.... ,
.
"~ 2. Test' of divisibility by 5~ A nUJnbe[ is diviSl~le by 5 if and only if -its last digit IS either 0 or 5 (that is, if and only if 5 divides the number of u,pilS-in the last place). ' ' , ..;'
diVisible by
.,'
.
3.~ .
tI
, 3~'~t of divisibility by 2. This 'test is analogous to the immediately .. precedi~g one: A, number fs divisible by 2 if and only if 2 divides the number of units in the last J)lace. ", ' •. 4. Test of-diVisibility b19. This is analogous to the test of divisibility. by 3: A number is divisible by 9 if and only jf the sum of its digits is divi~e
by 9.
"
,
•
'
Proof of the valisiity of these tests presents no difficulty. Let uj examine~ fo~ ex.amfl,le, t~e tes~' of' divisi~ility by 3, IUs ba~d on the fact lhat the Untts 1D each place m !'pe decImal system (that IS, the numbers 1, to, 100",1000, and so on) leave a remainder of 1 when divided by 3.
• ~
Therefore, since every number
..
,
.
that is, every number
can be written in the form
[a1\(10" - 1)
.
+
(a" + a,,-l + ... + a 1 + ao)+ Cln_l(lOIl-l - 1) + ... + (h(1O - 1)
+ ao(l
- lj),
h
and since (10k :... for k = 0" .,' n is divisible by 3. we may write our numb;er in the f o r m -
'
(a"
+ a" _ 1 + ... + a1 + ao) +
~
B.
(
where B is evenly divisible by 3, It is clear, then, that the number
Ow"lO" -+:
Q,,_l,lQ1t-l
..
+, " + 01,10 + ao
is divisible by 3 if and only it] 3 divides the number
•
a"
+ Ow, - 1 + ' , . +
a1
+ aD .
. ?
'~,1
'
.,
;
.,
"
,
.
'
.
• Tem /01 Div{sibil/ly
.
For ~xample. the decimal o~ber 4851 can be written '~
4851
4·1000 + 8·100 + 5·10 + 1 , = 4·(999 + 1) + 8·{99 + 1) + 5·(9 + 1) + =. 4 + 8 + 5 + 1 + (4·999 :+-"8·99 +'S.9) ,= 4 + 8 + '5 + 1 + B, . =
r ,)
.
where B is divisible by 3. Thus:' since 3 qivides 4 + 8 + 5~~ 1 = 18. 3 must divide 4851. • ' , • IThe test of divisibility~y 5 ~s:based on the fact that the nwnDer 107 the w,ase of the number ~m-is divisible by' 5; _therefore, all the powers often from the fi~t.on are divisible by 5. Therefore,~fa number is to be divisible by its last digit must yield a remainder of 6 on division by 5. The test for divisibility by 2 has the same 1»sis; A number is " even if and only if its last digit is even. The test of ,divisibility by 9, like the test of divisibility by 3, is based on thefact that every number of the form 10k leaves a remainder of 1Iwhen divided by 9. " . ' , From the discussion, it is pl~r that all these tests are-Qased 00 decimal regresentation of integers, and\that -they are:' generaU.yspeaking-.,ioapplicable if we use a different numbe\- system. For txample, the nutitber 86 is-written to the base 8 in the form
:
..
"
(since 86 = 82 + 2 -8 + 6). The sum of the digits is 9, but 86 is divisible by neither 3. nor 9. However, in any positional system it is possibl(., formulate tests fot divisibility by various nHmbers. Let us consider a few examples. , We slmll write numbers in the duodecimal system and formulate, for that notation, a test for divisibility by 6. Since the number 12-the base of the number system--is divisible by 6, a n.u~bcr written in the duodecimal systeRl is ~sib!e by 6 if and only if 6 divides its l!lst digit. (We have here the same ~ituation as for divisibility by 2 and by 5 in the deci'ntcilsystem. ) Since the numbers 2,3, and 4 also divide the number 12, the following divisibility tests are valid: A number to the baser12 is divisible by 2, 3, or 4, respectively if and only if its last digit is divisible by 2, 3, or 4, respectively. We leave it to the reader to check the validity of the following divisi, bility tests in the duodecimal system: '
~
5:
\ .
.
i
I,
~
f
•
"
J•
... 16 ,
...
'/TestB for DMs!bDity "
a. The number ..t = (QA. -1' •. Qlao)12 is divisible by 8 if and only if the number (~lao)12 (formed by the last two digits of A) is divisible by 8. (Hint: 8 is a divis.or.o~ 1211 = 144, so that all the powers of 12 from the,. "second on are divisible by 8.) " b. The num~r A = (o.a. _1'-.2· 01ao)12 is divisible by 9 if and only • if the number (Olao)ll1 (formed by the last two digits of A) is. divisible bY 9. (Hint: 9 divides 144.) " . c. The number A. .... (o.a" -1' •• 0100)12 is divisible by 11 i{ and o~ly if the sum of its tiigits Ctht number a. + a,. -1 + ... +' a1 + ao)fs divisible by 11. (Hinl: 12~ -"1 is divisible by 11 fOf k = 0, ... ,~, since 1211: - 1 = 1l·121c - 1 + 11. 1211:-SI + ... + 11·12,+ 11.) " l:.et. "9nsidcr two. more problems connected wi~ the divisibility of numbers. . til
".
us
Prob.lem 1. Thejnumber (3~30)p (written in base p) is divisible by 7. What is p, and what is the decimal representation of the number A. if we know that p'~... 12? Will the problem's solution be ~quejf the condition p 512 is not·~tisfied 1 • "~ _ Solution. SinCe 7 is a prlrhe number (that i~,. a number whose only positive in\egral diVisors are itself and one), it -can be shown that if 7 divides the product ab and 7 does not di~de a, then 7 divides h. 'fo appl~is infQ.rX11ation to the problem, we may write
,
"
,
'
~
"(3630) = 3ps
+ 6~ +
3p = 3p(p
+
l)~
.
. Since 7 does not divide 3, 7 divides p(p + 1)2. Since 7 is a prime number, divisibility of (p +1)~ by 7 would imply the divisibility of p + 1 by 7. Obviously, 7 cannot divide both p and p + 1. Applying this information, we know that 7 must divide either p or p + 1. If p ~ 12, p must be either 6 or 7. However, in base 6, the digit string 3630 is meaningless; therefore, p = 7. From this it is easy to calculate A ~ (1344)10' If the conditio,n p s 12 is not satisfied, p may be any number of the form 7k or 7k - 1, where k = 1,2, .. " (except for 7~ 1 - 1 = 6). Problem 2. Prove that thel,number "\ (a"Q,,-l'
":Q1 aO)P, "
I
that is, the number
a,,'p'It +
a,.-1
'p"'-l
+ ... + a1 ·p.+
Go,
,
is divisible by p - 1 if and only if p - 1 divides'the sum
a"
+ O-n-l + ... + a1 + ao.
'
.
\ , fl'
.17
(Compare this general problem with the divisibility .test for 9 in the ~ecima1 jiYstem and with the divisibility test for 11 in the duodecimal s)nS~.)
~
C ,
.
. The smallest integer that can be 'used as the baSe of a number system ' • is 2 ...J1le binary (base 2) system is OF of the very oldest. ,It is encounJ tered, although in a very incomplete fonn,among sever8I Australian and Polynesian trybes. The convenience ,of the s~tem iS,its extraordinary' , simplicity. In the binary symem we have only two digits: 0 and 1. and the number 2 is a unit.ofthe seCosd or~. The rules for ope~tions on ' • binary numbers are very simple. The basic rules for addition are given ~
1
. '7
. ,
~
,~
' : ,,_:.
't
,
•
0
+0=
0, 0
+ 1=
1,' 1 + t =
(to)~,
./
(~
-/
and ~he m}i1tiplication table for" the ,binary ,system has the form
.
,
'
'
"""
.. ,
J
I,
0
1
0
0
0
1
0
,1
,
A slight disadvantage of the binary system arises as a result of the small size of the baSe. This means that writing even moderately large numbers requires the use of many places. For example, the number 1000 is written in the binary system in the forin '"
. .... ~
'-)
'"
1111101000,
. using ten digits. However, this disadvantage is often compensated for by the convenience of the binary system in modern technology, especially ~n the use of computers. We shall talk about the technological applications of the binary system later, but, for the present, let us consider two problems connected with binary number no41tion. Problem J. I am thinking of some base 10 integer between 0 and 1000. Can you find oujA't'nat the number is. asking no more than ten" yes or no to questi~This problem is completely solvable, ' . One possible series of questions automatically leading to success is:
.
,
18
I'
.,
..
. The Binary System
First queMion: .. Is the number you are thinking of evenly divisible by 2 ? .. If the answer is yes, we write down the number zero; if not, we II' write down the number one. {hi .other words, we write dqwn the\rc_ mainder obtained by dividin,g·the .. secret" number by 2.) Second question: .. pivide the quotient~ which you obtained from the .' -first division, by 2. Is it evenly divisible?" Again, if the answer is yes, we write a zero, and if it is no, we write a one. ' Each succeedipg question will be of the Same form, that is, II I;>ivide the quotient, wh~h was obtained from the previous division, by 2. Is it evenly divisible?" Each time, we write a zero if the answer is.affirmative and a one if the answer is negative. .. Using this procedure 10 times, we O'btai~ 10 digits. of ~hich is either zero or one. It is easy to see tRat these digits form the bi~ary representation of the desired number in·r,verse order. Actually, our syste'm of questions reproduces the procedure by which a number is translated into the binary system. The ten questions~re c.Qpugh becau~ every number from"l to 1000 can be wriUen in binary flotation using no mo~e th~n te~ pl~ces (since' ,102~ == 2 10).l[ the i~~ended number had ~ been written In binary notatIon In thel1isi"place. It would have been clear how our ten q&lestions were functioning: We were actually'asking .. whether each of. the digits was a zero or a one. \., , .,.t..et us consider another problem which is closely ~lated to t~is on~. 3.
eaclh
,
Problem 2. 1 have seven tables, each of which contains a chessboard -" of 64 squares (fig. 2). "" In, each square is written'a numbi4from 1 to 127. Choose one of these numbers, and tell me in which o1"the t'ables (they are numbered I from 1 tQ 7) that number.is located, I can name the number. How? Here is the solution to this uncOl11plicated problem: Let"us write every number from 1 to 127 in binary notation. None of these representations has more than seven places, sinl;e 127 = (111 I 111):1: We put a number A in the 'kth table (k = 1, 2. ' ."" 7) if. in its binary • representation, the kth place f~ the right has a 1, and we do not·write it there if the kth place'ls ~d by a zero. For ~xamplc, the number 51, which is written in ttary no~atio~las
~
0111001 ,
.' 't.,
;t
would be contained in the fir~t, fourth, fifth. and sixth tables, the niJmber 1 only in the first table, !'he number 127 in all of the tables, and so on. In this way, if we know in which tables a nutnber is contained, we know its binary represcntalion. All we need do is translate it into the decimal system,
.'
"
.
. I
If
.,
J
..
.
~
\
11t~ ..BintJry Sysl~m
19
.~
1
3
S
7
9 11
2 3
13 IS
17 19
..
49 SI 53 55 57 59 61 63
SO 5J
5
4
20 21 )
10 11 14 IS
t6
34 35 38 39 42 43 46' 47
6
7 12 13
J4
26
30 31
55 58 S9 62 63 66 67 70 71 74 75 78 79
65 67 69 71 73 75 11 79 81 83 85 87 89 91 93 95 97 99 lOt 103 lOS 107 109 111 113 115 117 119 121 123 125 127
. --
7
6
18 19 22 "23
~1 ~ 25 27 29 31 33 35 37 39 41 43 4S 47
54
82 ,113 86 87 90 91 94 'SlS 98
•
99 102 103 106 107
no
III
.114 115 118 119 122 123 126 127 2
8
IS
9 10 11
12
J3
14
is
24 .25 26 27 28 29 30 . ~) 40 41 42 43 44 45 46 47
22 23 28 29 30 31
36 37 38 39 44 45 46 47 52 53 54 55 60 61 62 63
56 57 58 S9 60
.1
'62
63
100 10J 102 103 lOS 109 110 111
72 73 74 75 16 n 78 -79. 88 89 90 91 92 93 .94 9S 104 105 106 191- ~08 109 IJO 111
fIg 124 125 126 127
120 121 122 123 124 125 126 127
69 70 7,1
68
72
S+ 8' 86 87
)16 117 118
77
7S
79~
92 93 94 95
3 I
32 33 34 35 36 31 38 ·39 40 41 42 43 44 45 46 47
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 48 49 SO 51 52 53 S4 55 16
56 57 58 S9 60 61
•
48
49 SO
51
52 53 54 55
56 57 58 59 60 6J 62 63 96 97 98 99 100 101 102 to3
62 63
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 120 121 122 123 124 125 126 127
104 105 106 .107 108 109 110 111 112 113 114 115 116 117 lJ8 it9 120 121 122 123 124 125 126 127
5
6
112 113 114 115 116 117 118 119 .
64
65 66 67 68 69 70 71
73 74 75 76 77 78 79 80 81 82 83 84 S5 86 87 88 89 90 91 92 93 94 95 72
.~
96 97 98
99 100 101 102 103
104 lOS 106 107 108 109 110 III
112 113 114 115 116 117 118. 119 120 121 122 123 124 125 126 127 7
•
".
Fig. 2
9f~
'-",
)
,
"'4
.. 20 .
'
The Game of Nim\
I
The question qm be reversed: Choose a number from 1 to 127, and I will tell you in which of th~ tables in figure 2 it is located and in which it is not. To' answer the question, all we n~d do is translate the given n.umber into the binary system (with a little practice this is not diffioolt to do ih your head) and theh simplynam~ tho~ places th,at are occupied - by a 1.2 The above discussion leaves one unanswered question, however. Why' are there exa~tly, sixty-four numbers in each table ?'Let us consider table k (k = 1, 2, ' ~ " 7) in which we have written an numbers from I through 127 which have a one in the kth place front the right. To each of these numbers, the~ corresponds a WJique number which is deri'9ed from the first by substituting 0 for 1 in the kth place. This second number, of , course, will not be in table k; yet' it will' be between 0 and 127 inclusive , (an~ will be zero only"when the original number has 1 only in the kth • place). Furthermore, all the numbers not in fable k derived by this correspondence will be distinct (as is easy to verify); and each number, not in table k can be derived from some number in table k by the correspondence. Thus, if there are n numbers in table k, there must be n - 1 numbers not in table k (discounting zero, anB allowing only numbers from 1 through 127), so that the following deduction holds: . & ,
..
U'
,n
+ (n
=
127 ; = 127 ; 2n = 128 ; 1Z=64.
- 1) 2n - 1
Since this is true for all k = 1, '2, ...• 7, there must be exactly 64 numbers in each table. 9. The Game of Nim
A game called "Nim" was popular in ancient China. It involves three piles of ~tones; two players alternate in taking stones from the piles; in each turn a player can take any nonzero number of stones fron) any pile (but only from one), The winner is the on~ who,takcs the . last stone. ... Nowadays, more convenient objects arc used in place of stoncs--for example, matc~s. The problem lies in clarifying the optiij1al strategy for each player. 2, In each of the abbve-mcntioncd tables, the numbers are written in order of increasing size, making the structure of these tablci fairly casy to discover. However, within each of the seven tables, the numbers can be rearranged quite arbitrarily, hiding lhe method by which the tables were constructed .
..
,
.....91'.~
(
•.
.
<-
\,
.'
, ,,:
•
'1M Game 0/ Nim
•
21
The binary ;stem, is helpful in solving this .problem.. Suppbse that there are 0t b, and c matches in the three piles. We write the numbers a, b, and c in binary notation: .
a
..
= 0.·2""+ a.._l,2",-1 + ... + 01. 2 + Go,
+ ... + b 1 ·2 +' be, + C"'_l·~"'-l + ... + c1 ·2 + co.
b :: b".·2M +--b",_t·2".-1 C
'=
c",·2'"
If necessary, we put zeros in front of the numbers which have fewer digits. In this way, each of tbe digiti ac, bOt Co. •.• , a., bIll, C'" can be equal to either 0 or 1, with at least one of the digits a"" b",. and elll (though , not necessarily' all) diffe~nt from zero. Th~ player who gaes first may replace one of the numbers a, b, or c with any smaller number. Suppose that he decides to take matches from the first pile. that is. to change the. number a. This means that some of the digits 00, a1, ... , OR will be changed. Analogously, in taking the matches from the second pile, the player would change at least one of the digits bo, ... , b,.; and, taking matches from the third pile, he would change at least one of the di8its
--
Co, .•• ,
•
..
c"'.
Now.consider the sums •
Each of these sums can eq,iolal 0, 1, 2, or 3. If at least one of these sums is odd (that is, equals 1 or 3), then the player' with the firs] tum is assured of .victory. In fact, let ak + bl; + c" be the first (counting from . the left) of the sums in ~*) which are odd. Then at least one of the three numbers ak, bk • and Ck is equal to 1. Assume, without loss of generality, that Ok = 1. Then the first player can take from the first pile any number of matches such that the coefficients a"" ... , 'al(+ 1 do Dot change, ak is equal to 0, and everyone of the coefficients Ok -1, . . . , ao can take whatever value (0' or t) the player desires. Thus, the player can take a number of matches from the fir~t pile such that all the sums
•
become even. In other words, the first player can arrange it sO that after his turn aU the sums in (.) have become even. The second player, in making his move, cannot help but change the evenness of aAeast one the sums, since he must change at least one digit in some number, but in only one
of
•
.
,.
.
.
.. . ".
The Game of Nim .....
22
..-..-J
number. This means that after his turn we again have the situation in which at least one of the sums in (.) is odd. The first player. in his nex~ move, can again even out all the sums. And so, after every turn f)f the first player, all the sums in ( ... ) are even, and after every turn of the second player; at least onc of these sums is odd. Since the total number of matches decreases after every turn, we eventually reach the situation where all the sums in (*)are zero-there are no matches left. Since aU sums arc even when and ,Only when the first player has just taken his turn, the first player must have taken the turn tHat reduced an the sums to zero, and so he must have taken the last match; he has won. For exampie, supp.ose that initially a = 7, b = 6, and c = 2. We would then write a = (111)~ ; b = (llOh ; c = {OlOh. The sums of interest would be "f'
02
01 00
+ b2 + C 2 = + b1 + C1 = + bo + Co =
1 + 1 + 0 = 2, 1 + 1 + 1 = 3, 1 + 0 + 0 = 1.
.
The" first" odd ..s.um is a1 hI + (1 - 3. The first player may then decide to draw from the first ilc. In doing so, he should change a l from 1 to O. But he must also arr' ge for 00 + bo + Co to be even, so he must , also change 00 from 1 to . The result is the suptraction of (011)2 = '3 stones from the first 'e, leaving
•
4 = (100)2 ; h = 6 = (llOh ; c = 2 = (010)2'
a
=
a'J
+
The sums
01 00
b'J, + + b1 t + bo +
2,
C').
=
Cl
=.2, ""' 0
Co
• are then all even. The second player may decide to draw three stones from the first pile
" 9() lV'
,
~
..
1
,
.
,
'\
,
....
'I'M Ganit! oj Nim &'
(it doesn't matter what he decides;-if the first player knows the optimal strategy, he has DO chance). This would leave
a =,-1 == (OOl)~ ; b = 6 == (llOh ; c :;:; 2 ,~ (01 0)2 , .
and
.
• Q~
..
al
Qo
+ b',l + C',l = 1 ,. + bl + C1 = 2, + bo + Co =:. 1 .
The first player must then decide to'tiraw from pile two, in order to change b2 from 1 to 0 (th~ only way to even out Q',l + b',l + C',l without adding stones). In doing so, he must change bo from 0 to 1. while leaving b1fixed: In "Other words. he must change q from (l1O)',l = 6 to (011)2 = 'j by drawing 3 stones. This leaves Q ::::: 1 =(01)2 ; ·b=3=(11)',l; C = 2 = (10)2'
Suppose the second player decides to simplify the game by removing ~he stone from the first pile (again, it doesn't matter what he decides). This leaves (omitting the first pile) h = 3 = (11)',l ; C = 2 = (10);."
'
, and
hi ho
+ C1 = + Co =
2, 1 .'
The first player then removes one stone from the second pile, so that ~
b
~ C
hi ho
= 2 = (1 O)',l ;
+ Cl :: 2 ; + Co = O.
At"this point, the second player will not remove one of the piles, for J
.,(
30
,
.: •. ,',
I'
.
. . ,'
.,'. I,
"
,':"
- ,'"
, . ,." , ";' ,!': '
..
,.
,t,
The Game of Nim
..
:,' i·
I
1/
that would mean instant defeat. ..Instead, he' dtaws:~c stont, say from the last ,pile, leaving . , " ~' •.; . :.
.
b = 2 = (lOb;
.f ' .
c "'" 1 :* (Olh ; hI
+ Cl = 1 ;.
be +
Co
= 1~
"
.\.
I
and second places in one of
The first player must cha1\ge both' the first the numbers; this can be accomplishe4 (10)1) = 2 to (01») = 1. Then,'~ :. ~
\ 9!b =,'c ==
.',
.f
oDly by changing .
b from'
.
11
.
'.
and the second player must l"Cmove one of the. sto~es, after whk::h the first player removes the other and, wins. ; If all the sums i~ .(41) are initia1l: e~.en, ·the first player's first tum makes at least one of the sums od~ allowing the nd player to win /"
•
r
'
•
by using the above strategy. . !' Thus,if the optimal stratcgyis ·~o~to botb players, numbers a, b, and c completely determjnc ~ result. Of course, three numbers thai would give the second rarely ~, and so 'in'~ long run tpe first player wi do far ~tter .than the second. For example, there are eight ways to divide ten matches (a + b + c = lO) into three pHeS."Se~tm ofth~ arrangements determine victory for the first !player, while 'Qnly one favOrs the secqnd. . At least one important queation is raised, however. Could more "optima1~' strategi~' be ~devise9, using ~umber systems to. bases .other than 2? For example.,f could the .ternary system ~ used so that the first player's object would be itO. make the sums' of 'corresponding digits all divisible by 3? Th~.answe~ is no since, when a p number system is used, the .. optimal"; stnltegy bI'$ks down as soon as the combined the num~'of !'(\atc~~- irl the three piles becom~ less than p. total In this situation t it is iriipossible for the first player to arrange for the sum of the ,diglt~ in the .anits' place to be divisible by p (unless two piles have been exhausted).} f, in addition, not all of the binary sums of interest we.e even, the second player could apply the binary strategy to win. Such a situation ~uld occur if the first player, using the terpary strategy, left exactly one match in each pile after his tum. The remaining turns of both players would then be determined, and the second player would draw the last match. I
base
of
\ 31 "
y'
.. ~
.'-~..
,
".
The Blnmy Code and Telqraphy . . I
J '
2S
The effectiveness' of the binary \system in this applicadbn lies in the fact that if fewer than two matc~ remain in all three piles combined, then only one· match remains, ~~ the first player can win simply by
drawing'tlte match.
' I
10. The BiDary C,.1Dd TeJearaphy :a,ne of the oldest technical uses ·~f the binary system is the telegraph code. We write the letters of the': alphabet and a space denoted by u _ _ ", numbering them from 0 tq f6:
"~.~.~;. ."~-..:~.
.~~.('~~;.;:)..~.~
I
ABC D E F G H I J K o 12 3 4 5 6 7·891011 N 0 P Q R S T U V W X 14 15 16 17 18 19 20 21 22 23 24
L M 12 13 Y Z
25 26
Each of these numbers (0 through 26) can be written in the binary system using no more than..five digits, since 25 == 32. We obtain
A B
0 .0 '0 0 0 0'0 0 0 1 0 0 0 '1 0
Z
0
'
,
.
~
.. . .
1 0
Suppose that we have five conductors joini~g two points. Then each five-digit figure representing a unique letter of the alphabet can be sent from one point to the other using a definite combi.nation of electrical impulses: Say we let no $ignal stand for 0 and an impulse on the appropriate conductor stand for 1. At the point of reception this combination of impulses will set into oper~t,ion a printing apparatus which will print the lettercorrespol1ding to the given combination of impulses (and thus to the given binary number). , The telegraph is, in principle, a combination of two apparatuses: an initial mechanism which translates the message into a system 'of im. pulses to be sent across the co'nnecting 1ines, and a receiving mechanism which translates the impulses into a combination of letters via a printing
mechanism. S 3, We have been speaking of two points linked by five conductors. However,
we can manage with only one conductor by transmitting each letter as a succession of five binarY,pigits (impulse or no impulse).
:.
\
•
26,r'
The Binary Systcm-A Guardian of Secrets .
In this way, the ease of translating binary numbers into a system of electrical impulses -leads to a..1Jseful application of the binary system in telegraphy. •
11. The Binary S)'Stem-:-A GurdiaD of Secrets Telegraph and. radio-telegraph provide for .fast transfer of information. ~owever, telegraph me8SC!ges are easily intefCepted,and sometimes., especially in military matters, i~fonnatiQn must be made accessible \only to the intended recipient of message. Therefore, we must reso~ to coding methods ... We have all, at .some time, used codes and conducted" secret correspondences." The simplest type of code is constructed by representing each letter of the alphabet by some symbbl: another letter, a number, a convenient mark, and so on. Such codes are often important in ,detective and mystery stories; forexarnple, Conan DOyle's '6The Adventu~ of the Dancing Men"· and JuleS -Verne's Journey io the Center of the Earth. Such codes are easily brok.en. . Any Janguage, including Russian or English, has a definite structure: Some letters and letter combinations occur often, some less often, and others (for example, a w following a q in English) not at all. This structure is independent 'of the choice of alphabetic symbols, and'soit remains after coding, allowing us to discover the coding system and the actual message. Even coding systems far more complex than ·those of this type yield their secrets to an experienced decoder. It becomes necessary, then, to devise.a code which cannot be deciphered by such simple means, One such code is based on the binary. _ number system and on a variation of the system of letter representation we discussed in the last section. Using the telegraph code.t we can represent any message_ by a definite sequence of five-digit cbmoinations of zeros and ones. Suppose we pet up in advance ,some absolutely arb\trary sequence of such nve-dfgit binary numbe,rs. Such a sequence, intended for coding a text, is called a scale. We make two copies of the scale, writing it as a combination of holes in a special paper. tape (fig. 3), in which every row across on the tape contains some five-digit combination, a punched hole representing a one, and the absence or a hole represen~ing a zero.
the
I
4. In addition to the coding system we have constructed, there is a widely acceptc() coding system called the"Morse code, which also relies on representations of letters using combinations of two symbols-in this case, dots and dashes. We shall not discuss the details of the Morse code system here,
,.
,
-',' ···A
..
,
, The BiIfllTY $ysum-A Guardkm
.....
~
'
0/ Secrets
'. .~'
..
••••• ••• • • • ••• •••• • • • • ••••• ••••• •••••• • •• • •••• •••
... .......... .. .. ........ ..... ... ~
,
...
,
~..
Fli-.3 ,
..
'
~opy
of the scale and send the othcrto the person with .~ whom we have a telegraphic connection. We now combine our message ,:_ with the Uarbitrarily" prepared scale in the following way: We "com..... _~_·,:r~~:.:the first fi~e-digit number (the first letter) ofthc message with the ,. ,' .. .-" .... ~ -.fiArt, number of the scale, the second number of the message with the . second number of the scale, and so on, "adding" in columns under the
. We keep onc
. rules
.
o EB 0 = 0, 1 EB 0 = 0 +
1 = 1 " 1 ffi L= 0 ;
,
that is, without carrying the sum of two units into the next place. The operation EB is called" addition mod ulo 2"; clearly, such a method of combining two binary numbers yields a 0 digit in each place in which the corresponding digits of the two numbers are equal and a 1 in ~ch' place in which they are not. The result of such a combination of the text and the arbitrary scale can then be transferred as a sequence of electrical signals to our addressee. To restore the original message he need only add the same scale to the text in the manner described above.
J
The whole process can be described as follows: '1. tex.t C:B scale = coded text; . 2. code{} text ffi ~e, = text (B scale (f) scale. = text.
It is not hard to see that for the purpose of sending a single message, this code is no better than the letter representation code of the last sec- , tion; the scale serves only to' pennute the numbers which are assign~ to our twenty-seven symbols. But when this code is used to send many different messages (using many different scales), the would-be decoder is faced with the task of brea~g a new code with each message, even though no added hardship iillmposed on those who know the code and its scaling principle. The code is far from "perfect," however, since an adversary with unlimited resources, e~en if he never discovered the scaling principle, could, in theory, break each new code in the same way as the letler representation code 'can be broken.
.
.
" .~., . ' ..
A Few Words about Computers This entire process can easil~ be made automatic with t~e attachment of an apparatus that would perform the operation of combining message and scale to the transmitter, along with a similar apparatus to the receiver. ;rhe telegraph operators serving the line need not even know such mechanisms are present. Of course, the binary system is especially convenient here because each number, 'when .. added." to itself, yields a .. sum" of zero, making tife coding and decoding operations identical.
12. A Few Words about Computers , ,
L
We have been speaking of the use of the binary sYitem in a comparatively old province of technology, telegraphy (the first telegraphic aratuses based on transmission of electrical signals via conductors appe' he 1830s). We shall now consider one of the newest app JOns of the binary system--computers. But first we must discuss. although in very general terms, just w,hat an electronic computer is. The history of the development of computer technology is very lengthy and at the same time very short. The first devices designed to simplify the work of computation appeared long ago. For example, ordinary calculators were used for accounting purposes" over four thousand year~ ago. Still, genuine" machine mathematics" arose 'no more 'than twenty-five years ago, when the first- high-speed computers based on modern electronic technology (radio tubes and latcr transistors) appeared. hi the short time the technology of computers achieved striking success. Modern computers work at speeds up to millions of operations per second; in other words. they perform in one second as many operations as an experienced human armed with a desk calculator can pcr(orm in several months. These machines have allowed us to solve problems which are so complex that solutions by hand would have been out of the question. For example, a modern computer is capable of solving a system of several hundred simultaneous linear equations with the same number of unknowns. A human .. computer" armed with a pencil, paper, and desk calculator could not cope with such a problem in a lifetime. When computers are mentioned in popul~r literature, we find ex· pressions such as .. the machine that solves complex equations," .. the machine that plays chess," or .. the machine that translatcs from one language to another:: This can give the false impression that each such function solving equations, playing chess, translating, and the like -. is done 'by a specific machine' built only for that purpose. However, all these proble~s and' more--both mathematical (solving equations,
35
..
Why Electronic Machines" Prefer" the Binary System
29
constructing tables of logarithms, and so forth) and nonmathematical (translating a text or playing che~)---can be solved by one machine, the so-cauc universal computing machine. Strictly speaking, every such machin can perform only a very limited number of elementary operations: dding and multiplying numbers and storing the results in the machine's ,. memory," comparing numbers, choosing the largest or the smallest of two or more numbers, and the like. However, the solutions of the most diverse and complicated problems can be reduced to sequences (possibly very long) of such elementary operations. Such a sequence of operations is defined by a .. program." Thus, variety in the problems which can be solved by a universal computing machine leads to variety in the programs fed into this machine. . In doing computations by hand or by computer, we must agree on some number system. Whcrl working with pencil and paper, we, of course, use the decimal system to which we are accustomed. However, . the decimal system is hardly suitable for electronic computers. Such machines have a decided preference for the binary system. We shall now attempt to find the reasons for this.
t
I
13. Wby Electronic Machines" Prefer" the Binary 'System~ J • When we perform a computation by hand, we write the numbers on paper in pencil or pen. For a machine, however, some other method of -, storing the numbers with which it is operating is needed. To clarify this problem, s.'">osider, for the moment, not a computing machine, but a far simpler apparatus, -an ordinary counting device (electric meter, gas meter, taxi meter, and so on). Every such counter is composed of several discs, each of which can be situated in one of ten positions, corresponding to the digits from 0 to 9. It is clear, then, that. an apparatus consisting of k such discs can serve to store one of 10k differFnt mlm~rs, from 0 to 10k - 1. Such a counter could very well be used-for computation; rt,at is, it could be used not only to store numbers but also to perform arithmetical operations. • In general. a counter suited to a number system with hase p is a system, of discs. each of which has p different positions. In particular. the apparatus with which binary numbers could be stored should contain a number of objects, each of which would have two possible positions. It is clear that we need not use discs as the counting apparatus. In principle, a counter can consist of any collection of convenient elements, the only requirement being that each of the elements be able to take on as many stable conditions as there arc units in the bas,c of the number system being used.
/
3f;
30
.
\
•
Why Electronic Machines .. Prefet" the Binary System
.
A counter employing a system of wheels or any .other mechanical apparatus s;hanges its state relatively slowly. The speed with which modern computers work --millions of operations per second--is p<:lssible only because these machines work electronically rather than mechanically. Such machines are practically devoid of inertia and, therefore, can change their state within a time interval. of a nU:llionth . , of a second. Electronic elements (vacuum tubes, transistors) typically have two stable conditions. For example, an electric bulb can be .. on" (when current is passing through it) or .. off" (when current is not passing through it). Semic;onguctors, now widely used in computer technology, operate by the same principle. This property of electronic elements is the basic reason why the binary system has proved' to .be the most cunvenient one for computers. The input data for solving a problem is usually given in the conventional decimal system. Therefore, so that a machine based on the binary system can use the data, we must translate it into binary representation, a languago that the machine's arithmetical apparatus can .. understand." Such. a translation is simple to accomplish automatically," of course. We also' want the results of the computer's computations to be written in the decimal notation. Therefore, the computer generally must translate the result from the binary system into the decimal system .. . Computers sometimes use a combined binary-decimal system. In this system, a number is first written in the ordinary decimal system, and then each of its digits is represented, using"zeros and ones, in theobinary system. In this manner, the binary-decimal system represents every number as several groups of zeros and ones. For" example, the number
..
j
2593 is written W1 the binary-decimal system as 0010 0101 1001 0011 . In comparison, the binary representation of the same number is
101000100001 . Let us sec how a computer based on the binary number system performs arithmetic operations. The basic operation which we should consider is addition, since multiplication reduces to iterated addition, subtraction reduces to addition of ncgatjve numbers, and, finally,
3?
·..:.
OM Remarkable Property O/lhe Ternary System
31
9ivision reduces to iterated subtraction. I n turn, the addition of multidigit numbers reduces to performing the appropriate addition place by,
place. • The addition of two binary numbers place by place can be described as follows. 5 Let a be the digit in a given, place in the first summand; b. the digit in the same p~ in the second summand; and c, the digit which we have to carry from the preceding place (where, we are assuming~ the addition has already taken place). To Perform the addition in the given place is to indicate which diiit (0 or 1) needs to be written as ',,~the •• sum" ',and which digit. must be carried to the next place. '.~';,(;~We denote the digit that must be written in the given place of the sum 'by:'the letter s, and the value that we have to carry to the next place by the letter t. Since each of the quantities a, b, c, s, and t can take only a value of 0 or 1, all thellOssible variants involved are contained in the following table: '
to
c
1
s
t
0 0
I 0 1 0
t
1
1
t
a b
1 1
1 1
can
1
0 0
1 0
0 1 1 0 1
0 1
.0
t 0
0 0 1 1 0
0 0 0 0 0
-
Thus, so that a computer add two numbers written in the binary system, for every place there must exist an apparatus having three inputs corresponding to the values a, b, and c, and two outputs corre~~<;sponding to the values sand t. Let us assume, as it usually occurs in ,\ electronic machines, that 1 is represented by the presence of current in . , .~~c given /input or output and 0 by its 'absence. The apparatus under ~ co~ideration, called a single-digit adder, should work in an analo~ot.is way with the table above, .that is, so that if there. is no current in any of the three inputs, there will be none in either of the outputs; if there is current in a, but not in b or c, there should be current in sand none·in 1, and so on. An apparatus working by this scheme is not hard to struct using vacuum tubes or transistors. "
eon-
14. One Remarkable Property of the Ternary System I n any evaluation of the" convenience" of a given number system, at least two criteria come into play: the simplicity of arithmetic computation in the'system, and whatjs referred to as the" economy" of the 5. We speak here of the ordinary arithmetic addition and not the addition modulo 2 mentioned in section II, in connection with a coded text. However, addition modulo 2 also has an essential place in the opetation of a computer .
...
J
• .,.
32
,
-.r
One Remarkable Property of the Ternary System
system. Economy is measured by the quantity of numbers that can be exp~ in the number system with some arbitrary number· of symbols. Let us clarify this with an example. In order to write 1,000 numbers (from 0 to 999) in the decimal system, we need 30" symbols" (10 digits for each place). In the binary system, we can write 216 different numbetp using 30 U symbols" (since, for every binary place, we need only 2 ~igits, o and 1, and so, with 30 symbols, we can write numbers containing up to 15 binary places). But
. 215 >.., 1000;
...
.therefore, using 15 binary places, we can write more different" numbers than we can with three decimal places. In this sense, the binary system, is more economical than the decimal system. But which of all the number systems is the most economical? Let us consider the following'concrete problem. Suppose we have at our disposa160 symbols. We can separate them into 30 groups of 2 elem'ents each, writing any number in the binary system using no more than 30 binary placeS, that ls, 230 numbers. We can also divide these 60 symbols into . , 20 groups of 3 elements each and, 'using the temary system, write 3~o ,different numbers. Furthermore, by separating the 60 symbols into ~ groups of 4 elements each, we can apply the base 4 system and write 4 15 numbers, and so forth. In particular, if we used the'decimal system (that is, separating all the symbols into 6 groues of 10 elements each), we could write 106 numbers, but if we used the~xagcsimal (base sixty) system, 60 symbols would altow us to write only 60 numbers. Let us find out which of the possible systems is the most economical ; tllat is, which one allows us to write the greatest quantity of numbers using only 60 symbols. In other words, we are asking which of the numbers
is the largest. It can be verified by calculation that the largest n urn ber is \ye first show that
:V~o.
Since 230 = (2 3 )10 = 8 10 and inequality in the form
3
20 =
In this form, our r~ult is obvious.
3.<) ,
.
(3:;!)10
;;:=
910,· we can write our
,
. .
.
One- Remarkable Properly oj the Ternary System
,
33
Furthermore,
,. I."
Thus, by what we have just shown, 3::.10
> 415 •
'
.. ,1
• '."
,It is easy to verify 1hat the followi~ chain of inequalities is valid-:
415 > 5111 > 610 > 108 > 125 > IS· > 2()3 > 3()1l > 60. Thus, the ternary system has turned.out to be most economical, with • the binary and base four systems n~ best. . .' ' This result is in no way dependent oi1'thefact that we were considCring 60 symbols. We chose this example only because a group of 60 symbols is easily divided into groups of 2, 3, 4, and forth. , " In the general case, if we employ n symbols and use some oomber x for t~ ~ of the number system, then we can use nix places, and the quantitY of numbers that we can write will be equciI to
S9
.'
;x"/X.
Consider this expression as a function of the variable x, taklng..!!ot only integral but any (fractional, ~ational) positiv.e values.,It is possible to find the value of x at which the function achieves its maximum. The function has a maximum at e, an irrational number Which is the base of, the so-called system of natural logarithms and which plays'an important role in the most diverse questions of higher mathematics. a The. number e is approl\imately equal to
2.718281828459045 .... 6. For the reader familiar with the elements of differential calculus, We give the corresponding calculation. A necessary condition for a function y(x) to achieve its maximum at a point Xo is that the derivative of the function be zero at that point. In the given case, y(x)
The derivative,s equal to
dy dx
:= X~I"
•
_
= !!.
ax [(x)nl.%l
= (~.! xx
""
!!... (e" III "''')
dx
- ~)e"ln"I" r
.
n (1 - In X)t>"ID "1" , x~
= -
\
....
-... -...... .
.,
40
,-,-
34
.'
The clOsest i~teger' to e
is
.
.
On Infinite Number Representations .
3, which serves as the base for the most~
economical number system., • . The graph of the function y = (X)"lx is given in figure 4. (Note, however, that the,x· and y-axes have different scales.) . ~ ~'
-
I
y
.,
.•
'. ~--~--~~~--~--~----x
e 3
5·
"
,
-
Fia. 4
.. .... The economy of a number system is a significant property from the ~
.
'.
I
stalMpoint of its use in computer technology. For this reason, although the use of the ternary system in place of th~ binary system in computers involves some difficulfjes in construction (one must use elements that can exist in three 'rather than in two stable· conditions), the ternary system has already been tried in several existing comp}lters. '
\
'/
.. 15. On Infinite Number
Representati~
Up t6 this point, we have considered nURlber system representations tOO\ integers. It is natural, however, to pass from the decimal only n·otation.. of whole numbers to' decimal representation of fractions. To do so, we must consider not only the nonnegative powers , of 10. (1, to, 100, ilnd so on), but negative powers (l0-1, 10- 2 , and so on), arid compose combjnations in which we use these negative powers as well as the others. For example, the expression 23.~8rstandsfor
or
I
•
r
.
1
2.10 +3.'10°+5.10-.
1
+8.10
2+
1.10-'3.
-Fractions arc conveniently represooted as points on a ·Iine. We take a Setting the derivative equal to zero, we obtain In x
=:
I, that is, x
=:
e.
Since the derivative dy/dx is positive to the left of x = t' and negative to the right, we-t:lHl ~el1~knnwn theorem of differential cal-.ulus to show thaI our functjon~ has a maximum at that point~
.'
11.1' -4
. .~.
.
,
.
'. ,0
"
On Infinite Nu"!be~. Representations 0
.j. ~O
\
A I ! 1/10
I
.'
I
I I
•,
!
,
..
....
Fig. S
line and choose a fixed point 0 (the'-origin of the line), a positive direction·(to the right), a.,Qd a unit· of measure, the line segment OA (fig. 5). We take the point 0 tq stand for the number zero, and the point A. to stand for the number 1. Having laid the segment OA fo the right of the • represent the point 0 two, three., etc. times, we obtain points which numbers 2, 3, at'ld so on. In this way we can represent all the integers on a line. T,O represent fractions containing tenths, hundredths, and so on, we need only divide the segment OA into ten, one hundred, and so • forth, equal parts and use these smaller \1nits of length. We can thus measure off points on the line corresponding to all possible numtlers o f ' ,the form
that is, all possible finite deci mal representations. I n doing so, of course, we do not obtain all the points of the line. For example, the endpoint of a segment of the same length as a diagonal of the unit square (the square with side I) does not correspond to ..any finite aecimal , representation, since the ratio of the length of a square's diagonal to the length of its side is irrational. If we want each point of the line to correspond to some number, we shall have to use not only finite, but infinite decimal representations. Let us clarify the meaning of this last statement. In order to make every point otthe line correspond to some (infinite) decimal representation, we proceed in the following manner. For conveniencc~we. shall speak only abotft a part of the whole line, the line segment OA -our unit interval. Let x be some point on this line segment. We divide OA into 10 equal parts and _nu~ber the parts using the digits from 0 to 9. We denote the number of the section in which X . lies by hI' We now divide this smaller segment into 10. parts, numbering these parts in the same way, and denoting the number (0 to 9) of the smaller section by b2 • We subdivide further in the same way, continuing the process indefinitely. As a result, w~ ~btain a sequence of digits hI, h2' ... , bn~ ?'. "which we write in the form
•
. h1 h2 • •. hn • ••
,
and which we call the .infinite dedm.aJ representation (or jnfi.nj~:~eci~lal expansion) corres pondmg 10 the pOin Ix. I f we break off th IS.I an'lOn
,. v
,,'
On Infinite Number Representations
36
at some point, we get an ordinary (finite) decimcfl representation . b 1 b2"", • b'll' which defines the position of the point x only approximately (with an acouracy of a (lO")th part of the unit iI\tf~al). In this way, we have assigned to each number x betwQ81 0 and 1 an infinite decimal expahsiori. The correspondence can be extended to the entire line. for if the number y lies between the integers 11 and-n + 1. the number x = y - n lies between 0 and 1 and thus has some aecimal • representation
• 1f the integer n has the decjrnal representation
then y can be written
y""" n
+ x = 'a~k-l"
·alao.blb'),·· ·b'll··· .
.
..r
.'
\
It is n6t hard to see that some uncertainty inevitably arises from this. In particular, having divided the segment OA into 10 parts. we must 'consider. for example. th~ point on the boundary between the first and the second parts. We can consider it to be both in the first secti9n (having number 0) and in the second (having number I). In the first case, continuing the process of successive divisions, we will discover that th~ chosen point is in the rightmost (having number 9) of all the parts into which we divide the segment at each step, that is, we obtain the infinite fraction 0.0999" " while in the second case the point will be in' each of the sections which have number O. that is, 'yielding the fraction 0.1000. , '. Here wc' have obtained two infinite representations corresponding to onc and the .same point. The same thing will occur at any other' boundary point (hetween two segments) in any of the successive divisions. For example, the fractions 0.125000. . .
and
0.124999 .. ,
represent one a~d the same point. We can avoi this ambiguity by agreeing to-\hink consistently of every boundar point as belonging either to the rightmost or the leftmost
" 13
..
','.
,~.
31
. On Infinite Numlwr hpresenlalions
of the partial segments which it bounds. In other words, we can eliminate either all fractions cOnsisting of" infinitely 'repeating" zeros, or fractions consisting of .. infinitely repea . ng" nines. If we intrOduce such a restriction. e can repreSent e.\lch point of the lint by a unique infinite'decimal ansion. , That we h~ve successively . oed the partial segments into 10 parts is, of covrse, immaterial. In,~te d of 10, we could have used some other number, say 2, div4ding each partial segment in half. In tqis way we can • represent eacl1'point of the line by an infinite sequence b1 , b2 , ••• ,b., ... " , of zero$ and ones, which we write in the~ . •
atf . A1
.~
•.
J
{O. hl br.· . ·b,,· .. )2
.
and call an infinite binary representation (or expansion). If we cut off . this sequence at'some place, we get the finite binary representation
..
that is, the number
...
approximating the point under consideration to within a (2")th part of the unit interval. ' Infinite decifnaI expansions, with which we can represent all the points .ofthe line, are a convenient tool in the construction of the theory . of real numbers, which is fundamental in many aspects of .higher mathematics. However. any othe~ type of infinite expansions (binary. with equ?.1 su~ess. ternary, and so on)1 can be used _ · , Before concluding, let us consider the following instructive problem. We take a line segment OA, divide it into three equal parts, and reject ,its middle part (we consider the points of division themselves to &e " rne~bers of the middle part-that is, they are also rejected; fig. 6). We, ()
(1)
. (3)
I
A
,t----------~M~\6S)~~»m-~m".wmm~>?om0""'~"m'~om~~'m-~m~7+-~-_---~
I ~ff~ mfffffff~ ~fA WWfffffff1ffff.ffffffffffffff~. ~ff~ ~f~ ~~
r
~) 1;;t~g~~f'fffffl)ff~P':i~~~~5B'~~j'jm»f»f{>f~~~f~Htm~»j;ifi~P11 Fig. 6
14
.,
38
On lrifinitcNumbcr Representations , "
further divide each of the two remaining parts into three equal parts and reject the center segments. After this there remain four small pieces, from each of which we again take the middle third. We conchue this process indefinitely. How many points of the segment OA will remain , undeleted ? At first'glance we might say that only the endpoints 0 and A will remain. This conclusion is supported, it would seem. by the following reasoning. We compute the sum of the lengths of all the segments deleted by the above process. (We recall that we took the".length of the en~re, segment O~ to be equal to 1.) At the first step we rejected i\ Segment of length 1/3, at the second step two segments of length 1/9, } at 'the third four segments of length 1/'J7, B.lld SQ ,op. The sum' of the lengtbs of all the deleted segments is equal to .':' ~
.:~
/.. 1/3 ...
\.
+ 2/9"+ 4/27 + .....
. . • This is an i~finite geometric pro~ession wit.h first term 1/3 and ratio 2/3 . , ~ the ~Jk!c.nown formula, its sum is equal to ,
.
t.
.
,
1/3 \\ 1 1 - 2/3 T= ••
\
, .
./
Thus, the sum" of 'the lengths of the del~ted segments is exactly equal to the leagth of the original segment OA! And yet the above process leaves-bps ides 0 and A--an infinite number of undeleted points:To see this, we represeht each point of the unit segment OA by an infinite ternary-expansion. Each such representation consists of zeros, ones, and twos. We claim that the process of, deleting the" middle third" leaves behind exllctly those points which correspond to ternary expansions containing no ones (composed entirely 'of zeros and twos). I n the first step we deIeted the middle third of the unit interval, that is, those points which correspond to terna'ry expansions having a one in the first place. In the second step we deleted t~c middle third again. removing the expansions which have a'one in the , second place, and so forth. (Here we delete th~se points that can be represented by two ternary expansions if one of these expansions contains a one. For example, the endpoint of the first third of the line segment OA, the number, 1/3, can be represented by the ternary expan" sions . 0.1000 ...
.
•
.
-
..
On /nfittite Number
39
Rep,eUIltQlio~
and I
0.0222. '.:); this point we defete.) And so, the process leaves exactly those points which correspond to ternary exPansions consisting bnly of zeros and . twos. But there are infinitely many such numbers! Consequently. besides the endpoints, theN wilf still remain ipfiniteiy niany undeleted I points. F~1xam.PJe, ~he ;mint that corresponds to the representation )
0.020202 ...
(the ternary expansion of the number 1/4) will remain. The infinite ternary representation 0.020202... actually signifies the sum of the geometric progression
w~ich,
by the formula, is equal to 2/9
1 - 1/9
2/9
=
8/9 = 1/4.
..
By using the following geometric argument, we can persuade our~ selves that the point t 14 will not be deleted. The point 1/4 divides the whole interval [0, I] in a ratio of I : 3. After the removal of the segment [1/3. 2/3}, the point 1/4 remains in the half~open interval [0,1/3), which it divides in a ratio of 3: 1. After the second deletion it remains in the .open interval (2/9. 113), which it divides in a ratio of 3:·1, and so on. At no step will the point 1/4 be removed. I Tlius. it turns out that the process of deleting the" middle third" leads to a sct of points which, although it .. takes up no space at all" on the line segment (since the sum of the lengths of the deleted segments is equal, as we have made clear, to one), contains infinitely many points. This set of points possesses other interesting properties; however, to study them would. requite an exposition of concepts beyond the scope of our little book. Thus, we end here .
•
;~~1~~~~I!")~":1;'~~~:tgi~~;~'i~:~j~.~;g$~~~1i(i,'f;;'t;~)~\~~~Efl~~;I~?1~~~~
,.....-. .............
....
.~.
..
.:LtCIUNa 1ft ..
lzaak Wirazup~
\
".
Editor
. '.,
"Y
•
· The Popular Lectu.... In·
--
.
..
.........,...•
.Mathtn1IticI_....., tranlfated
. s. V. Fomin
.maket
TtaMI.t«J and adapted from . . tIut ucond Rualan «l/Uon by.
and Idapted from ttt. RUlelan,
,
,
.vat..,.. to EnQIfIh-
· apeakInQ tMcheN and ItUdtnta . 101M of the baM tn&tbImaticaI literature of the Scviet Unlon. The teeN... are·lntanded ~ Introduce v_rf0U8.lIpectaOf mathetnatlcal thought and to enaaae thlltudent In . matf)ematlcaJ IclMty wbfch wnl fcet.r~ woric. Some of the lecturee provide an .a.mentaJy Introduction to. cerlaln· noneIementaIy topi", and othe.. ptMent mathetnatlcal . QOf1cept1 and IdeIIln g ...ter depth. The bQo1cs contain manY Ingenious problems with hints, IOlutlonl, and anawS$. A Ilgnlflcant feature fa the authors' · UI8 of new approach.. to make " complex ma1hematJcaI toplos accessible to both high school and college etudents. '"
inherent advantagel oVer Other
poulble Iyttema: Ita popul.rity . i. due to tHltoricaJ ar1d . biological, not mathematical . facto,.. In this~k, S. V. Fomfn dlacuues the origin. properties,
and applications of various number systems. Including the
. decimal. the bInary, and the ternary. His preuntlllfon offers
the student an introduction to mathematical abstraction and
then, through its examples, shows him the abstraction
at work.
.
.
... .'
..
~
The University of Chicago Press
:f
JocJ W. Ttl/et and .. . . Thoma P. BlaMOiI The'mOlt common language of . numbers, the decimal system, haa not aJwaya been used . . unl~rsalry. From a purely ma$hentatical point of view,· . .the decimal ayatem "'" no
Paper
47
ISBN:
~22S-25669-3
~