Had you involve G H Hardy – the Cambridge student responsible for uncounted seminal numerical results and developments of the other 20th century – what his favorite area of maths was , he ’d answer without hesitation : number theory .

It is , he wroteinA Mathematician ’s Apology , “ one of the most plain useless branches ” of math , and so those who canvas it “ may be justified in rejoice that [ its ] very remoteness from ordinary human activities should keep it soft and clean . ”

Well , no discourtesy to Hardy , but he could n’t be more wrong about that . Since his demise in 1947 , the humanity has seen the rise of public - tonality encryption schemes such as RSA ; data processor systems to render random ( or at least , pseudorandom ) numbers racket ; unnumbered computer algorithms forerror correction and look-alike generation and storage ; cellular communication meshing , optimized with techniquesbased on the theory of modular phase – the inclination goes on , and on , and on .

But there ’s one much more lowly applications programme of number theory that you might not have hear of – though it ’s arguably far more important than , say , your jail cell signal . And if you desire to see it for yourself , you need only see as far as your local supermarket .

What are check digits?

reckon you ’re a bartender in Florida , and a Kyd who look just honest-to-god enough to vote hand you his driver ’s license and asks for an old forge . untrusting , you discipline the details on the wit : you see a natal day of January 24 , and a license number end 162 .

You turn him down with a scoffing . “ courteous try , kid , ” you say , “ but this ID is fake . Try the bar down the route ; their servers have n’t hear of chip digits . ”

How did you know the kid was lie ? Well , according to the Cornell Math Explorers ’ Club , states like Illinois and Florida have exceptional rules about how they create driver ’s license numbers . They take into history your name , sexual practice , and date of birth – and they add a handicap dactyl at the end .

But what does that imply ? Well , a check digit is pretty much what it voice like : it ’s a digit ( or figure ) that provides a way to check into the bit before it . It ’s kind of a security feature , but not one that ’s of vital grandness – rather than protect against indistinguishability thievery or something , it ’s more there to make certain you do n’t circumstantially switch two number around , or misread a scuff - down 8 as a 3 , for example .

So , for your Floridian driver ’s permit , the issuers “ use additive functions to encode the month and date of birth into a three - finger identification number that is made into the last three figure of the number one wood ’s license number , ” the Explorers ’ Club explains . “ For males in Florida the last three digits are give by 40(m – 1 ) + b , wheremis the month andbis the engagement of birth [ … ] For a female they then total 500 to this act . ”

A young homo born on January 24 , therefore , would have a permit end in 024 – that ’s 40 × ( 1 – 1 ) + 24 . The licence you were give in our hypothetical , ending 162 ? That would belong to to someone endure on May 2 . It ’s a sham .

Where do we find check digits?

We live in an age ruled by figure , and as such , suss out digits have ( ironically ) innumerable economic consumption . Books , for case , are universally identified by unique International Standard Book Numbers ( ISBNs ) . These can be 10 or 13 digits long , depending on the age of the volume , and the very last one of those is a check digit .

Unfortunately , chance that dactyl is a lot more complicated than the Florida machine driver ’s license example . “ Each of the first 12 digits of the ISBN is alternately multiplied by 1 and 3 , ” explains theISBN Users ’ Manual ; “ The check digit is adequate to 10 minus the remnant result from dividing the amount of money of the weighted product of the first 12 digits by 10 with one exception . If this computation results in an apparent curb finger of 10 , the check digit is 0 . ”

Other products do n’t have ISBNs , but theydohave oecumenical merchandise codes ( UPCs ) , or to put it another agency : those foresightful strings of numbers you ’ve seen underneath barcodes . Contained within those seemingly random codes are – you guessed it – check digits : “ find an target with a 13 - digit barcode . ( If you are in the US , a 12 - figure barcode will also work , if you imagine an special 0 on the front of it ) , ” writes Katie Steckles inNew Scientistthis month ; “ Add together the first , third , and 5th figure and so on , to get the sum of the odd - enumerate finger’s breadth ; then , supply up the even digits . If you triple the even sum , and then add it to the original peculiar amount of money , the sum should be a multiple of 10 , ending in 0 . ”

Credit cards have check dactyl , “ meaning a website can tell you have enrol it incorrectly before even checking with your banking concern , ” Steckles explain ; if you ’re in the UK , the last constituent in your 10 - digit NHS number is a check digit – to find it , just take the first nine finger ; multiply the first by 10 , the second by 9 , the third by 8 , and so on , and then add the results together . Divide the total by 11 , and the remnant is your handicap digit ( so , for example , an NHS number pop out 555555555 would have to end in a 6 – because 50 + 45 + 40 + 35 + 30 + 25 + 20 + 15 + 10 = 270 = 24 × 11 + 6 . )

Not foolproof – but useful

Check digits are n’t infallible – some algorithms ca n’t tellthe difference betweensequences like 1 and 00001 , for exemplar ; others will catch incorrect digits , butmiss swop pairs . Even if the algorithm wreak perfectly , it might still fluke out and get the reply wrong – reckon , for exercise , the barcode check digit algorithm : you ’re working modulo 10 , so there ’s a one - in - ten chance it just works anyway .

But overall , check digits are a lowly slicker with a big payoff . They can save you hours of thwarting wondering why your credit card details are n’t accepted , or give a quick elbow room to check whether your machine is sport stolen VINs ; they can provide an extraordinarily nerdy political party magic trick , or ruin a supposititious Floridian teen ’s nighttime .

And , much to Hardy ’s chagrin , it ’s all thanks to numeral possibility . Long experience thequeen of mathematics .