Error Detection Schemes

Similar documents
MATHEMATICAL EXCURSIONS Math and Bar Codes

Identification Numbers and Check Digits 1

MII stands for major industry identifier; 4 and 5 indicate Banking and Financial. VISA cards begin with 4 and MasterCard cards with 5.

The process to convert a computer message into a bar code symbol is a fourstep

2 Advanced Scanner Configuration Guide

BARCODE PRINTING SET UP BARCODE PRINTING

Version of Barcode Toolbox adds support for Adobe Illustrator CS

The Barcode Printing option may be purchased for an additional cost. You will receive a CD that you will use to activate this feature.

BAR CODE GUIDELINES Revision 12/18/2015

Register your product and get support at DPM8500. Barcode scanner configuration guide

The ID Technology. Introduction to GS1 Barcodes

Check Digits for Detecting Recording Errors in Horticultural Research: Theory and Examples

Barcodes principle. Identification systems (IDFS) Department of Control and Telematics Faculty of Transportation Sciences, CTU in Prague

dlsoft Barcodes By dlsoft

UCC 128 Carton Label

May Prepared: Product version: Keyword: Accelio Present Central 5.4. Original value:

Barcode Definitions. Labels: Getting Started. Overview. Defining a barcode definition

Not for resale. 4.1 Divisibility of Natural Numbers 4.2 Tests for Divisibility 4.3 Greatest Common Divisors and Least Common Multiples

Laser Scanner Programming Guide (SE923 laser engine)

BAR CODE 2 OF 5 INTERLEAVED

CHAPTER I INTRODUCTION

BAR CODE CONTROL BAR CODE CONTROL - 1

ELFRING FONTS THE RETAIL BAR CODE SOLUTION

ELFRING FONTS BAR CODES EAN 8, EAN 13, & ISBN / BOOKLAND

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

COUPONS Uniform Code Council, Inc.

Understanding barcodes.

Programming Reference Guide HP USB Barcode Scanner

Item Level Marking SUMMARY OF IMPORTANT TERMS: - ITEM LEVEL BARCODES:

ELFRING FONTS UPC BAR CODES

WHITE PAPER. GS1 DataBar in the Retail World

SocketScan Software Advanced Programming Guide

Computer Peripherals

To effectively manage and control a factory, we need information. How do we collect it?

Identification of products that require activation at the Pointof-sale. The global language of business. in Europe

Drafted by the ISBN-13 Task Force of the Book Industry Study Group, Inc.

QR Codes and Other Symbols Seen in Mobile Commerce

Operating Manual BCSi-1 *

Lecture 18: Applications of Dynamic Programming Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

General Guidelines from the Uniform Code Council (UCC) and EAN International

Barcode Based Automated Parking Management System

CLASS 1 VS. CLASS 2 BAR CODE LASER SCANNERS

dlsoft Barcodes By dlsoft

All V7 registers support barcode printing, except the Sharp 410/420 1A ROM and that limitation is based upon the register.

Check Digit Schemes and Error Detecting Codes. By Breanne Oldham Union University

RSA Encryption. Tom Davis October 10, 2003

Enhanced Bar Code Engine

How to create a barcode for your cases

The Layman's Guide to ANSI, CEN, and ISO Bar Code Print Quality Documents

GS1-128 CARTON LABELING

Produce Traceability Initiative Best Practices for Formatting Hybrid Pallet Labels

BAR CODE FORMAT REQUIREMENTS Europe DVD EDS027 Issue 1 Apr 2014

2D Barcode for DNA Encoding

Want to compare barcodes side by side? Check out our Symbology Comparison Chart!

Let s talk symbology. A guide to decoding barcodes

Elfring Fonts LaserJet Bar Codes & More

Guidelines for Shipping Container Labeling

Configuring a Random Weight Bar Code

BAR CODE 39 ELFRING FONTS INC.

Bar coding getting it right. Recommendations for best practice by GS1 UK. Version 7

