TEST #5 ANSWERS

UPC Number Check Digit Formula:  The last digit, a0, of a 12-digit UPC number  a11a10a9a8a7a6a5a4a3a2a1ais a check digit given by the formula a0 =-(3a11 + a10 + 3a9 + a8 + 3a7 + a6 + 3a5 + a4 + 3a3 + a2 + 3a1) mod 10

ISBN Check Digit Formula:  The last digit, a0, of a 10-digit ISBN number a9a8a7a6a5a4a3a2a1ais given by the formula

a0 = (a9 +2a8 + 3a7 + 4a6 + 5a5 + 6a4 + 7a3 + 8a2 + 9a1) mod 11

Bank Identification Number Check Digit Formula:  The last digit, a0, of a nine-digit   bank identification number a8a7a6a5a4a3a2a1a0 is given by the formula a0 = (7a8 + 3a7 + 9a6 + 7a5 + 3a4 + 9a3 + 7a2 + 3a1) mod 10

1.  Suppose that the bank identification number on a check is 100646023.  Can this be a valid check from a U.S. bank?  Explain.

The main part of the number is 10064602.  The check digit would be
a0 = (7 × 1 + 3 × 0 + 9 × 0 + 7 × 6 + 3 × 4 + 9 × 6 + 7 × 0 + 3 × 2) mod 10 = 92 mod 10 = 2
Since the check digit is given as 3, the number is not valid.

2.  The UPC number on a box of crackers has the main part 7 55355 00514.  What is the check digit?

a0 = -(3 × 7 + 1 × 5 + 3 ×  5 + 1 × 3 + 3 × 5 + 1 × 5 + 3 × 0 + 1× 0 + 3 × 5 + 1 × 1 + 3 × 4) mod 10
        = -(21 + 5 + 15 + 3 + 15 + 5 + 15 + 1 + 12) mod 10 = -(92) mod 10 = 8

3.  The UPC number on a box of Scotties tissues is 0 634#5 41201 5, where the # represents an obscured digit?  What is the obscured digit?

