Puzzle #1: International Standard Book Numbers

Some identifiers (product codes, Social Insurance Number, and on and on) have validation to detect whether a given identifier is potentially valid; some do not. The most common error in data entry is transposing two adjacent characters, and some identifiers’ validation can detect this.

Does the ten-digit ISBN (International Standard Book Number) have this type of validation?

The validation for an ISBN is as follows: Ignore the hyphens. The ten digits are from 0 to 9 except that the last digit can also be “X” for 10. Multiply the first (from the left) digit by 10, the second digit by 9, the third digit by 8, and so on to the tenth digit by 1. Add these ten products. If the result is divisible by 11, the identifier is a potentially valid ISBN—but could be unassigned—otherwise, it is not a valid ISBN.

Example: My hardcover copy of The C Programming Language / Second Edition by Brian W. Kernighan and Dennis M. Ritchie has the ISBN of 0-13-110362-8 according to the title page. 0 × 10 + 1 × 9 + 3 × 8 + 1 × 7 + 1 × 6 + 0 × 5 + 3 × 4 + 7 × 3 + 0 × 2 + 9 × 1 = 88. Since 88 is divisible by 11, this is a valid ISBN. My copy is worn, and reading the ISBN on the back cover, I could not tell what the last digit was. I thought it was a 7. Error caught!

Submit your answer to Gene Wirchenko <genew@telus.net>. Your answer should be in the form of a proof. That means to show how your answer must be correct. The deadline is Wednesday, June 12, 2013 at noon Pacific Time. I will post the answer shortly after.

2 thoughts on “Puzzle #1: International Standard Book Numbers

  1. nct2

    You have a hard-cover copy of Kernighan and Ritchie? Wow. I’ve only ever seen paper-back. Bit of trivia; one of my CS professors worked with Dennis Ritchie at Bell Labs.

    1. Gene Wirchenko Post author

      I bought it about twenty years ago. I had to order it special at the bookstore, but it was not a big deal.

Comments are closed.