How does the Luhn algorithm work and why does it catch about one digit in ten errors?
The algorithm is a simple "mod 10" checksum that validates identification numbers by doubling every second digit from the right, summing digit-values (subtracting 9 for doubled digits >9), and checkin...