Re: ISBN & undecimal counting
- From: grabiner@xxxxxxxxxxxxxxxxxxxx (David J. Grabiner)
- Date: 03 Nov 2005 22:20:38 -0500
msb@xxxxxxx (Mark Brader) writes:
> ObPuzzle: the fact that algorithms such as these are used suggests
> strongly that a check-digit algorithm where
>
> * each digit is replaced with a certain digit, depending on
> its position and original value and nothing else
> * these digits are added mod 10 to produce a checksum
>
> with the properties that
>
> * if any one digit is changed, the checksum changes
> * if any two adjacent digits are transposed, the checksum changes.
>
> is impossible. Can you prove that it's impossible?
Let f_i(x) be the value assigned if x is in position i. A sum is valid
if f_1(x)+f_2(x)+...+f_n(x)=0 mod 10.
The two conditions are now:
f_i(x) is a permutation of 0-9
and
f_i(x)+f_{i+1}(y)=f_i(y)+f_{i+1}(x) mod 10 only when x=y
or equivalently:
f_i(x)-f_{i+1}(x)=f_i(y)-f_{i+1}(y) mod 10 only when x=y
Thus the ten values f_i(0)-f_{i+1}(0),...,f_i(9)-f_{i+1}(9) must all be
different mod 10, covering all values from 0 to 9. Their sum is thus 5
modulo 10.
However, [f_i(0)+...+f_i(9)]-[f_{i+1}(0)+...+f_{i+1}(9)] = 0, so the ten
values actually sum to 0 modulo 10.
Note that this proof depends on 0+1+...+9 not being a multiple of 10;
this result does not hold in an odd-numbered base, which makes the ISBN
code possible modulo 11.
--
David Grabiner, grabiner@xxxxxxxxxxxxxxxxxxxx, http://remarque.org/~grabiner
Baseball labor negotiations FAQ: http://remarque.org/~grabiner/laborfaq.html
Shop at the Mobius Strip Mall: Always on the same side of the street!
Klein Glassworks, Torus Coffee and Donuts, Projective Airlines, etc.
.
- References:
- ISBN & undecimal counting
- From: Ramkumar
- Re: ISBN & undecimal counting
- From: Mark Brader
- Re: ISBN & undecimal counting
- From: Mark Brader
- ISBN & undecimal counting
- Prev by Date: Can anyone identify this puzzle
- Next by Date: Re: ISBN & undecimal counting
- Previous by thread: Re: ISBN & undecimal counting
- Next by thread: "Ultimate" Sudoku Challenge
- Index(es):
Relevant Pages
|
Loading