5 = -(3 × 0 + 1 × 6 + 3 × 3 + 1 × 4 + 3# + 1 × 5 + 3 × 4 + 1 × 1 + 3 × 2 + 1 × 0 + 3 × 1) mod 10
        = -(6 + 9 + 4 + 3# + 5 + 12 + 1 + 6 + 3) mod 10 = -(46 + 3#) mod 10 = -(6 + 3#) mod 10
Solve 5 = -(6 + 3#) mod 10
-(6 + 3#) = -15    or    6 + 3# = 15    or    3# = 9
answer:  3

4.  The main part of the ISBN number for a College Algebra Digit Video Tutor is 0-321-08161.What is the check digit?

a0 = (1 × 0 + 2 × 3 + 3 × 2 + 4 × 1 + 5 × 0 + 6 × 8 + 7 × 1 + 8 × 6 + 9 × 1) mod 11 = (6 + 6 + 4 + 48 + 7 + 48 + 9) mod 11 = 128 mod 11 = 7

Some identification numbers, such as automobile VIN numbers, use both digits and the 26 upper case letters A through Z.  In a Code 39 system, the number has 15 characters  14a13a12a11a10a9a8a7a6a5a4a3a2a1a0;  the main part of the number has 14 characters and the 15th character, a0, is a check character.  Any character that is a letter is converted to a number where A = 10, B = 11, C = 12, …,

Z = 35.The check character is given by
a0 = -(15a14 + 14a13 + 13a12 + 12a11 + 11a10 + 10a9 + 9a8 + 8a7 + 7a6 + 6a5 + 5a4 + 4a3 + 3a2 + 2a1) mod 36
If a0 is between 10 and 35, it is converted to the equivalent letter.

5.  If the main part of a Code 39 identification number is 34T1CR9244YD3W, what is the check character?

One way to organize all of this would be in a table.
 
Character
3
4
T
1
C
R
9
2
4
4
Y
D
3
W
Numerical Value
3
4
29
1
12
27
9
2
4
4
34
13
3
32
Multiplier
15
14
13
12
11
10
9
8
7
6
5
4
3
2
Product
45
56
377
12
132
270
81
16
28
24
170
52
9
69
The check digit numerical equivalent is the negative of the sum of the bottom row.
a0 =  -1336 mod 36 = 32
Answer:  W

6.  Using our round-robin scheduling method of filling in the chart, schedule a tournament for 10 teams.  Use the given grid.  If there are extra rounds, scratch them out.

Rounds 10, 11, 12, and 13 are unneeded.  Start by filling in row 1 with 2 through 10.  Then place a 1 in Team 2, Round 1;  fill in 1’s diagonally.Start at each 1 and move 2, 3, …, except replace the number of the in that row with a 10.  Fill in the last row to complete each round.
 
Round
  1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  11
  12
  13
Team 1
2
3
4
5
6
7
8
9
10
x
x
x
x
Team 2
1
10
3
4
5
6
7
8
9
x
x
x
x
Team 3
9
1
2
10
4
5
6
7
8
x
x
x
x
Team 4
8
9
1
2
3
10
5
6
7
x
x
x
x
Team 5
7
8
9
1
2
3
4
10
6
x
x
x
x
Team 6
10
7
8
9
1
2
3
4
5
x
x
x
x
Team 7
5
6
10
8
9
1
2
3
4
x
x
x
x
Team 8
4
5
6
7
8
10
1
2
3
x
x
x
x
Team 9
3
4
5
6
7
8
10
1
2
x
x
x
x
Team 10
6
2
7
3
8
4
9
5
1
x
x
x
x
A round-robin tournament can be scheduled as follows:  Let N be odd.  In round r, assign Tm,r to play team m where
Tm,r = (r – m) mod N
unless Tm,r = m, in which case team m is assigned a bye.

7.  Use the above method to determine the schedule for Round 3 in a 9-team tournament.  Note: the alignment of the table has been “reversed.” 

 
Team
  1
  2
  3
  4
  5
  6
  7
  8
9
Round 3
2
1
3
8
7
Bye
5
4
9
r = 3, N = 9
m = 1    Team 1 plays T1,3 = (3 – 1) mod 9 = 2
m = 3    Team 3 plays T3,3 = (3 – 3) mod 9 = 0 or team 9
m = 4    Team 4 plays T4,3 = (3 – 4) mod 9 = -1 mod 9 = 8
m = 5    Team 5 plays T5,3 = (5 – 3) mod 9 = -2 mod 9 = 7
So Team 6 has a bye.
   
Numerical Equivalents of Letters
A
B
C
D
E
F
G
H
I
J
K
L
M
0
1
2
3
4
5
6
7
8
9
10
11
12
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
13
14
15
16
17
18
19
20
21
22
23
24
25
Inverses mod 26 where a’ is the inverse of a. (To be used to decode a cipher).  That is, if C = (aP + b) mod 26, then P = (a’(C – b) mod 26. 
a
 1
 3
5
7
9
11
15
17
19
21
23
25
a’ mod 26
1
9
21
15
3
19
7
23
11
5
17
25

8.  Encode the message MATH IS FUN by breaking it into five-letter blocks and using the affine cipher C = (9P + 10) mod 26. 

Letter
M
A
T
H
I
S
F
U
N
P
12
0
19
7
8
18
5
20
13
Raw number
118
10
181
73
82
172
55
190
127
C (mod 26)
14
10
25
21
4
16
3
8
23
Cipher letter
O
K
Z
V
E
Q
D
I
X
Answer:  OKZVE QDIX

9.  A message was encoded to KADHD HRFHZ using the affine cipher C = (3P + 5) mod 26.  Decode the message.

Since the cipher was C = (3P + 5) mod 26, the formula for deciphering is P = [9(C – 5)] mod 26
 
Cipher letter
K
A
D
H
D
H
R
F
H
Z
Number
10
0
3
7
3
7
17
5
7
25
Raw score
45
-45
18
18
-18
18
108
0
18
180
P mod 26
19
7
8
18
8
18
7
0
18
24
Letter
T
H
I
S
I
S
E
A
S
Y
Answer:  THIS IS EASY