How to submit:
- Submit before actual tutorial time for it to be graded. There are 2 ways to do this:
- There is a submission box on Canvas for you to submit your document. Either .docx, .pdf, or a picture of your written solutions are acceptable as long as we can read your attempts.
- Submit your written attempts in-person during our tutorial.
- Official due date for submission: 27 Jan 2026, 11:59 PM or during tutorial itself.
Collaboration Policy:
- You may discuss high-level ideas with your classmates or friends. You should list your collaborators if you do so.
- Do not share your solutions.
- ChatGPT (and other LLMs) are not allowed.
- Your submission must be of your own write-up.
Late Policy:
- < 1 week after submission deadline: 50% penalty
- < 2 weeks after submission deadline: 75% penalty
- No submissions after 2 weeks.
Overview
This tutorial gives practice questions to be discussed during the relevant tutorial in person. This particular tutorial sheet corresponds to Unit 1. It is recommended to either watch the lectures or read the notes for each respective parts before attempting the tutorial sheet.
- Questions 1 and 2 are related to propositional logic.
- Questions 3 through 5 are related to first-order logic.
After Week 1’s content, you should be able to attempt questions 1 and 2. After Week 2’s content, you should be able to attempt questions 3 through 5.
Questions 2 and 3 are graded for participation.
That said, we encourage you to try all the questions. This way, when you come for tutorials we can make the best use of your time since you can either verify your solutions, or understand the discussions when our tutors go through the solutions.
Question 1:
For each of the following, write a propositional formula that accurately represents the given English statement. Use the variables , , , and as needed, where they’re defined as:
- “The program compiles”
- “The input is valid”
- “The output is correct”
- “The function is efficient”
- “The algorithm terminates”
- “If the program compiles but the input is not valid, then the output is not correct.”
Solution
Breaking down the sentence, we have:
- “The program compiles”:
- “The input is not valid”:
- “The output is not correct”:
Combining them using connectives, we have:
- “The program compiles but the input is not valid”:
- “If the program compiles but the input is not valid, then the output is not correct.”:
- ”[(The program compiles and the input is valid) or the function is efficient], and the algorithm does not terminate.”
Solution
Breaking down the sentence, we have:
- “The program compiles”:
- “The input is valid”:
- “The function is efficient”:
- “The algorithm does not terminate”:
Combining these using connectives, we have:
“The program compiles and the input is valid”:
“(The program compiles and the input is valid) or the function is efficient”:
”[(The program compiles and the input is valid) or the function is efficient], and the algorithm does not terminate.”:
Order of operations , , , .
Hence, the parentheses are necessary in this particular case. Without them, and are evaluated first, instead of followed by .
- “If the program compiles, then [either (the input is valid and the output is correct), or the algorithm does not terminate].”
Solution
Question 2 [Graded Participation]:
Part A:
Draw two truth tables to verify that:
- is logically equivalent to .
- is logically equivalent to .
Hence, and are logically equivalent.
Hence, and are logically equivalent.
Part B:
To see how these equivalences may be used, let be the statement “It is raining” and let be the statement “It is cold”. Match each of the following statements with its logically equivalent; you might rewrite each statement using and to assist you.
Statements:
- It is not the case that it is raining or cold.
- It is not raining or it is not cold.
- It is not raining and it is not cold.
- It is not the case that it is both raining and cold.
Rewriting the 4 statements using and , we get:
Using De Morgan’s Laws, statements 1 and 3 and logically equivalent, and statements 2 and 4 are logically equivalent.
Question 3 [Graded Participation]:
Let:
- be the set of circles,
- be the set of squares,
- be the set of diamonds, and
- be the set containing all the objects.
You are also given the following predicates, which you may use freely in your answers:
- is true when object is in anywhere in a row that is strictly above object . For example, we consider and .
- is true when object is blue.
- is true when object is grey.
- is true when the object is orange.
- is true when the object is a circle.
- is true when is a square.
- is true when is a diamond.
Determine whether the following statements are true or false for the below picture:

