## Wednesday, October 5, 2016

### The Math Behind QR codes

I've noted that bar codes in the form of QR codes are invading our lives.  You see them in magazines, at the airport, on business cards, even at the airport.  I use them in my classroom when I want students to go to a specific web site so they don't waste hours trying to type in the correct URL.

Did you ever wonder how the information is stored in a QR code?  How do you read it? The Irish Times has a nice short article on bar codes and qr codes which is a great introduction to the topic.  They provide a bit of history on both topics including the original uses of both.

QR stands for quick response and can store way more data than a standard bar code.  In addition, it stores a wider variety of data than bar codes.  It states we can accept the accuracy of the reading of qr codes because when the material is coded it is coded using the Reed-Solomon error-correcting algorithm which is a sophisticated mathematical technique.

Check out  M.E.I. who are innovators in mathematical education out of the UK have a great explanation on pg 3 of their monthly newsletter from 2012.  There is a picture with spots of color and a key to see what information is stored where.  In addition, page 4 suggests ways to use QR codes in the classroom.

You can find additional information on structure, history, types of data encoded in QR's etc at this website.  This site does not really go into the math itself but gives a good overview with specific information on assorted facets of QR codes.

Since the Reed-Solomon error - correction algorithm is the math actually involved in creating accurate QR codes, lets look at it.  This site provides a nice introduction to the way it works but the concept is actually much more advanced than most of us teach in high school.

It turns out this particular concept is used with all sorts of storage devices such as DVD's, CD's, bar codes, etc, wireless devices such as cell phones, microwave links, Satellites, digital television and high speed modems.  In other words it has far reaching uses.

I found one activity that can be done by high school students which shows the basics of how the error correction works.  It is actually advertised as a magic trick but is still designed to teach error correction.  The seven page activity sets up code words and shows how the Reed - Solomon error correction applies to the situation.  The last incorporates math and show how the algorithm takes the information and uses it.

Any other materials I found, require more math than most of my students will ever have.  I want to teach my students about bar codes and qr codes near the end of the year when they start having summer fever.  Let me know what you think!