Subject: RE: CAS Registry Numbers algorithm

From: "Shobe, Dave" <[email-masked]>
Date: Mon, 21 May 2001 10:08:25 -0400

The algorithm described will catch transposition errors, since in xxabx-xx-x
the "ab" will contribute (k)b + (k+1)a and in xxbax-xx-x the "ba" will
contribute (k)a + (k+1)b.  ("k" here representing the position of the 2nd of
the transposed digits).  For these to make equal contributions to the
checksum, (k)b + (k+1)a = (k)a + (k+1)b implies a = b.  

The ISBN code uses a similar error-detection scheme (see section 4.4 of
http://www.isbn.org/standards/home/isbn/international/html/usm4.htm), but
the result is modulo 11 rather than modulo 10.*  As a result some of the
ISBN "numbers" end in "X" instead of a digit.

--David Shobe
Süd-Chemie Inc.
phone (502) 634-7409
fax     (502) 634-7724
email  [email-masked]

*The term "modulo" refers to classifying numbers by their remainders when
dividing by a fixed  number.  The CAS RN algorithm described below is
"modulo 10" since it uses only the last digit of the number, i.e. the
remainder one would get if dividing by 10.

-----Original Message-----
From: Jacobo Cruces Colado [mailto:[email-masked]]
Sent: Saturday, May 19, 2001 9:57 AM
To: [email-masked]
Subject: CCL:CAS Registry Numbers algorithm

Dear all:

Searching the archives of [email-masked] (URL is 
http://listserv.indiana.edu/archives/chminf-l.html), I found out the 
algorithm used to generate the checksum number of every CAS RN. Since it 
could be of interest for some people in the list, I will reproduce the text 
here (thanks to the original sender, Gary Wiggins; I hope not to break any 
rule by reproducing this and giving the source):

         ALGORITHM: The last digit is a checksum digit of the unit integer
of
the summed products of multiplying the left-next-most integer by 1, followed
by
multiplying the left-next-most integer by 2, etc.

         e.g.'s:

                 Acetone: RN= 67-64-1

         1X4 + 2X6 + 3X7 + 4X6 = 61, and 1 is the checksum digit of
RN=67-64-1.

                 Butane: RN= 106-97-8
         1X7 + 2X9 + 3X6 + 4X0 + 5X1 = 48, and 8 is the checksum digit of 
RN=106-97-8

However, other people has pointed out this algorithm to be defective: due 
to our decimal notation system, the same checksum number can be obtained 
for a transposed number.

Comments??

-= This is automatically added to each message by mailing script =-
[email-masked] -- To Everybody  | [email-masked] -- To Admins
[email-masked] -- HELP CHEMISTRY or HELP SEARCH
[email-masked] -- archive search    |    Gopher: gopher.ccl.net 70
Ftp: ftp.ccl.net  |  WWW: http://www.ccl.net/chemistry/   | Jan: [email-masked]