0% found this document useful (0 votes)
36 views5 pages

Discrete Mathematics - Number Theory Exercises

The document contains a series of exercises related to number theory and modular arithmetic, including problems on finding remainders, prime and composite numbers, greatest common divisors, and encryption techniques. It also discusses concepts like Euler's totient function, the RSA cryptosystem, and methods for secure key exchange. The exercises are designed to enhance understanding of mathematical principles and their applications in computer science.

Uploaded by

10423030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views5 pages

Discrete Mathematics - Number Theory Exercises

The document contains a series of exercises related to number theory and modular arithmetic, including problems on finding remainders, prime and composite numbers, greatest common divisors, and encryption techniques. It also discusses concepts like Euler's totient function, the RSA cryptosystem, and methods for secure key exchange. The exercises are designed to enhance understanding of mathematical principles and their applications in computer science.

Uploaded by

10423030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Vietnamese-German University

Computer Science study program


Course: Algebra

Exercise Sheet: Number Theory


1. Find the last digit of the following sum using the remainders of 10.

(a)
2403 + 791 + 688 + 4339
10
(b) 1 + 1110 + 11110 + · · · + |11 {z
· · · 1}
100times

2. Find

(a) 14 mod 9 (e) 21 + 38 mod 9


(b) −1 mod 9
(f) 25 mod 9
(c) −11 mod 9
(d) 21.38 mod 9 (g) 22016 mod 9

3. Find

(a) 7121 mod 13 (d) 52003 mod 11


(b) 2340 mod 11 (e) 52003 mod 13
(c) 52003 mod 7 (f) 52003 mod 7 · 11 · 13

4. Jesper has 44 boxes of soda in his truck. The cans of soda in each box
are packed oddly so that there are 113 cans of soda in each box. Jesper
plans to pack the sodas into cases of 12 cans to sell. After making as
many complete cases as possible, how many sodas will Jesper have
leftover?
Use modular arithmetic to solve the problem.

5. Which are prime, which are composite?

(a) 119
(b) n! − 1
(c) 22000 + 1
(d) n4 + 4

6. Show that if 2n − 1 is prime, then n is prime.


7. Determine whether the integers in each of these sets are pairwise re-
latively prime

(a) 7, 8, 9, 11
(b) 14, 15, 21
(c) 235 − 1 and 22015 − 1

8. The value of the Euler function φ at a positive integer n is defined


to be the number of positive integers less than or equal to n that are
relatively prime to n. Find the following

a) φ(4), φ(10), φ(13)


b) φ(pk ) where p is a prime number and k is a positive integer
c) φ(pq) where p and q are prime numbers.
d*) φ(pa11 pa22 . . . pann ) where pi are distinct prime numbers.

9. What are the greatest common divisors and the least common multiple
of these pairs of integers?

(a) 37 · 53 · 73 and 39 · 52 · 112


(b) 1000 and 625
(c) 313 · 517 and 212 · 721
(d) 1111 and 0.

10. Find the greatest common divisors of the following pairs using Euclid’s
algorithm and prime factorization theorem.

(a) gcd(12, 18) (e) gcd(1000, 5040)


(b) gcd(108, 30) (f) gcd(54321, 9876)
(c) gcd(111, 201) (g) gcd(67890, 12345)
(d) gcd(210, 126) (h) gcd(12345, 54321)

11. Express the greatest common divisor as a linear combination of original


numbers

(a) 5, 11 (d) 34, 55


(b) 21, 44
(c) 36, 48 (e) 117, 213

12. Encrypt the message HERE IS A MESSAGE using a Caesar cipher in


which each letter is shifted three places to the right.
13. Propose or writing a computer program to find the multiplicative in-
verse of a number a in Zn .

14. If a · 133 − m · 277 = 1, does this guarantee that a has an inverse mod
m? If so, what is it? If not, why not?

15. Determine whether every nonzero element of Zn has a multiplicative


inverse for n = 10 and n = 11. How many elements a ∈ Z10 such that
a ·10 2 = 1?

