Sample Final - University of Nebraska–Lincoln

advertisement

End of Course Problems for Number Theory and Cryptography

Summer 2006

1. Prove: If d |( a + b ) and d | a , then d | b .

2. Prove or disprove: If a and b are odd integers, then a

2

+ b

2

is not a perfect square.

3. Find five different ways a collection of 100 coins - pennies, dimes, and quarters – can

be worth exactly $4.99.

4. Prove or disprove: If a

2

≡ b

2

(mod m ), then a ≡ b (mod m ) or a ≡ − b (mod m ).

5. The International Standard Book Number (ISBN) is used to identify books. A correctly

coded 10-digit ISBN a

1 a

2 a

3 a

4 a

5 a

6 a

7 a

8 a

9 a

10

has the property that 10 a

1

+9 a

2

+

8 a

3

+7 a

4

+6 a

5

+5 a

6

+4 a

7

+3 a

8

+2 a

9

+ a

10

is divisible by 11. All transposition errors (errors

where two adjacent digits are swapped) are detected by the ISBN encoding. Show that

if the digits a

8

and a

9

are swapped, that the error will be detected.

6. Consider the linear congruence equation ax ≡ b (mod 36).

(a) Construct a linear congruence equation modulo 36 with no solutions.

(b) Construct a linear congruence equation modulo 36 with exactly 1 solution.

(c) Construct a linear congruence equation modulo 36 with more than one

solution.

7. Solve, if possible, the congruence equations:

(a) 9 x ≡ 7 (mod 11)

(b) 15 x ≡ 27 (mod 20)

(c) 573 x ≡ 1 (mod 256)

(d) 573 x ≡ 27 (mod 256)

8. Compute the last two digits of 71

71

.

9. You examined perfect numbers in your homework. A perfect number is a number

equal to the sum of its divisors (other than itself). For example, 6 is a perfect number

since 6 = 1+2+3. We could say that a number is product perfect if the product of all its

divisors (other than itself) is equal to the original number. For example, 6 and 15 are

product perfect since 6 = 1 · 2 · 3 and 15 = 1 · 3 · 5. The number 12 is not product

perfect since 1 · 2 · 3 · 4 · 6 = 144

12.

(a) List all the product perfect numbers between 2 and 50.

(b) Based on your data in part (a), find a precise characterization of all product perfect numbers. Your characterization should begin with ”A number is product perfect if and only if . . . ”.

Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle

Institute Partnership, University of Nebraska, Lincoln.

1

(c) Prove this characterization.

10. Collecting data:

(a) As we did in class (see sections 6 and 7), build a table tabulating a k

(mod 12) for a =

0, 1, . . . , 11 and for enough k starting at k = 1 until a repeating pattern is established.

(b) Explain how the data in the table demonstrates Euler’s Theorem.

(c) Note that 0

(12)

 1. Does this violate Euler’s Theorem?

(d) From your table, which numbers are multiplicative inverses of themselves?

(e) What is 9 43,345,192,345 (mod 12)?

11. Consider the RSA encryption method with p = 11 and q = 17 as the two primes. Also let A =

0, B = 1, . . . , Z = 25, space = 26 as we did in class.

(a) Find n and

( n ).

(b) Let e = 71 and find d .

(c) Verify that de ≡ 1 (mod

( n )).

(d) A secret message m has been encoded using m e

(mod n ) with the values of n and e

given above. The encoded message is GABCDACQDAEPEF. Decode this message

by breaking it up into blocks of size 2. Convert each block to a base 10 number. For

ex., DU = 3 · 27 + 20 = 74. Decrypt these base ten numbers using s d

(mod n ), where s is the encoded number; your results will be a number between 0 and 26. You may

use the web-based computer program found at http://www.nebrwesleyan.edu

/people/kpfabe/FastExp.html to perform the fast exponentiation. Translate this number

to a letter using the substitution given above to decode the message. The message is a

familiar English phrase.

Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle

Institute Partnership, University of Nebraska, Lincoln.

2

Solutions: End of Course Problems for Number Theory and Cryptography

1. Prove: If d |( a + b ) and d | a , then d | b .

Since d |( a + b ) and d | a , dj = a + b and dk = a , for some integers j, k .

Thus b = d ( j − k ). Hence d | b .

2. Prove or disprove: If a and b are odd integers, then a 2 + b 2 is not a perfect square.

If a and b are odd, then there are integers j and k such that a = 2 j +1 and b = 2 k +1.

Then a 2 + b 2 = 4j 2 + 4 j + 4 k 2 + 4 k + 2, which is an even number. If a perfect square d = c 2 is even, then it must be divisible by 4, since c would be divisible by 2. However

4 j 2 + 4 j + 4 k 2 + 4 k + 2 ≡ 2 (mod 4), and so a 2 + b 2 is not a perfect square.

