Error detecting and error correcting codes: the new mathematics of shopping

Kaye Stacey

University of Melbourne

 

When I was a child there were no supermarkets and no cash registers in our town.  When we went shopping, the shop-keeper got what we asked for from the shelves behind the counter.  He wrote down the prices of the things we bought with a pencil, kept behind his ear, and then added them up on paper.  Some of the prices had to be worked out first too, like one and a half pounds of apples at so much per pound.  We had to be careful that we weren’t overcharged, so we checked by adding up the prices as well as we could mentally.  When the shop got a cash register, the adding up didn’t seem so important, but we still needed to be careful that the right prices were put in and that we were being given the right change. Arithmetic and shopping were clearly linked.

 

Nowadays, there is little reason to associate routine shopping with arithmetic. The bill is added up automatically and the amount of change appears on the screen. Sometimes, you  need to estimate how much something will cost, perhaps if you don’t have quite enough money for what you want to buy - but usually asking for a subtotal solves the problem.

 

Most people would probably agree that routine shopping does not now require many calculations for most people.  It once was an activity where many people used or saw being used both simple and complicated arithmetic (try finding the price of one and three quarter yards of material at twelve shillings and six pence per yard).  Today, it is not. However, the surprising fact is that there are many more calculations going on in a supermarket today than ever before. Mathematics has gone underground, invisible, embedded into the machines – the cash registers, the EFTPOS links and the many other components of the supermarkets computer systems.

 

The obvious arithmetic in the supermarket is still in adding up the prices although even the cash register now clearly does a lot more: telling how much change to give, perhaps calculating a discount, working out the number of customer loyalty scheme points, etc. Even so, most of the calculations being done are not happening there.  In this article, I will outline one way in which important but hidden calculations are being done for the communications in commerce. Two key concepts will be explained – error detecting codes and error correcting codes - and illustrated with two familiar examples – barcodes and ISBN numbers.