Discrete Math - Variant Practice Problems
1. n = 9, phi = 26 and gcd(n, phi) = 1. Find the inverse of n mod phi.
2. Use the Euclidean Algorithm to find gcd(315, 147).
3. Find integers s and t such that gcd(785, 2310) = s*785 + t*2310.
4. How many 5-letter strings from FGHIJ contain the substring GH or HI?
5. In how many ways can 6 aliens and 4 humans sit at a round table if aliens must not sit together?
6. How many permutations of BATTLESHIP are there such that two B's do not appear consecutively?
7. Select 12 balls from red, blue, and yellow piles with at least 2 red, 3 blue, and 4 yellow. How many ways?
8. Find the number of integer solutions to x1 + x2 + x3 + x4 = 18, where each xi >= 1.
9. Toss a coin 4 times. Given at least one head appears, find the probability of exactly 2 heads (in reduced
form p/q).
10. Given infection rate is 15%, true positive 85%, false positive 7%. What is P(infected | test is positive)?
(reduced form)
11. Find the coefficient of x^8 y^5 in the expansion of (x + y)^7 * (x + z)^5.
12. What is the coefficient of x^2 y^3 z^5 in the expansion of (x + y + z)^10? Express as C(n1, n2) * C(n3,
n4).
13. Solve the recurrence: a_n = a_{n-1} + n, with a_0 = 0. Give an explicit formula.
14. Solve the recurrence: a_n = a_{n-1} + 10*a_{n-2}, with a_0 = 2, a_1 = 5. Give an explicit formula.
15. Use the pigeonhole principle to show that among 8 students assigned grades A-D, at least 3 get the
same grade.
16. Using exponentiation by repeated squaring, how many multiplications are needed to compute 157^19
mod 16?
17. Compute 84^5 mod 13 and find the minimum number of multiplications using repeated squaring.