3. Find five different ways a collection of 100 coins - pennies, dimes, and quarters – can be worth

exactly $4.99.

Let x be the number of quarters and y be the number of dimes. Then there are 100 − x − y

pennies. Thus

499 = 100 − x − y + 25 x + 10 y which simplifies to 133 = 8 x + 3 y , and so y =

133

8 x

3

Test values of x starting at 0, 1, . . . to find the first value for which y is an integer.

We see that x = 2 works, and the corresponding y is y = 39. Thus our solutions to

133 = 8 x +3 y are x = 2 +3 t , y = 39−8 t . Nonnegative values of x and y occur when

t = 0, 1, 2, 3, 4. Thus, the combination of coins that are worth $4.99 are

• 2 quarters, 39 dimes and 59 pennies

• 5 quarters, 31 dimes and 64 pennies

• 8 quarters, 23 dimes and 69 pennies

• 11 quarters, 15 dimes and 74 pennies

• 14 quarters, 7 dimes and 79 pennies

4. Prove or disprove: If a 2

≡ b 2 (mod m ), then a ≡ b (mod m ) or a ≡ − b (mod m ).

To disprove, let a = 7, b = 5 and m = 24. 49 ≡ 25 (mod 24) but 7 ≡

5 (mod 24).

5. The International Standard Book Number (ISBN) is used to identify books. A correctly coded

10-digit ISBN a

1 a

2 a

3 a

4 a

5 a

6 a

7 a

8 a

9 a

10 has the property that 10 a

1

+9 a

2

+8 a

3

+7 a

4

+6 a

5

+5 a

6

+4 a

7

+

3 a

8

+2 a

9

+ a

10 is divisible by 11. All transposition errors (errors where two adjacent digits are

swapped) are detected by the ISBN encoding. Show that if the digits a 8 and a 9 are swapped,

that the error will be detected.

For the error to go undetected, 10 a

1

+9 a

2

+8 a

3

+7 a

4

+6 a

5

+5 a

6

+4 a

7

+3 a

8

+2 a

9

+ a

10 would be

divisible by 11. Since 10 a

1

+9 a

2

+8 a

3

+7 a

4

+6 a

5

+5 a

6

+4 a

7

+3 a

8

+2 a

9

+ a

10 is divisible by 11,

then for the error to go undetected, the difference of these two would also be divisible by 11.

We’ll look at that difference now: 10 a

1

+9 a

2

+8 a

3

+7 a

4

+6 a

5

+5 a

6

+4 a

7

+3 a

8

+2 a

9

+ a

10

Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle

Institute Partnership, University of Nebraska, Lincoln.

3

( 10 a

1

+9 a

2

+8 a

3

+7 a

4

+6 a

5

+5 a

6

+4 a

7

+3 a

9

+2 a

8

+ a

10

) =3 a 8 + 2 a 9 − (3 a 9 + 2 a 8 ) = a 8 − a 9 . There

is no way hat a 8 − a 9 can be divisible by 11 if a 8 and a 9 can be the numbers 0, 1, . . . , 9.

6. Consider the linear congruence equation a x ≡ b (mod 36).

(a) Construct a linear congruence equation modulo 36 with no solutions.

(b) Construct a linear congruence equation modulo 36 with exactly 1 solution.

(c) Construct a linear congruence equation modulo 36 with more than one solution.

No solution: 2 x ≡ 1 (mod 36)

One solution: 17 x ≡ 1 (mod 36)

More than one solution: 2 x ≡ 4 (mod 36)

7. Solve, if possible, the congruence equations:

(a) 9 x ≡ 7 (mod 11)

The solution is x = 2

(b) 15 x ≡ 27 (mod 20)

We note that (15, 20) = 5 and 5 does not divide 27, so there are no solutions.

(c) 573 x ≡ 1 (mod 256)

Here we use the Extended Euclidean Algorithm.

573 = 2 · 256 + 61

256 = 4 · 61 + 12

61 = 5 · 12 + 1

Reversing the steps of the Euclidean Algorithm above,

1 = 61 − 5 · 12

= 61 − 5(256 − 4 · 61)

= 21 · 61 − 5 · 256

= 21 · (573 − 2 · 256) − 5 · 256

= 21 · 573 − 47 · 256

So 21 · 573 ≡ 1 (mod 256), thus, 21 is the solution. It is the only least residue solution

since (573, 256) = 1.

(d) 573 x ≡ 27 (mod 256)

Using the previous part, we see that 21 · 27 = 567 is a solution. Its least residue is 55.

8. Compute the last two digits of 71 71 . I.e. we want to compute 71 71 (mod 100)

71 2 ≡ 5041 ≡ 41 (mod 100)

