Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Math & English enrichment at SchoolPlus-Online
HoodaMath: games and movies
Sites for teachers
Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help

III Millennium Olympiad

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Games to relax

Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Universal Product Code

The barcodes are ubiquitous. According the readily available statistics, about half of the United States population were born after the barcodes have been introduced in 1973.

The original and primary barcode used in the USA is a machine readable representation of the UPC which stands for the Universal Product Code. The UPC and the barcodes were designed for the grocery industry. Because of the large number of items normally "checked-out" at the grocery store, the cashier errors in identifying the products were frequent, caused check-out delays and affected the industry's bottom line. The barcode was a response to the need to automate the check-out process. It was invented by George J. Laurer, an IBM employee, and adopted by the grocery industry on April 3, 1973.

The original UPC code is also known as UPC-A or UCC-12, the latter to indicate its 12-digit size. (UCC is an abbreviation for the Uniform Code Council, a not-for-profit organization responsible in part for the issuance of the UPC codes.)

The twelve UPC-A digits are comprised of three groups: a 6-digit company prefix (assigned by by the UCC to a specific manufacturer), a 5-digit product code (assigned by a responsible person within the company), and 1 check digit (calculated according to an algorithm discussed next).

Assume the 12 digits are d1, d2, d3, ..., d11, d12. In a valid UPC barcode, d12 is so selected as to make the following identity true:

(1) 3×d1 + d2 + 3×d3 + d4 + ... + 3×d11 + d12 = 0 (mod 10).

To put it differently, let Sodd and Seven be the sums of the digits in the odd and even positions, starting with 1. Then, for a valid UPC-12 code

(1') 3×Sodd + Seven = 0 (mod 10).

As the common symbolism suggests, the sum in (1) equals 0 modulo 10. In other words, it is divisible by 10.

In the applet below, the first 11 digits of the code are clickable and hence are modifiable. The last digit is determined automatically, according to (1). (The fact that UPC-A is based on (1) serves as the basis to a computer magic trick.)


This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet
What if applet does not run?

It can't be overemphasized that the UPC-A code is a 12 digit string (often said to be a number) that on retail products accompanies its own barcode representation. But there are other encodings based or extending UPC (e.g., EAN-13) that have machine readable barcode representation.

The actual process of conversion of an UPC-A string into a barcode is explained elsewhere.

References

  1. E. B. Burger, M. Starbird, The Heart of Mathematics, Key College Publishing, 2000, pp. 89-90

Copyright © 1996-2009 Alexander Bogomolny

33061099Page copy protected against web site content infringement by Copyscape


Search:
Keywords:

Google
Web CTK