spring 2015 mathematics in management science check digits examples bins codabar

23
Spring 2015 Mathematics in Management Science Check Digits Examples BINs Codabar

Upload: gerard-mathews

Post on 24-Dec-2015

226 views

Category:

Documents


2 download

TRANSCRIPT

Spring 2015Mathematics in

Management Science

Check Digits

Examples

BINs

Codabar

Check Digits

Start with pre-id number. Use this to calculate check digit. Get id number.

Sender calculates (via appropriate scheme) check digit and transmits the id number.

Receiver uses check digit to detect errors (and fraud). (direct vs indirect)

BIN – aka Bank Routing Numbers

Length of ID: 8 + check digit

a1a2a3a4a5a6a7a8 c

Calculating check digit:c = 7a1+3a2+9a3+7a4+3a5+9a6+7a7+3a8 mod 10

Errors detected/not detected:All single digit errors & 87% of other errors.

A direct weighted division by 10 scheme (with wts 7, 3, 9).

Example

Find check digits for the Bank routing number 02601288c.

Weights are 73973973.

Weighted sum of all these is

6+54+3+18+56+24=161

So c =161 mod 10 =1.

The complete routing number is 026012881.

Example

Find check digits for the Bank routing number 05300021c.

Weights are 73973973.

Weighted sum of all these is

15+27+14+3=59

So c = 59 mod 10 = 9.

The complete routing number is 053000219.

Codabars: Credit Cards

Length of ID: 15 + check digit

a1a2a3a4a5a6a7a8 a9a10a11a12a13a14a15 c

Calculating check digit: Let

S = 2a1+a2+2a3+a4+2a5+a6+2a7+a8

+2a9+a10+2a11+a12+2a13+a14+2a15

Let T be number of 2-digit summands in S.

Choose c so that S + T + c ends in 0.

Errors detected/not detected:All single digit errors & 98% of other errors.

Example

Find check digits for credit card number

4719 2688 1045 710c.

Wts 2121 2121 2121 212

Wtd sum S = 8+7+2+9+4+6+16+8+2+8+5+14+1= 90. Then T = 2 , and S + T + c = 92 + c, so c = 8 .

The complete credit card number is 4719 2688 1045 7108.

Spring 2015Mathematics in

Management Science

Bar Codes

What is a bar code?

ZIP Code Bar Codes

UPC Bar Codes

AirLine Bar Codes

Bar Codes

Binary Code – system that

represents data with only two

symbols

Enables automated data collection; machine readable.Id number is changed into a bar code.Decoded using optical scanner--beam of light passes over the code

Scanner detects differences in reflection intensities (black vs. white bars).

These converted to string of 0’s&1’s that represent numbers and letters.

These strings give binary code.

Bar Code – dark bars and light

spaces that encode

characters

ZIP Codes Id nos that encode geographic data

1963

USPS numbered every post office with 5-digit ZIP code

— 0 for points far east,

— 9 for points west.

1983

USPS added four digits to get ZIP + 4 code.

ZIP + 4 Codes

Length of ID: 9 + check digit

a1a2a3a4a5a6a7a8 a9 c

Calculating check digit: Choose c so that a1+a2+a3+a4+a5+a6+a7+a8 a9+c ≡ 0 mod 10.

That is, pick c so that above sum ends in 0.

Only see c in the bar code!

Errors detected/not detected:All single digit errors; no transppositions.

Example

Find the check digit for the ZIP+4 code: 45221-0025.

4+5+2+2+1+0+0+2+5+c = 21+c

Therefore, c = 9 .

ZIP Code Bar Codes

Called Postnet code; simplest bar code.

POSTNET Bar Codes

Encodes ZIP code digits plus a check digit.

Table gives code.

Every pattern has

3 short bars

2 long bars

Check digit chosenso the sum all digitsis divisible by 10.

UPC Bar Code

UPC bar codes first used on grocery items in 1973; has since spread to most retail products.

UPC Bar

Code

Other Bar Codes

POSTNET and UPC bar codes are human-readable.

Airline bar codes and Intelligent Mail bar codes purely machine readable.

IM Bar Codes

65 bars of different length.

Each bar in one of 4 possible states:A short bar (tracker)

A medium length bar up (ascender)

A medium length bar down (descender)

A long bar (full bar).

IM Bar Codes

Coding License Numbers

Some states assign driver’s license numbers that encode personal data.

Personal data that may be encoded are name, sex, and date of birth.

Coding license numbers solely from personal data enables automobile insurers, government entities, and law enforcement agencies to determine the number from the personal data.

Social Security Numbers

No personal data encoded in SSN.

Social Security numbering scheme predates computers.

The only personal information can be deduced from SSN is where holder obtained it. The first three digits show (the state usually) where the applicant applied, with a few exceptions.