71 3 ≡ 41 · 71 ≡ 11 (mod 100)

71 6 ≡ 11 2 ≡ 21 (mod 100)

71 12 ≡ 21 2 ≡ 41 (mod 100)

71 24 ≡ 41 2 ≡ 81 (mod 100)

71 48 ≡ 81 2 ≡ 61 (mod 100)

71 71 = 71 48 71 12 71 6 71 3 71 2 ≡ 61 · 41 · 21 · 11 · 41 ≡ 71 (mod 100)

9. You examined perfect numbers in your homework. A perfect number is a number equal to the

sum of its divisors (other than itself). For example, 6 is a perfect number since 6 = 1+2+3. We

could say that a number is product perfect if the product of all its divisors (other than itself) is

equal to the original number. For example, 6 and 15 are product perfect since 6 = 1 · 2 · 3

Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle

Institute Partnership, University of Nebraska, Lincoln.

4

and 15 = 1 · 3 · 5. The number 12 is not product perfect since 1 · 2 · 3 · 4 · 6 = 144

12.

(a) List all the product perfect numbers between 2 and 50.

They are 6, 8, 10, 14, 15, 21, 22, 26, 27, 33, 34, 35, 38, 39, 46.

(b) Based on your data in part (a), find a precise characterization of all product perfect

numbers. Your characterization should begin with ”A number is product perfect if

and only if . . . ”.

A number is product perfect if and only if it is the product of two distinct prime or is

the cube of a prime.

(c) Prove this characterization.

(sketch) Product perfect numbers will have four distinct factors, and these are of the

form listed above.

10. Collecting data:

(a) As we did in class (see sections 6 and 7), build a table tabulating a k (mod 12)

for a = 0, 1, . . . , 11 and for enough k starting at k = 1 until a repeating pattern

is established. a a 2 a 3 a 4

0 0 0 0

1 1 1 1

2 4 8 4

3 9 3 9

4 4 4 4

5 1 5 1

6 0 0 0

7 1 7 1

8 4 8 4

9 9 9 9

10 4 4 4

11 1 11 1

(b) Explain how the data in the table demonstrates Euler’s Theorem.

First,

(12) = 4. The numbers that are relatively prime to 12 are 1, 5, 7 and 11. For

these values of a , the table shows that a 4 (mod 12) = 1, which is what Euler’s

Theorem guarantees.

(c) Note that 0

(12) 6= 1. Does this violate Euler’s Theorem?

No it doesn’t since (0, 12) = 12, ie. 0 and 12 are not relatively prime.

(d) From your table, which numbers are multiplicative inverses of themselves?

1, 5, 7 and 11.

(e) What is 9 43,345,192,345 (mod 12)?

9

Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle

Institute Partnership, University of Nebraska, Lincoln.

5

11. Consider the RSA encryption method with p = 11 and q = 17 as the two primes. Also let A =

0, B = 1, . . . , Z = 25, space = 26 as we did in class.

(a) Find n and

( n ). n = 187 and

( n ) = 160.

(b) Let e = 71 and find d .

Using the Extended Euclidean Algorithm,

160 = 2 · 71 + 18

71 = 3 · 18 + 17

18 = 1 · 17 + 1

So

1 = 18 − 1 · 17

= 18 − 1(71 − 3 · 18)

= 4 · 18 − 71

= 4(160 − 2 · 71) − 71

= 4 · 160 − 9 71

Thus d = −9 + 160 = 151.

(c) Verify that de ≡ 1 (mod

( n )). de = 151 · 71 = 10721 = 67 · 160 + 1 ≡ 1 (mod 160).

(d) A secret message m has been encoded using m e

(mod n ) with the values of n and e

given above. The encoded message is GABCDACQDAEPEF. Decode this message

by breaking it up into blocks of size 2. Convert each block to a base 10 number. For

ex., DU = 3 · 27 + 20 = 74. Decrypt these base ten numbers using s d

(mod n ), where s is the encoded number; your results will be a number between 0 and 26. You may

use the web-based computer program to perform the fast exponentiation. Translate

this number to a letter using the substitution given above to decode the message. The

message is a familiar English phrase.

GA = 6 · 27 + 0 = 162

BC = 1 · 27 + 2 = 29

DA = 3 · 27 + 0 = 81

CQ = 2 · 27 + 16 = 70

DA = 3 · 27 + 0 = 81

EP = 4 · 27 + 15 = 123

EF = 4 · 27 + 5 = 113

Decode using s d

(mod n ) to get the respective numbers 19, 7, 4, 26, 4, 13 and 3,

which translates into ”THE END”.

Copyright 2007. Number Theory and Cryptology for Middle Level Teachers. Developed by the Math in the Middle

Institute Partnership, University of Nebraska, Lincoln.

6

Download