A New Trinary Code Compared with Existing Codes for Punched

Publication Date: January 1961. ACS Legacy Archive. Cite this:J. Chem. Doc. 1961, 1, 1, 68-69. Note: In lieu of an abstract, this is the article's fir...
0 downloads 0 Views 163KB Size
A NEW TRINARY CODE COMPARED WITH EXISTING CODES FDR PUNCHED CARDS By DAVID M. GRANT Department of Chemistry, University of Utah, Salt Lake City, Utah

E v e n though the alphabet m a y be c o n s i d e r e d as a n u m e r i c a l s y s t e m of o r d e r 26, the m a j o r i t y of alphabetical codes f o r punched c a r d s find t h e i r basis in n u m e r i c a l s y s t e m s of a l o w e r o r d e r . Standard IBM type c a r d s u s e a code having 12 punches or a n o r d e r of 12 f o r codifying the alphabet. K e y s o r t type c a r d s having a single o r double row of h o l e s , h o w e v e r , a r e r e s t r i c t e d t o n u m e r i c a l codes of o r d e r 2 or 3 , r e s p e c t i v e l y . By placing the alphabet in c o r r e s p o n d e n c e with n u m e r i c a l s y s t e m s of the s a m e o r d e r as the code, the e a s e of s e t t i n g up the punch p a t t e r n s is enhanced and a n i n c r e a s e is noted in the efficiency of the s o r t .

SINGLE HOLE CODES

codes a r e b a s e d upon a binary n u m e r i c a l s y s t e m in which all combinations involving m o r e or l e s s t h a n two 1 digits a r e forbidden. F i g u r e 1 gives a typical t r i a n g l e code with e x a m p l e s of the l e t t e r s G and 0. TABLE I BINARY SINGLE HOLE CODES Binq Number

OIECB Code

0 1

A B C D E F

10 11 12

00000 0000 1 00010 000 11 00 100 00101 00110 00111 01000 01001 01010 01011 01100

13 14

01101 01110

MC

K L

M2

M

15 16 17 18 19

01111 10000 10001 10010 10011 10100

N

2 3 4

5 6 7 8

1

Two c o m m o n single hole c o d e s , the OIECB and the N - Z , 2 a r e based upon a modified binary n u m e r i c a l s y s t e m . Table I gives the d e c i m a l value, the binary n u m b e r and the c o r r e s p o n d i n g l e t t e r a s s i g n m e n t f o r e a c h of the s y s t e m s . The binary n u m b e r s a r e then r e p r e s e n t e d i n code with a single punch f o r the 1 digit and no punch f o r the 0 digit. In the OIECB code the binary sequence is deviated f r o m only slightly by adding the combined l e t t e r s Mc and S c h and splitting the M ' s and S ' s into the f r a c t i o n s a p p e a r i n g bef o r e and a f t e r t h e s e combined l e t t e r s in the alphabet. T h i s modification h a s the advantage of a s s i g n i n g only one punch t o the high f r e q u e n c y l e t t e r 0. In the N - Z code the binary s y s t e m is modified by a s s i g n i n g the second digit f r o m the l e f t the value of 7 i n s t e a d of 8. T h i s h a s the effect of eliminating the binary combinations f o r the v a l u e s 7 , 15, 23 and 31, all of which r e q u i r e m a x i m u m punching. An i n c r e a s e in the efficiency of the code r e s u l t s f r o m s u c h a modification. C o m p a r i s o n of the single hole codes i n Table I11 i n d i c a t e s t h a t t h e r e is no a p p r e c i a b l e d i f f e r e n c e between the two. P e r s o n a l p r e f e r ence t h e r e f o r e is left as the d e t e r m i n i n g f a c t o r i n o n e ' s choice. The s l i g h t efficiency of the OIECB code o v e r the N - 2 code i n t h e weighted a v e r a g e of holes punched r e s u l t s f r o m the m i n i m u m punching r e q u i r e d f o r the high f r e q u e n c y l e t t e r s A, E , I and 0 .

DOUBLE HOLE CODES Among existing double hole codes the N-Z code, the t r i a n g l e code and the r e c e n t l y p r o 4' posed code of Aronoff a r e briefly d e s c r i b e d and c o m p a r e d with a newly p r o p o s e d t r i n a r y code. The N - Z code is based on the s a m e p r i n ciple a s the c o r r e s p o n d i n g single hole code with the f i r s t row of holes u s e d f o r A to M and the second r o w u s e d f o r N to Z . T r i a n g l e n u m e r i c a l 68

N- Z Code

Decimal value

9

20 21 22 23 24 25 26 27 28 29 30 31

G

A

B

C D E F

n

-

I

G

J

n

K

I

L M1

J

0 P

Q

N 0

R

P

S1

Q

10101 10110

Sch s2

S

10111 11000 11001 110 10 11011 11100 11101 11110 11111

T U V W X Y Z

-

-

R

T U V W X Y Z

-