Handout #1: Mathematical Reasoning

Ian Hawdon Physics Page 1 of 20 Barcodes

HHSL Barcode Guidelines Version September 2, 2014 HHSL Barcode Guidelines Version September 2, 2014 Page #1 of 14

Layman's Guide to ANSI X3.182

WORKING TOGETHER FOR SUCCESS

8 Primes and Modular Arithmetic

(888) CALL TOLL FREE. We offer Printed Barcode Labels for your Barcode Numbers. New Orders. Repeat orders HOW TO ORDER BARCODE LABELS

MetroSelect Programming Guide. MLPN 2407/December 1998

APPENDIX E COMMAND BARCODES

Produce Traceability Initiative Best Practices for Formatting Hybrid Pallet Labels

1 Introduction. 1.1 Overview of barcode technology Definition of barcode

NMMA I2of5 CARTON LABEL SPECIFICATIONS November 2006

Packaging Identification Standard

Retail Bar Coding Basics a Tutorial

Barcode Scanning Made Easy. Programming Guide

Math 319 Problem Set #3 Solution 21 February 2002

MH10 Shipping Label. Contents

Ten steps to GS1 barcode implementation. User Manual

10.1 FUNCTIONS OF INPUT AND OUTPUT DEVICES

Midterm Practice Problems

Each book must have a unique ISBN and EAN, price-point, or UPC barcode.

T GG GG P IT RO Q U Q I C I K K S T S A A T R T G U D

3.1. RATIONAL EXPRESSIONS

RECOMMENDED PRACTICE 1600u CARGO POUCH LABEL (NEW)

Contents. Bar code data transmission specifications...b-1. A October 1997 i

5.3 The Cross Product in R 3

2D BARCODE STANDARD FOR LENSES (OPTICAL PRODUCT CODE/ COUNTRY OF ORIGIN)

Technical guide 1. june 2011

GS1 bar code validation and verification

LEAR Corporation Sweden. Odette Transport Label Guideline Vers. 1 Rev. 4

OmniPage Capture SDK s enhanced barcode recognition capabilities.

User Guide Computalabel International Ltd

FAREY FRACTION BASED VECTOR PROCESSING FOR SECURE DATA TRANSMISSION

Frequently Asked Questions

Sumitomo Electric Wiring Systems, Inc. Part Identification and Labeling Requirements

CHAPTER 8 BAR CODE CONTROL

Automated Inventory System. Barcode User Guide

A whitepaper on: Invisible and Fluorescing Bar Code Printing and Reading

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

PayScan Bill Payment Retailer Software Architecture & Design

Transcription:

Error Detection Schemes

PostNET The scheme used by the US Postal Service to encode zip codes in machine readable form is called PostNET. To encode a 5-digit zip code, 32 (long and short) bars are used. The first and last bars are always long and are not part of the code. The remaining 30 are divided into 6 groups of 5 bars, each group representing a digit from 0-9. (9-digit zip codes use 52 bars) 1 ı ı ı 4 ı ı ı 7 ı ı ı 0 ı ı ı 2 ı ı ı 5 ı ı ı 8 ı ı ı 3 ı ı ı 6 ı ı ı 9 ı ı ı Example above is : 56458-2

PostNET Notice that a 6 th digit has been added to the zip code. This last digit is calculated from the others and is called a check sum digit. It is the number needed to make the sum of all the digits a multiple of 10 ( 0 mod 10). So, in our example 5 + 6 + 4 + 5 + 8 = 28 and we need a 2 to get to 30, so 2 is the check sum digit. The purpose of the check sum digit is to detect errors in reading the code. So, for instance, if the 4 in the zip code was misread as a 6, then the sum of the digits would be 32, not divisible by 10, and so the postal service's scanner would detect an error and reread the code.

