School of Mathematics and Statistics
Junior
The University of Sydney
spcr

Quiz 4: Code Vectors and Modular Arithmetic

Last unanswered question  Question  Next unanswered question
 

Question 1

 
 
What is 5 × 3 - 4 × 2 in 6? (Hint: recall that the elements of 6 are {0, 1, 2, 3, 4, 5}. )
a) 0   b) 1
c) 2   d) 3
e) 4   f) 5

 

Not correct. Choice (a) is false.
Your answer is correct.
5 × 3 - 4 × 2 = 15 - 8 = 7 = 6 + 1, and so the answer in 6 is 1.
Not correct. Choice (c) is false.
Not correct. Choice (d) is false.
Not correct. Choice (e) is false.
Not correct. Choice (f) is false.
 

Question 2

 
 
Find ((9 × 2) + 5)(3 + 8 + 4)(1 + (6 × 7)) in 10. Enter your answer into the answer box.

 

Your answer is correct
We have ((9 × 2) + 5)(3 + 8 + 4)(1 + (6 × 7)) = 23 × 15 × 43 = 3 × 5 × 3 = 5 in 10.
Not correct. You may try again.
Remember that all computations in in 10 should be reduced by subtracting multiples of 10 so that the answer lies from 0 to 9 (inclusive).
 

Question 3

 
 
Find the dot product [1,3,2] [4,5,1] in 53.

 

Your answer is correct
[1,3,2] [4,5,1] = 4 + 15 + 2 = 21 = 1 in 5.
Not correct. You may try again.
Remember that the dot product is calculated in the usual way and the answer is then reduced so it is one of the elements of 5.
 

Question 4

 
 
How many solutions are there in 6 of the equation 2x = 0?
a) None   b) One
c) Two   d) Three
e) More than three

 

Not correct. Choice (a) is false.
Remember that 6 contains the elements {0, 1, 2, 3, 4, 5}. You can use trial and error to find all elements that satisfy the given equation.
Not correct. Choice (b) is false.
Remember that 6 contains the elements {0, 1, 2, 3, 4, 5}. You can use trial and error to find all elements that satisfy the given equation.
Your answer is correct.
By trial and error, we find that x = 0 and x = 3 are the only solutions of the equation. We have 2 × 0 = 0 and 2 × 3 = 6 = 0 in 6.
Not correct. Choice (d) is false.
Remember that 6 contains the elements {0, 1, 2, 3, 4, 5}. You can use trial and error to find all elements that satisfy the given equation.
Not correct. Choice (e) is false.
Remember that 6 contains the elements {0, 1, 2, 3, 4, 5}. You can use trial and error to find all elements that satisfy the given equation.
 

Question 5

 
 
The solutions in 10 of the equation x2 = 3x are:
a) x = 0   b) x = 0, 3
c) 0, 3, 5, 8   d) 0, 8

 

Not correct. Choice (a) is false.
This is one of the solutions but not the only one. You could try a systematic approach and find the squares of all the members of 10, then check to see which of these are equal to three times the original number.
Not correct. Choice (b) is false.
These are certainly solutions but they aren’t the only ones. You could try a systematic approach and find the squares of all the members of 10, then check to see which of these are equal to three times the original number.
Your answer is correct.
Strangely, the quadratic equation has four solutions in 10! We see that
 2             3             2                      2
0 = 0 = 3×0,  3 = 9 = 3×3,  5 = 25 = 5 = 15 = 3×5, 8 = 64 = 4 = 24 = 3×8.
Not correct. Choice (d) is false.
These are certainly solutions (02 = 0 = 3 × 0, 82 = 64 = 4 = 24 = 3 × 8) but they aren’t the only ones. You could try a systematic approach and find the squares of all the members of 10, then check to see which of these are equal to three times the original number.
 

Question 6

 
 
Find the solution of the following simultaneous equations in 12.
3x = 0,   2x +4 = 0.

 

Your answer is correct
In 12, we see by trial and error that there are three values of x satisfying 3x = 0, namely x = 0, x = 4, x = 8. Neither x = 0 nor x = 8 satisfies 2x + 4 = 0, since 2 × 0 + 4 = 4 and 2 × 8 + 4 = 20 = 8. However, 2 × 4 + 4 = 8 + 4 = 12 = 0. Therefore x = 4.
Not correct. You may try again.
One method is to find all solutions to 3x = 0 in 12 by trying all possible values of x from 0 to 11. Then see if any of these satisfy 2x + 4 = 0.
 

Question 7

 
 
How many values of a are there in 4 for which we can find an x in 4 satisfying the equation ax = 1?
a) None   b) One
c) Two   d) Three

 

Not correct. Choice (a) is false.
Work systematically. First let a = 0 and see if x can be found to satisfy 0 × x = 1. Then let a = 1 and repeat the process, etc.
Not correct. Choice (b) is false.
Work systematically. First let a = 0 and see if x can be found to satisfy 0 × x = 1. Then let a = 1 and repeat the process, etc.
Your answer is correct.
We can’t find any solution to ax = 1 when a = 0, for then the left hand side is 0. When a = 1 we see that x = 1 is a solution. When a = 2 we see that 2x is either 0 or 2 but never 1. When a = 3 we see that 3x = 1 has solution x = 3. So ax = 1 can be solved only when a = 1 or a = 3.
Not correct. Choice (d) is false.
Work systematically. First let a = 0 and see if x can be found to satisfy 0 × x = 1. Then let a = 1 and repeat the process, etc.
 

Question 8

 
 