Aronoff's code c l a i m s the advantage of s i m p l i c i t y and e a s e of m e m o r y but l a c k s the efficiency of the c o m p l e t e alphabetization of the n u m e r i c a l s o r t , This. code is not based upon any simple numerical system. A s e t of double hole punched c a r d s c a n be s e p a r a t e d into t h r e e g r o u p s by s o r t i n g on one column. T h i s d i s t i n c t i o n is m a d e on the b a s i s of a double, a s i n g l e , or a no punch which m a y r e p r e s e n t the 2, 1, or 0 d i g i t , r e s p e c t i v e l y , in a t r i n a r y n u m e r i c a l s y s t e m . As a t h r e e d i g i t t r i n a r y n u m b e r c a n a s s u m e 27 different v a l u e s , t h r e e p a i r s of holes a r e sufficient to codify the a l p h a bet. Table I1 gives a code based on s u c h a numerical system. The t r i n a r y n u m b e r having the value of 13 is o m i t t e d b e c a u s e of i t s low isolation efficiency. One m a y choose t o u s e it f o r the combined l e t t e r , Mc, but no f u r t h e r value is left f o r d i s tinguishing between the M ' s before and a f t e r Mc. C a r d s r e c e i v e a single o r double p u n c h f o r the 1 o r 2 digits r e s p e c t i v e l y and a r e not punched f o r the 0 digit. S t a r t i n g with the l e a s t significant digit alphabetization is a c c o m p l i s h e d by s o r t i n g

David M . G r a n t

TABLE I1 ‘TRINARY DOUBLE HOLE CODE Decimal Value

Trinary NUlIlber

0 1 2 3 4 5 6 7 8 7 10 11 12

000 00 1 002 0 10 011 012 020 021 022 100 101 102 110

Letter A

B C D E F G H I

J

K L

M

Decimal Value

Trinary Number

13 14 15 16 17 18 17 20 21 22 23 24 25 26

111 112 120 121 122 200 20 1 202 2 10 211 212 220 22 1 222

Letter

N 0 P

Q R

s

T U V

W X

Y Z

69

weighted with its c o r r e s p o n d i n g o c c u r r e n c e f r e quency as c a l c u l a t e d by Luhn’ f o r the initial f o u r l e t t e r s of E n g l i s h w o r d s . P r e s e n t e d in Table I11 is a c o m p a r i s o n of the s e v e r a l c o d e s mentioned above. The efficiency of t h e p r o p o s e d t r i n a r y s y s t e m in e a c h of the l i s t e d i t e m s e s t a b l i s h e s it a s a n e x c e l l e n t double-hole code. In r a p i d i t y of complete a l p h a betization a n d i n economy of s p a c e the t r i n a r y code ranks f i r s t among double hole c o d e s w h e r e as in e a s e of i s o l a t i o n and punching no significant deficiency is noted. E a c h weighted a v e r a g e in Table I11 i s c a l c u l a t e d in the m a n n e r d e s c r i b e d above. TABLE IIl COMPARISON OF CODES FOR PUNCHED CARDS

o n the double and then the single hole taking s i x p a s s e s of the s o r t i n g needle t o t r a n s v e r s e t o t h e m o s t significant f i g u r e . The d e s i r e t o o r d e r t h e d e c k i n m o r e t h a n one l e t t e r is s a t i s f i e d by alphabetizing t h e l e a s t significant l e t t e r f i r s t . I s o l a t i o n of any one l e t t e r r e q u i r e s one p a s s of t h e needle f o r e i t h e r t h e 0 or 2 digit a n d two p a s s e s f o r the 1 d i g i t , t h e first p a s s being e m ployed t o e l i m i n a t e all doubly punched c a r d s . In t h e i s o l a t i o n of any l e t t e r 3.9 p a s s e s as a weighted a v e r a g e a r e r e q u i r e d t o m a k e t h e s e p a r a t i o n . T h i s f i g u r e is obtained by a v e r a g i n g the n u m b e r of p a s s e s f o r e a c h l e t t e r p r o p e r l y

Space Complete Wt. av. of I t . av. of number requited , alphabetip a s s e s to of holes punched per letter (columns) zation (passes)isolare a letter Single Hole 5

1. OIECB 2. N-Z

5

5 5

3. 4. 5. 6.

Trinary N-Z Triangle Amonoff’s

3

6

4

8 12 25

6 4

‘R. S. Casey and C. F. Bailey, 1: Chem. Ed., 23, 475 (1746). ’R. S. Casey, etal., Editors, “Punched Cards,” 2nd ed., ReinholdPublishing Corp., New York, N. Y., 1758, pp. 20-21. 3Ref. 2, p. 21. 4S. Aronoff, J. Chem. E:d., 36, 581 (1757). ’Ref. 2, p. 501.

o w o o o ~ 000000

- (a)Reprementatire Triangular code. (C)

2.1 2.2

3.7 5.0

1.8 1.8 2.0 1.6

Double Hole

REFERENCES

Fig. 1.

5 5

The LeKer 0 .

(b) The Letter G.

3.1 3.7