Course Test · University: first two years

Discrete mathematics: test

Propositional logic and equivalences, inclusion–exclusion, permutations and combinations with repetition, derangements, linear recurrences, sums proved by induction, modular arithmetic, the Euclidean algorithm and Bézout, the Chinese remainder theorem, Euler circuits, shortest paths, spanning trees, Cayley's formula, equivalence relations, number bases and the pigeonhole principle.

Twenty exercises of the kind this course sets. Answers are on the independent answers page; the same exercises done with RatMath are on the RatMath answers page.

  1. 1.Tautology
    Is ((p→q)∧(q→r))→(p→r)((p \to q) \land (q \to r)) \to (p \to r) a tautology?
  2. 2.De Morgan
    Show that ¬(p∧q)≡¬p∨¬q\lnot(p \land q) \equiv \lnot p \lor \lnot q.
  3. 3.Inclusion–exclusion
    How many integers from 1 to 1000 are divisible by 3, 5 or 7?
  4. 4.Counting hands
    How many five-card poker hands contain exactly two pairs?
  5. 5.Arrangements with repetition
    How many arrangements of the letters of MISSISSIPPI are there?
  6. 6.Stars and bars
    How many solutions in non-negative integers has x1+x2+x3+x4=10x_1 + x_2 + x_3 + x_4 = 10?
  7. 7.Derangements
    In how many ways can 6 letters go into 6 envelopes with none in its own envelope?
  8. 8.Linear recurrence
    Solve an=5an−1−6an−2a_n = 5a_{n-1} - 6a_{n-2}, a0=1a_0 = 1, a1=4a_1 = 4.
  9. 9.A sum proved by induction
    Find a closed form for ∑k=1nk3\sum_{k=1}^n k^3.
  10. 10.Modular exponent
    Find 7222 mod 117^{222} \bmod 11.
  11. 11.Euclid and Bézout
    Find gcd⁡(252,198)\gcd(252, 198) and integers with 252x+198y=gcd⁡252x + 198y = \gcd.
  12. 12.Modular inverse
    Find the inverse of 17 modulo 43.
  13. 13.Chinese remainder theorem
    Solve x≡2(mod3)x \equiv 2 \pmod 3, x≡3(mod5)x \equiv 3 \pmod 5, x≡2(mod7)x \equiv 2 \pmod 7.
  14. 14.Euler circuits
    Does K5K_5 have an Euler circuit? Does K4K_4?
  15. 15.Shortest path
    Edges with weights: AB 4, AC 2, BC 1, BD 5, CD 8, CE 10, DE 2. Find the shortest path from A to E.
  16. 16.Minimum spanning tree
    Find the weight of a minimum spanning tree of the same graph.
  17. 17.Counting trees
    How many labelled trees are there on 5 vertices?
  18. 18.Equivalence relations
    Is R={(1,1),(2,2),(3,3),(1,2),(2,1)}R = \{(1,1), (2,2), (3,3), (1,2), (2,1)\} an equivalence relation on {1,2,3}\{1, 2, 3\}? If so, give its classes.
  19. 19.Number bases
    Write 2026 in binary.
  20. 20.Pigeonhole principle
    How many people must be in a room to be sure that three share a birth month?