Codes and Combinations

wawT
l.rf
finally you and your bestfriend mernorize
the onty way you can becomeproficient;,;;Ji;;;;;";"t;; Morce code (for that,s
tr),"rou."n
also useit vocalryas a substitur" rri
ii'rp"-.h. ro,
speed,
you pronouncea dot q-sdih (or dit for"lt
the rasti"t
-"*frnum
t.tt"r)'"nlla"rn
d4h'rnrhe samewav that MotJ;.d.;il;;
"r " ranguage
",
wrinen
to dots and
dashes,the spoken version of the codei.J,r.",
speechto just two vowel
sounds.
The key word here
Try9
a.l6i,tFba,
ChapterTwo
of blinks, two
Wnes -"ovowel sounds,rwo
l:two.
rea
lly,
l,iit"
ir.
ui"",i;
;;; ;;; rrp.,
""","i*
:f*:*:l,Tllng,
"i
Codesand
Combinations
f?fl}tr335'.
orsecodewasinventedby SamuelFinleyBreese
Morse(1791-18721,
whom we shall meetmore properly later in this book. The invention of Morse codegoeshand in hand with the inventionof the
telegraph,which we'll also examinein more detail.Just as Morse codeprovidesa good introduction to the nature of codes,the telegraphprovidesa
good introduction to the hardwareof the computer.
Most peoplefind Morse codeeasierto sendthan to receive.Evenif you
dont have Morse code memorized,you can simply usethis table, conveniently arrangedin alphabeticalorder:
A
J
s
B
K
T
c
L
U
D
M
E
N
F
o
v
v
x
G
P
Y
H
a
z
I
R
I
r:h.tlrt?r 'lit?,
(iodet and Comhinatidns
ReceivingMorse code and transratingit
back int. w'rds is c,'sicrcrarrry
hard e r a n d m or e t im e c .o n s u mi n gth a n
s e n d i n g b ..;;;; ;;;_ur,
* .,rk
backward to figure orrt ilrt.rr.. ,[",
.".r.rponds to a particular coded sequenceof dots and dashes.,Forexample,
if you receivea dash_dot_dash_dash,
H
X
youhaveto scanthroughthctabret.tt.i uf
Ltr.. n.ror.youfi,i"ttldir.ou.,
that the code is the letter y.
The problem is that we have a table
that provides this translation:
Alphabetical letter -+ Morse code dots
and dashes
But we don't have a table that lets us go
backward:
Morse code dots and dashes , Alphabetical
letter
In the early stagesof learning Morse
code, such a table would certainly be
convenient. But it's not at all obvious
how we could construct it. There,s
nothing in those dots and dashesth"t
*.."n
pu, into alphabetical order.
So let's forget about alphabetical order- perhanr
LJr,*
,o
organizing the codesmighr be ro group
"
"jplo".t
them depending
on how
many dots
and dashes-they have' F-o, e*a-ir.,
code sequencethat contains
either one dot or one dash can t.pr.t.ntonty
"'M;;r.
i-o l.tt .r, which are E and r
A combination of exactry two dots or
dashesgives us four more lertersI, A, N, and M:
A
M
A pattern of three dots or dashesgives
us eight more letters:
s
D
U
K
R
G
w
o
And finally (if we want to sropthis exercise
beforedealingwith numbersand
punctuationmarks), sequences
of four dots and d"rh; gi;;;;^ii
_or.
characters:
F
C
U
Y
L
z
A
a
P
o
T
s
Taken together,thesefour tables contain 2 plus 4 plus 8 plus 16 codesfor a
total of 30 letters, 4 more than are needed for the 25 letters of the Latin
alphabet. For this reason, you'll notice that 4 of the codesin the last table
are for accentedletters.
These four tables might help you translate with greater easewhen someone is sending you Morse code. After you receivea code for a particular letteg
you know how many dots and dashesit has, and you can at least go to the
right table to look it up. Each table is organized so that you find the all-dots
code in the upper left and the all-dashescode in the lower right.
Can you seea pattern in the size of the four tables?Notice that each table
has twice as many codes as the table before it. This makes sense:Each
table has all the codes in the previous table followed by a dot, and all the
codes in the previous table followed by a dash.
We can summarize this interesting trend this way:
Number of
Dots and Dashes
N
B
I
2
3
4
Number of Codes
2
4
8
t6
Each of the four tables has twice as many codesas the table before it, so if
the first table has 2 codes, the second table has 2 x 2 codes,and the third
table has 2 x 2 x 2 codes. Here's another way to show that:
Number of
Dots and Dashes
1
2
3
4
Numberof Codes
2
2x2
2x)x2
2x2x2x2
Chaptet'l'wr
of course,oncewe havea numbermurtipliedby itserf,wc
cansrarrusing exponentsto show powers.For example x 2 x 2 x
2can be w.rren
,2
.l.G
(2
are"ttpo*.r, of
2s.24 to the 4th pouter).The numbers2,4, g, and
2 because
you cancalculatethemby multiprying2 by itself.so our
summary
can alsobe shownlike this:
Number of
Dots and Dashes
I
2
Number of Codes
21
22
J
23
4
24
This tablehas becomevery simple.The numberof codes
is simply2 to the
power of the numberof dotsand dashes.we might ,.rrrr-".ir.
ti'. i"tt. d"r"
in this simpleformula:
nUmbef
Of COdeS _ 2numberofdot5anddashes
Powers of 2 tend to show up a lot in codes, and we,ll
seeanother example
in the next chapter.
To make the processof decoding Morse code even
easier,we might want
to draw something like the big treilike table shown
h;r;. -
-A <
/
'<-T
' ' < -;
"<_l
\- .
>.
-_*-l_
P
l
'"<, - :
-"<'-;
\
-..-/''<
-o ;
\r_ o<:.
-M<
\-
$
( krclctand (ltmlilnal ttrnt
't'his trrhlc shows thc lcttcrs that result from each particular consecutive
the
.rr d<ltsirnd dashes.Ti>decodea particular sequence'follow
which
krrow
to
you
want
suppose
-"q,,.",."
,rr,r*I; frrtm left to right. For example'
to t"h. .od. dot-dash-dot. Begin at the_leftand choosethe
ili
the dash and
"r.,r...rp'nds
dot; then continue moving right along the arrows and choose
dot'
last
the
to
next
shown
is
R,
letter
another dot. The
thcn
'
lf you think about it' constructing such a table was probably-necessary
you don't make
f,,r-aJfiningMorse codein the first place.First, it ensuresthat
Second,
letters!
rhe dumb irirtake of using the same code for two different
sequences
the
of using alfthe possiblecodeswithout making
;.;t;
"rr,rr.d
irf dots and dashesunnecessarilylong'
printed page,
At the risk of extending this iable beyond the limits of the
A sequence
more'
and
dashes
and
we could continue it for codesof five dots
additional
2s)
or
32,(2x2x2x2x2'
gives
us
<rfexactly five dots and dashes
16 puncthe
and
numbers
10
the
for
enough
codes.Nirmally that would be
encoded
are
numbers
the
indeed
arrd
coJ.,
Morse
in
ir",i"" symbols defined
sequence
a
use
that
codes
other
the
of
many
But
with five dots and dashes.
punctuation
of five dots and dashesrepresent accentedletters rather than
marks.
to six
To include all the punctuation marks, the systemmust be expalded
codes
26)
additional
or
dots and dashes,which gives us 64 (2x2x2x2x2x2,
totalof2+4+\+1.6+32+64,or1.26,characters..That's_ove.rkillfor
i.."g.""a
The word
M";; code, which leavesmany of theselonger codes"undefined."
for anystand
doesn't
that
code
a
to
))aifl"ra used in this context refers
code'
undefined
got
an
you
and
Morse,code
thing. If you were receiving
mistake'
a
made
somebody
that
youiould be pretty sure
Becausewe were clever enough to develop this little formula'
n U mb e f
Of COdeS -
2 n u mb e ro t d o t s a n d d a s h e s
from using longer
we could continue figuring out how many codes we get
sequencesof dots and dashes:
Number of
Dots and Dashes
I
2
J
4
5
6
'7
8
9
10
Number of Codes
)r -)
2 2 =4
2 3 =8
2 4 =7 6
2s=32
26- 54
27 = 729
28= 256
2e= 512
210= 7024
r.ndptcr l,uo
Fortunately'we don
3i::ln1l:#:,}t
to actua,y.writeout arr rhe possihre
1rl1ve
c'des r.
there
would
ue'att*. r,"u.todois;;i;;i; t byitsetf
Morse codeis said to be a bina.ry
(literally meaningtwo by
tuo) code
because
rhecomponentsof the .;;.;;ri;
of onry wo things-a dot and
a dash'That'ssimilarro a coin,
*r,i.r, ."n i"nd only on the he-ad
sideor the
Chapter Three
arvcodesr,".r,",r,a.i,ecode)
:?::;',*ii"i'#ffi
tl';ffix"il";ffi
!'hat we're
doine by
il;;;y codesis a simpleexercise
branchof mathematlcr'k";;;;z
"r"ryring
in the
i' uiLiJr,", or
inatoriar )rnatys*.
TiaditionallScombinatori"trn"tyri,
.comb
ir;;;::,
oftenin the fierdsof prob_
ability and statisticsbecause
it invorvesa.*-ini.rg the number
of waysthat
things'like coinsand dice,.""
u.."-liJ;'.;",
it
arso
herps
us
understand
how codescan be p.rt tog.th.r-"Jr;i;;;;rr.
Brailleand
BinaryCodes
.-Fagel&45.
amuel Morse wasn't the first person to successfullytranslate the letters of written languageto an interpretablecode. Nor was he the first
person to be rememberedmore as the name of his code than as himself.That honor must go to a blind Frenchteenagerborn some 18 yearsafter
Samuel Morse but who made his mark much more precociously. Little is
known of his life, but what is known makes a compelling story.
Louis Braille was born in 1809 in Coupvray,
France, just 25 miles east of Paris. His father
was a harnessmaker. At the age of three-an age
when young boys shouldn't be playing in their
fathers' workshops-he accidentally stuck a
pointed tool in his eye. The wound becameinfected, and the infection spread to his other eye,
leaving him totally blind. Normally he would
have been doomed to a life of ignorance and
poverty (asmost blind people were in those days),
but young Louis's intelligence and desireto learn
were soon recognized. Through the intervention
of the village priest and a schoolteacher,he first
attended school in the village with the other
children and at the age of 10 was sent to the Royal Institution for Blind Youth
in Paris.
15