PostNET If only one digit is in error (including the check sum digit) this code will always detect it, since the error can be no larger than 9. However, the scheme is defeated by any collection of errors which add up to a multiple of 10. The association of digits to groups of 5 bars is called a 2 out of 5 code (each group of 5 bars has 2 long bars), a very common coding scheme used when there are only 10 symbols which need to be coded. 2 out of 5 codes were used very heavily in the early days of computers.

PostNET ZIP (Zone Improvement Plan) codes were introduced by the U.S. Postal Service in 1963. In 1983, the Postal service added four more digits to the code and called the result a ZIP + 4 code. Recently (probably 2003), two more digits were added to create the Delivery Point Code. All of these codes use the same error detecting scheme check digit as the basic ZIP code. PostNET (POSTal Numeric Encoding Technique) is the bar code scheme used to encode the ZIP code (or any of its derivatives).

ISBN's The publishing industry uses the International Standard Book Number (ISBN) to identify books. The ISBN for our text is ISBN 0 471 19047 0 This is a 10 digit number where the first group identifies the language/country/region in which the book was published, the second group identifies the publisher, the third group identifies the book and the last digit is a check sum digit. In this case the check sum digit is calculated so that 10a 1 + 9a 2 + 8a 3 +... + 2a 9 + a 10 0 mod 11, where the ISBN is a 1 a 2 a 3...a 9 a 10. In the case where a 10 = 10, an X is used as the check sum digit.

ISBN's So, for our example, 10(0) + 9(4) + 8(7) + 7(1) + 6(1) + 5(9) + 4(0) + 3(4) + 2(7) = 176 = 16(11) 0 mod 11 and the check sum digit is 0. As with the PostNET code, any single digit error will be detected because the error (no greater than 9) times a coefficient (no greater than 10) can not be a multiple of 11 (since 11 is prime). Also, some pairs of errors will be undetected. This code however can detect a common type of human error that the PostNET code can not, namely a transposition error interchanging two digits. In the PostNET code, this type of error does not change the check sum calculation.

ISBN's Suppose that in the ISBN code, the digits a i and a j are interchanged. In the check sum calculation, the terms (11-i)a i and (11-j)a j of the correct ISBN are replaced by (11-i)a j and (11-j)a i. Thus, the difference in the two calculations is: (11-i)a i + (11-j)a j (11-i)aj (11-j)a i = (11-i)(a i -a j ) + (11-j)(a j -a i ) = (11 - i 11+ j)(a i -a j ) = (j-i)(a i a j ). Since i j and a i a j (if they are equal there is no change in the ISBN) and both factors are less than 10, this product can not be a multiple of 11. The (not necessarily adjacent) transposition error will therefore be detected.

UPC The Universal Product Code (UPC) is widely used by supermarkets and mass market retailers for cash register checkout. The UPC (actually, UPC-A as there is a compressed version called UPC-E) is a 12 digit code. The first digit indicates the character set, the next five identify the manufacturer, the following 5 identify the product and the last digit is a check sum digit. The bar code is divided into a left and right side by long thin bar pairs at the beginning, end and middle.

UPC The digits are represented by patterns, of width 7, made up of four variable width spaces and bars. Digits on the left side are of the form space-bar-space-bar and those on the right side are of the form bar-space-bar-space. The bars and spaces are between 1 and 4 units wide. The patterns on the right are the black/white (bar/space) reversals of those on the left.

UPC The reversal of the code on the right permits scanning in both directions. For instance, the digit 1 on the left is 0011001 but on the right it would be 1100110 and if this is read from the right we obtain the scan code 0110011 which does not coincide with any of the left codes so it can be assigned to the digit 1 (from the right.) The check sum digit for the UPC is calculated by: 3a 1 + a 2 + 3a 3 + a 4 + 3a 5 +... + 3a 11 + a 12 0 mod 10 where a 1 a 2 a 3...a 11 a 12 is the UPC. With this calculation all single digit errors are detected, and most but not all adjacent transposition errors are detected.