How many of the following three ISBNs is/are correct? (Recall that the check vector for ISBNs is c = [10,9,8,7,6,5,4,3,2,1] and that operations are performed in 11.)
u = [0,1,9,2,8,6,1,0,3,4]
v = [0,1,4,0,0,8,3,7,1,3]
w = [0,5,8,2,7,0,0,5,5,2]
a) All three are correct.   b) Two are correct.
c) One is correct.   d) None is correct.

 

Not correct. Choice (a) is false.
Not correct. Choice (b) is false.
Your answer is correct.
There is a single correct ISBN, namely u. This is the only one whose dot product with c equals zero in 11.
Not correct. Choice (d) is false.
 

Question 9

 
 
What is the value of the UPC check digit d in u = [0,3,4,1,8,6,2,2,6,7,5,d]? (Recall that the check vector for UPCs is c = [3,1,3,1,3,1,3,1,3,1,3,1] and that operations are performed in 10.)

 

Your answer is correct
The dot product of u and c equals
(0×3 )+(3×1)+(4×3 )+ (1×1)+(8×3)+ (6×1 )+ (2×3)+(2×1)+ (6×3 )+ (7×1)+(5×3)+ (d×1 )
= 0 +3 + 12+ 1+ 24 + 6+ 6+ 2+ 18 + 7+ 15+ d
= 4 + d.
Thus d = 6.
Not correct. You may try again.
The dot product of the check vector and the UPC vector must equal 0 in 10. Calculate the dot product - it will contain a term in d. Select the correct value of d to make the dot product a multiple of 10 (that is, equal to 0 in 10).
 

Question 10

 
 
(Harder) Two adjacent entries in a correct ISBN have been transposed in error, resulting in an incorrect ISBN of
[0,4,9,5,0,4,1,4,2,7].
Find the incorrect positions (where positions are numbered from right to left). (Recall that the check vector for ISBNs is c = [10,9,8,7,6,5,4,3,2,1] and that operations are performed in 11.)
a) 3rd and 4th positions from right.   b) 8th and 9th positions from right.
c) 4th and 5th positions from right.   d) 5th and 6th positions from right.
e) None of the above.

 

Not correct. Choice (a) is false.
Suppose that the transposed elements are a and b, where a,b is the correct order. In the correct order, suppose a is in the (n + 1)th position from the right and b is in the nth position from the right. The incorrect ISBN lists b,a in these positions, respectively. In the calculation of the dot product with c, the correct ISBN results in the inclusion of terms (n + 1)a + nb = na + nb + a whereas the incorrect ISBN results in the inclusion of (n + 1)b + na = na + nb + b. All other terms in the dot product remain the same. Therefore the incorrect dot product minus the correct dot product equals b - a. Now calculate the dot product of the check vector with the incorrect ISBN. You will be very close to arriving at the answer!
Not correct. Choice (b) is false.
Suppose that the transposed elements are a and b, where a,b is the correct order. In the correct order, suppose a is in the (n + 1)th position from the right and b is in the nth position from the right. The incorrect ISBN lists b,a in these positions, respectively. In the calculation of the dot product with c, the correct ISBN results in the inclusion of terms (n + 1)a + nb = na + nb + a whereas the incorrect ISBN results in the inclusion of (n + 1)b + na = na + nb + b. All other terms in the dot product remain the same. Therefore the incorrect dot product minus the correct dot product equals b - a. Now calculate the dot product of the check vector with the incorrect ISBN. You will be very close to arriving at the answer!
Your answer is correct.
Suppose that the transposed elements are a and b, where a,b is the correct order. In the correct order, suppose a is in the (n + 1)th position from the right and b is in the nth position from the right. The incorrect ISBN lists b,a in these positions, respectively. In the calculation of the dot product with c, the correct ISBN results in terms (n + 1)a + nb = na + nb + a whereas the incorrect ISBN results in terms (n + 1)b + na = na + nb + b. All other terms in the dot product remain the same. Calculating the dot product of the check vector with the incorrect ISBN gives an answer of 3. Therefore the incorrect dot product minus the correct dot product equals b - a = 3 - 0 = 3. We search for two adjacent entries differing by 3 (modulo 11) in the incorrect ISBN, finding only one such pair, at the 4th and 5th positions from the right. The correct ISBN is therefore found by swapping these two entries, to give [0,4,9,5,0,1,4,4,2,7].
Not correct. Choice (d) is false.
Suppose that the transposed elements are a and b, where a,b is the correct order. In the correct order, suppose a is in the (n + 1)th position from the right and b is in the nth position from the right. The incorrect ISBN lists b,a in these positions, respectively. In the calculation of the dot product with c, the correct ISBN results in the inclusion of terms (n + 1)a + nb = na + nb + a whereas the incorrect ISBN results in the inclusion of (n + 1)b + na = na + nb + b. All other terms in the dot product remain the same. Therefore the incorrect dot product minus the correct dot product equals b - a. Now calculate the dot product of the check vector with the incorrect ISBN. You will be very close to arriving at the answer!
Not correct. Choice (e) is false.
Suppose that the transposed elements are a and b, where a,b is the correct order. In the correct order, suppose a is in the (n + 1)th position from the right and b is in the nth position from the right. The incorrect ISBN lists b,a in these positions, respectively. In the calculation of the dot product with c, the correct ISBN results in the inclusion of terms (n + 1)a + nb = na + nb + a whereas the incorrect ISBN results in the inclusion of (n + 1)b + na = na + nb + b. All other terms in the dot product remain the same. Therefore the incorrect dot product minus the correct dot product equals b - a. Now calculate the dot product of the check vector with the incorrect ISBN. You will be very close to arriving at the answer!