Final exam
Discrete Mathematics
Before you start
- 20 questions, drawn at random from a pool of 31.
- Pass mark: 70%. Your final score is 30% practice + 70% exam.
- No time limit, but finish within 3 hours. You can move between questions before you submit.
- Failed? Review the lessons and try again: every attempt gets a new set of questions.
Question 1 of 20Choose one
If p is false and q is true, which statement is false?
Question 2 of 20True or false
The statement (p → q) ∨ (q → p) is a tautology.
Question 3 of 20Choose one
Which statement is logically equivalent to "If the code compiles, then the tests pass"?
Question 4 of 20Fill in the blanks
Fill in the blanks
By De Morgan's laws, ¬(p ∨ q) is equivalent to ¬p ¬q, and ¬(p ∧ q) is equivalent to ¬p ¬q.
Question 5 of 20Work it out
How many rows of the truth table for p ∨ q ∨ r are false?
Question 6 of 20Choose one
With the domain of positive integers, what is the negation of "∃n (n² = n + 6)"?
Question 7 of 20What would you do?
What would you do?
A teammate says: "∀x ∃y (x < y) and ∃y ∀x (x < y) say the same thing about the integers." How do you respond?
Question 8 of 20Choose one
To prove "if n² is divisible by 3, then n is divisible by 3" by contrapositive, which statement do you prove?
Question 9 of 20True or false
The number 1 is a counterexample to the claim "every positive integer is either prime or composite."
Question 10 of 20Put in order
Order the steps of a proof by contradiction.
Drag the items, or use the arrow buttons, to put them in order.
- Reason logically from that assumption
- Assume the statement you want to prove is false
- Reach a contradiction, a statement that is both true and false
- Conclude that the assumption was wrong, so the statement is true
Question 11 of 20Spot the mistake
This induction proof of 1 + 3 + 5 + ⋯ + (2n − 1) = n² contains one error. Which line?
Question 12 of 20Work it out
Using 1 + 2 + ⋯ + n = n(n + 1)/2, compute 51 + 52 + ⋯ + 100.
Question 13 of 20Choose one
Why does an induction proof need a base case?
Question 14 of 20Work it out
In a survey of 50 students, 30 play a sport, 20 play an instrument and 8 do both. How many do neither?
Question 15 of 20Select all that apply
Let A = {1, 2}. Which of these are elements of the power set P(A)? Select all that apply.
Select all that apply.
Question 16 of 20Match the pairs
Match each function on the integers with its property.
Tap an answer, then tap the place where it belongs (or drag it there).
- f(n) = n + 10
- f(n) = 5n
- f(n) = ⌊n/2⌋
- f(n) = n² + 1
Question 17 of 20Sort into groups
Which properties does the relation "a divides b" have on the positive integers?
Tap an item, then tap its group (or drag it there).
Question 18 of 20True or false
A function from a 5-element set to a 4-element set can be injective.
Question 19 of 20Work it out
A website requires usernames of exactly 3 characters, each a lowercase letter or a digit. How many usernames are possible?
Question 20 of 20Work it out
What is C(10, 4)?
Question 21 of 20Choose one
A pizza place offers 8 toppings. How many different pizzas with exactly 3 different toppings can be made?
Question 22 of 20Work it out
How many distinct arrangements of the letters in the word COOKBOOK are there?
Question 23 of 20Choose one
What is the minimum number of people needed to guarantee that at least 3 share a birth month?
Question 24 of 20Work it out
What is the coefficient of x²y⁴ in (x + y)⁶?
Question 25 of 20Work it out
Find gcd(84, 120).
Question 26 of 20Choose one
Which congruence is true?
Question 27 of 20Work it out
What is the last digit of 3²⁰²⁶? (Hint: powers of 3 end in a repeating cycle of length 4.)
Question 28 of 20True or false
A connected graph whose vertex degrees are 2, 4, 3, 5 and 2 has an Euler path but no Euler circuit.
Question 29 of 20Work it out
A graph has 7 vertices with degrees 1, 2, 2, 3, 3, 4 and 5. How many edges does it have?
Question 30 of 20Choose one
A connected graph has 12 vertices and 15 edges. How many edges must be removed to obtain a spanning tree?
Question 31 of 20Put in order
Order the steps of Kruskal's algorithm.
Drag the items, or use the arrow buttons, to put them in order.
- List all edges sorted by weight, smallest first
- Add it to the tree unless it creates a cycle
- Take the next edge in the list
- Repeat until the tree has n − 1 edges