16. Using the inverse-solving in Euclid’s division to find multiplicative


inverse of

(a) 5 ∈ Z11 (d) 16 ∈ Z103


(b) 3 ∈ Z10
(c) 2 ∈ Z10 (e) 22 ∈ Z31

17. Solve the equations

(a) 5 ·11 x = 1 in Z11


(b) 5 ·11 x = 8 in Z11

18. What is the value of the division 1 by 4 in Z9 ?

19. By multiplying a number x times 487 ∈ Z30031 we obtain 13008. If


you know how to find such number x, do so. If not, explain why the
problem seems difficult to do by hand.

20. Knowing that Alice sent a message to Bob using multiplication mod
n = 103 with the common key a = 16. Assume that Bob receives the
message m = 21. What is the original message that Alice sent Bob?

21. In Turing’s cipher, version 1, suppose that the adversary got two nu-
meric encrypted message y1 = 4307 and y2 = 7373.

(a) Find the common private key e.


(b) Decrypt the message 10877.

22. In Turing’s cipher, version 2, given modulus n = 30.

(a) Find the non-trivial smallest valid private key;


(b) Encrypt the numeric message x = 17;
(c) Decrypt the message y = 19.

23. In Turing’s cipher, version 2 given modulus n = 63. Suppose that the
adversary knows both plaintext and ciphertext x = 55 and y = 25
respectively.
(a) Find the common private key e;
(b) Decrypt the numeric message y = 31.

24. Is 0 − 84 − 930149 − X a valid ISBN-10?

25. The first nine digits of the ISBN-10 for the fifth edition of the book
”DMAäre 0 − 07 − 119881. What is its check digit?

26. Encrypt the message CRIZZLY BEARS using blocks of five letters
and the transposition cipher based on the permutation of {1, 2, 3, 4, 5}
with σ(1) = 3, σ(2) = 5, σ(3) = 1, σ(4) = 2, σ(5) = 4

27. Decrypt the message EABW EFRO ATMR ASIN which is the ci-
pher text produced by encrypting a plaintext message using the trans-
position cipher with blocks of four letters and the permutation σ of
{1, 2, 3, 4} defined by σ(1) = 3, σ(2) = 1, σ(3) = 4, σ(4) = 2.

28. (small RSA crypto-system). Given the modulus n = 33.

(a) What are prime factors p and q of n.


(b) Find Euler’s totient function φ(n) of n.
(c) Find the two non-trivial smallest valid public exponents e1 and
e2 for the RSA with public modulus n;
(d) Encrypt numeric message x = 4 given public exponent e1 above;
(e) Decrypt numeric message y = 31 given public exponent e2 above.

29. Suppose the RSA modulus n = p.q is the product of distinct 200 digit
primes p and q. A message m ∈ Zn is called dangerous if gcd(m, n) = p,
because such an n can be used to factor n and so crack RSA. Circle
the best estimate of the fraction of messages in Zn that are dangerous:
1 1 1 1 1 1
, , , , , .
200 400 20010 10200 40010 10400

30. Implement the fast exponentiation for x60 .

31. Bob and Alice want to choose a key that they can use for cryptography,
but all they have to communicate is a bugged phone line. Bob proposes
thay they choose a secrete number, a for Alice and b for Bob. They
also choose, over the phone a prime number p with more digits than
any key they want to use, and one more number q. Bob will send Alice
bq mod p, and Alice will send Bob aq mod p. Their key (which they
keep secrete) will then be abq mod p. Here we don’t worry about the
details of how they use their key, only with how they choose it. As Bob
explains, their wire tapper will know p, q, aq mod p, and bq mod p,
but will not know a or b, so their key should be safe. In this scheme
safe, that is can the wiretapper compute abq mod p? If so, how does
she do it? Alice says ”You know, the scheme sounds good, but would
not it be more complicated for the wire tapper if I send you q a mod p,
you send me q b mod p and we use q ab mod p as our key.” In this case,
can you think of a way for the wire tapper to compute q ab mod p? If
so, how can you do it? If not, what is the stumbling block?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy