Course Test · University: first two years
Discrete mathematics: independent answers
Each answer here was worked out by hand, without RatMath, before the RatMath code was written. Where the arithmetic is long, the working says how it was checked.
- 1.TautologyIs a tautology?AnswerYes (hypothetical syllogism): the only way to make false is true, false, and then one of the hypotheses is false.
- 2.De MorganShow that .AnswerBoth are false exactly when and are both true.
- 3.Inclusion–exclusionHow many integers from 1 to 1000 are divisible by 3, 5 or 7?Answer.
- 4.Counting handsHow many five-card poker hands contain exactly two pairs?Answer.
- 5.Arrangements with repetitionHow many arrangements of the letters of MISSISSIPPI are there?Answer.
- 6.Stars and barsHow many solutions in non-negative integers has ?Answer.
- 7.DerangementsIn how many ways can 6 letters go into 6 envelopes with none in its own envelope?Answer.
- 8.Linear recurrenceSolve , , .AnswerRoots 2 and 3: .
- 9.A sum proved by inductionFind a closed form for .Answer.
- 10.Modular exponentFind .Answer(Fermat); : .
- 11.Euclid and BézoutFind and integers with .Answer.
- 12.Modular inverseFind the inverse of 17 modulo 43.Answer: 38.
- 13.Chinese remainder theoremSolve , , .Answer.
- 14.Euler circuitsDoes have an Euler circuit? Does ?Answer: every degree is 4 (even) and it is connected, so yes. : degrees are 3, so no.
- 15.Shortest pathEdges with weights: AB 4, AC 2, BC 1, BD 5, CD 8, CE 10, DE 2. Find the shortest path from A to E.AnswerA–C–B–D–E, length .
- 16.Minimum spanning treeFind the weight of a minimum spanning tree of the same graph.AnswerKruskal: BC 1, AC 2, DE 2, (AB 4 makes a cycle), BD 5: weight 10.
- 17.Counting treesHow many labelled trees are there on 5 vertices?AnswerCayley: .
- 18.Equivalence relationsIs an equivalence relation on ? If so, give its classes.AnswerYes (reflexive, symmetric, transitive): classes and .
- 19.Number basesWrite 2026 in binary.Answer.
- 20.Pigeonhole principleHow many people must be in a room to be sure that three share a birth month?Answer.