Arsdigita University Month 2: Discrete Mathematics - Professor Shai Simonson Problem Set 7 - Generating Functions, Number Theory, Cryptography
Arsdigita University Month 2: Discrete Mathematics - Professor Shai Simonson Problem Set 7 - Generating Functions, Number Theory, Cryptography
1. Compute by hand, the smallest positive integers x, y, u, v such that axby = buav =
gcd(a,b) for each pair a, b below. Use the Euclidean algorithm and back tracking.
Turn in your answers only for a and d.
a. 99, 101
b. 10, 35
c. 7, 12
d. 36, 42
2. Write a recursive Scheme function to do the computation above and show the answer
for the pair of numbers 233987973 and 41111687.
3. In each of the following expressions, what is the coefficient in front of the term
whose exponent is 4?
a. (1+x+x2+x3+x4)3
b. (1+x2+x4)2(1+x+x2)2
c. (1+x+x2+x3+x4+…)3
4. Find a generating function that will help determine the number of 5-combinations of
the letters H, E, L, P in which L and P appear at most once, but H and E can appear
multiple times.
6. Prime Numbers
a. How many distinct divisors are there for pa, where p is a prime?
b. How many distinct divisors are there for an arbitrary number m? Hint: Factor
m into its prime factors so that m = p1a1p2a2…pnan.
7. What is the generating function for ck, the number of ways to make change for k cents
using pennies, nickels, dimes and quarters?
8. Use the function in the previous problem to help solve the following counting
problems:
a. How many ways are there to make change for $1 using pennies, nickels,
dimes and quarters, but no more than ten pennies?
b. Same question but at least one of each coin must be used.
9. RSA encryption. Let p=13 and q=11.
a. Calculate an appropriate public code, and private code for doing RSA
encrypting.
b. Assuming that each character in a message is represented by its ASCII value
(an assigned table of integers from 0 to 127, can be found in many texts),
encode the message “Too much work!”.
A public code is found etched on a rock on Mars: (7, 1147). The message {128,
1040, 129, 1144, 788, 735, 570, 875} is received from outer space on one of the
billion machines running the Extraterrestrial Life Detector Screen Saver distributed
among the world’s PC’s. Assuming that this message was encrypted with the public
code found on Mars, crack the code and decode the numbers.
11. Let R be the set of all pairs (a, b) where a and b are mathematicians that have been
co-authors on a paper.
12. Optional: The Boolean product of two binary matrices is defined analogous to
matrix multiplication except with addition replaced by OR, and multiplication
replaced by AND.
a. Consider a directed graph G=(V,E) where E is the relation consisting of its set
of edges. Is E an equivalence relation on V? Prove or give a counterexample.
b. Let A be the binary adjacency matrix representation of G. Prove by induction that
En equals the Boolean product of A with itself n times.
c. What is the meaning of the ij th entry in the product of A with itself n times?
d. Contrast this with the meaning of the ij th entry in the regular matrix product of A
with itself n times.