UPC If the digits a i and a i+1 are interchanged then the check sum would change by either: 3a i + a i+1 3a i+1 a i = 2(a i a i+1 ) or a i + 3a i+1 a i+1 3a i = 2(a i+1 a i ). Thus, if a i a i+1 = 5, the change would be ±10 and so, the error would not be detected.

BookLand (ISBN) Bar Code The industry standard bar code used to encode the ISBN of a book is EAN-13 (European Article Numbering system), the European version of UPC-A. This system encodes 13 digit numbers, with the last digit being a check sum digit. (Bar codes for non-trade paperbacks do not encode the ISBN and just use a standard UPC). A BookLand code starts with 978 followed by the first nine digits of the ISBN and the 13 th digit is a check sum calculated by: a 1 + 3a 2 + a 3 + 3a 4 + a 5 +... + a 11 + 3a 12 + a 13 0 mod 10.

BookLand (ISBN) Bar Code The BookLand code has the same error detecting (and nondetecting) capabilities as the UPC-A code. It is interesting to note that because the check digit of the ISBN is not encoded by BookLand, this bar code loses the capability of detecting all transposition errors which the ISBN had. Thus, in order to gain optical scanner capability, a fairly good error detecting code was replaced by a mediocre one. By Jan. 1, 2007, all 10-digit ISBN's will be replaced by the 13-digit BookLand code. When all the 10-digit numbers are used, a new prefix (979) will be started.

Bank Check Code On the bottom left of your personal checks there appears a nine digit Bank Identification Number (between the two : symbols). The 9 th digit of this code is a check sum digit computed by: 7a 1 + 3a 2 + 9a 3 + 7a 4 + 3a 5 + 9a 6 + 7a 7 + 3a 8 + 9a 9 0 mod 10.

Bank Check Code This code detects all single digit errors and transposition errors of the forms...ac......ca... and...abc......cba... provided that a c 5. The UPC and EAN codes can not detect this second type of transposition error.

Check Sum Schemes All of the schemes we have looked at have the same basic form. The coded number will be considered as a vector of length k, i.e., (a 1,a 2,...,a k ), and there is a weighting vector also of length k, (w 1,w 2,...,w k ) so that the k th component of the code is calculated so that the standard dot product of the two vectors, (a 1,a 2,...,a k ) (w 1,w 2,...,w k ) = a 1 w 1 +a 2 w 2 +...+a k w k 0 mod n for some integer n, greater than any possible a i. PostNET : k = 6, 10 or 12, n = 10 and (w 1,w 2,...,w k ) = (1,1,...,1) ISBN : k = 10, n = 11 and (w 1,w 2,...,w k ) = (10,9,8,...,2,1) UPC-A : k = 12, n = 10 and (w 1,w 2,...,w k ) = (3,1,3,1,...,3,1) BookLand: k = 13, n = 10 and (w 1,w 2,...,w k ) = (1,3,1,3,...,3,1) Bank : k = 9, n = 10 and (w 1,w 2,...,w k ) = (7,3,9,7,3,9,7,3,9)

Check Sum Schemes We can make some general statements about schemes of this type. Proposition 1: The scheme can detect a single error occurring in position i if and only if w i is relatively prime to n. Pf: Suppose that the error in position i is x. That is, instead of the digit a i, we see the digit a i + x. We have that 0 < x < n. The new check sum differs from the original check sum by xw i. This error is undetected iff xw i 0 mod n. With w i relatively prime to n, this is equivalent to x 0 mod n, which is impossible.

Check Sum Schemes Proposition 2: The scheme can detect a transposition error in positions i and j if and only if w i w j is relatively prime to n. Pf: Suppose that the digits a i and a j are transposed. The change in the check sum calculation is: a i w i + a j w j a i w j a j w i = a i (w i -w j ) a j (w i w j ) = (a i -a j )(w i w j ). This transposition is undetected iff a i a j w i w j 0 mod n. With w i w j relatively prime to n, this is equivalent to a i a j 0 mod n. But this is impossible unless a i = a j and in that situation no transposition error has occurred.