Check digits and error detection
Warm-upHumanThe first nine digits of an ISBN-10 are . What is the check digit? (If it is X, answer .)
The first nine digits of an ISBN-10 are . What is the check digit? (If it is X, answer .)
Exactly one of these is a valid ISBN-13. Which one?
Find the check digit of the ISBN-13 that begins .
What parity bit should be added to the message so that the total number of 1s is even? (Answer or .)
Which swap of two neighbouring digits can go undetected in an ISBN-13?
In the proof that ISBN-10 catches every swap of neighbours, is in position and in position . By how much does the swap change the check sum?
One digit of a valid ISBN-10 is smudged: . The smudged digit is in position . Find it. (Hint: you will need a partner modulo .)
A received ISBN-10 fails the check. Which statement is true?
In Lean, a code number is a list of digits and pre ++ x :: post is the list pre, then the digit x, then the list post. Which statement says that ISBN-10 detects every single-digit error?
Write luhn_valid(number), where number is a string of digits, returning True if it passes the Luhn test: from the right, keep the 1st, 3rd, 5th, … digits as they are; double the 2nd, 4th, … digits, subtracting when the double is more than ; the total must be a multiple of . Then check the blind spot: 1099 and 1909 differ by a swap.