Solution
True: Consider .
False: Consider . Then, , but , and hence .
True: No matter which square is chosen, we can always find at least one diamond such that lies above in the grid. For example, for all the squares, we can let . [Note that this does not mean that the chosen has to be the same one for every ! In this case, this choice of happens to work for all the squares.]
True: No matter which circle and which square are chosen, the circle will lie above the square.
False: There does not exist a single object that lies above all the circles, because the topmost object is itself a circle (i.e., ), and therefore no matter the choice of .
True: Consider . Then, . By generalisation, .
Question 4:
Consider the following first-order logic statements:
Write the negation of each of the statements.
Solutions:
Solution
Put a negation sign outside:
Using negation of a universal quantifier:
Using negation of an existential quantifier:
Using De Morgan’s Law:
Further
Statement 3 is a little more complex. What it means is that for every in set , there exists some corresponding in set , such that both and are true. To negate this, think of the opposite.
NOT every in set has some corresponding in set such that both and are true. This means that there should exist (at least one) in set where you CANNOT find any in set such that both and are true. In other words, there exists in set where for ALL in set , and are not true at the same time (i.e., at least one of them is not true), so either is not true, or is not true, or both.
Now we just write this using FOL: there exists in set where for all in set , either is not true, or is not true. Thus we write .
Solution
Put a negative sign outside:
Using negation of an existential quantifier:
Using negation of a universal quantifier:
Using implication law: , we replace with , thus we write: .
Using De Morgan’s Law:
Double negation: , thus we get .
Further
After looking at the statement 3, this one should make more sense. What this statement means is that there exists some in set where for all in set , is true. To negate this, think of the opposite.
If there exists NO in set where for every in set satisfies , it means that for every in set , there has to exist some in set that doesn’t satisfy , which means that is false.
To negate an implication, we use implication law to turn it into something we can work with. So we replace with , and then negate it, which gives us . Then we use De Morgan’s Law to further simplify into .
In other words, for every in set , there exists some in set , such that . Now we just have to translate this into FOL, and we have .
Question 5:
Part A:
- (True)
Explanation
This is a practice on negating multiple quantifiers in the same statement.
- (Negation of universal quantifier)
- (Negation of existential quantifier)
- (Negation of equals)
Deciphering the statement: This statement says that every natural number, is equal to some integer. We know this to be intuitively true, by the definition of the sets of and .
- (False)
Explanation
This is a practice on negating multiple objects in the same quantifier.
- (Negation of universal quantifier)
- (Negation of equals)
Deciphering the statement: This statement says any two rational numbers are equal, which we know to be false.
- (False)
Explanation
This is a practice on negating implication statements.
- (Negation of universal quantifier)
- (Substitute with a logically equivalent proposition)
Deciphering the statement: This statement says if the squares of two integers are equal, the two integers are also equal.
This is false as the square of a number and its negative counterpart are equal.
It is important to note the use of a commonly used logical equivalence to substitute away the implication connective, as that is the easiest way to negate them.
Part B:
- (True)
Explanation
This is a practice on finding the contrapositive of a simple implication statement.
- (Substitution of contrapositive form)
Deciphering the statement: This statement says if the squares of two integers are not equal, the two integers are also not equal. This might be tricky to justify, so let’s consider the contrapositive.
The contrapositive says that if two integers are equal, the squares of the two integers are also equal. This is significantly easier to justify and imagine.
The contrapositive is thus true, making the original statement true.
- (True)
Explanation
This is a practice on finding the contrapositive of an implication statement with quantifiers.
- (Substitution of contrapositive form)
- (Negation of universal quantifier)
- (Negation of equals)
Deciphering the statement: This statement says that any integer and any natural number, if the numbers are not equal, the integer is less than or equal to . This statement is quite confusing to even approach from this angle, so let’s consider the contrapositive.
The contrapositive says that any integer greater than has a natural number equal to it. Again, this is significantly easier to justify and digest.
The contrapositive is thus true, making the original statement true.