Question 16.87

image 57. Consider a UPC number in which the digits 7 and 2 appear consecutively (i.e., the number has the form ). Will the error caused by transposing these digits (i.e., the number is taken as ) be detected? What if the digits 6 and 2 were transposed instead? State the general criterion for the detection of an error of the form by the UPC scheme.

57.

The combination 72 contributes or (depending on the location of the combination) toward the total sum, while the combination 27 contributes or . So, the total sum resulting from the number with the transposition is still divisible by 10. Therefore, the error is not detected. Similarly, the combination 26 contributes toward the total sum, whereas the combination 62 contributes toward the total sum; so the new sum will not be divisible by 10. Similarly, when the combination 26 contributes to the total, the combination 62 contributes to the total. So, the total for the number resulting from the transposition will not be divisible by 10 and the error is detected. In general, an error that occurs by transposing to is undetected if and only if

is 5 or −5.