Discrete Structure Ā· Unit 1
Fundamentals of Logic and Propositions
Exam-focused notes for Fundamentals of Logic and Propositions (Discrete Structure, BIT152): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.
Fundamentals of Logic and Propositions in short
Logic is the study of correct reasoning. It gives us exact rules to decide whether a statement is true, and it is the base of proofs, programming conditions and digital circuits.
What this unit covers
- Propositions and non-propositions
- Logical connectives and truth tables
- Tautology and contradiction
- Converse, inverse, and contrapositive
- Logical equivalence
- Quantifiers and predicate logic
- Negation of statements
Quantifiers and predicate logic
2082 Ā· 10 marks
Why do we need quantifiers? List any three rules of inferences. Prove that $2\sqrt{2}$ is irrational using proof by contradiction. [2+3+5]
Show solved answerHide answer
Answer
1. Why Do We Need Quantifiers? [2 marks]
In propositional logic, we can only deal with specific propositions (true or false statements). However, many mathematical and logical statements involve variables and express properties over a range of objects. Quantifiers allow us to express such statements precisely.
Reasons we need quantifiers:
- To express statements like "For all integers n, n² ℠0" or "There exists a number x such that x + 2 = 5". These cannot be captured by propositional logic alone.
- To generalize propositions over a domain (universe of discourse) rather than stating each case individually.
- To formally reason about predicates (properties/relations) involving variables.
Two main quantifiers:
- Universal Quantifier (ā): "For all" - asserts a property holds for every element.
- Existential Quantifier (ā): "There exists" - asserts a property holds for at least one element.
2. Three Rules of Inference [3 marks]
| Rule | Form | Name |
|---|---|---|
| 1 | p, p ā q ā“ q | Modus Ponens |
| 2 | ¬q, p ā q ⓠ¬p | Modus Tollens |
| 3 | p ā q, q ā r ā“ p ā r | Hypothetical Syllogism |
Explained:
- Modus Ponens: If p is true and p implies q, then q is true.
- Modus Tollens: If q is false and p implies q, then p must be false.
- Hypothetical Syllogism: If p implies q and q implies r, then p implies r (chain rule).
3. Prove that ā2 is Irrational (Proof by Contradiction) [5 marks]
Setup
Claim: ā2 is irrational.
Method: Proof by contradiction. We assume the negation of what we want to prove and derive a contradiction.
Proof
Step 1: Assume the opposite (negation).
Assume, for the sake of contradiction, that ā2 is rational.
Step 2: Use the definition of rational numbers.
If ā2 is rational, then it can be expressed as:
$$\sqrt{2} = \frac{p}{q}$$
where p, q are integers, q ā 0, and the fraction p/q is in lowest terms (i.e., gcd(p, q) = 1, so p and q share no common factors).
Step 3: Square both sides.
$$2 = \frac{p^2}{q^2}$$
$$p^2 = 2q^2 \quad \cdots (1)$$
Step 4: Conclude p is even.
From equation (1), p² is divisible by 2.
Since 2 is prime, if 2 | p², then 2 | p.
So we can write: p = 2k for some integer k.
Step 5: Substitute back.
Substituting p = 2k into equation (1):
$$(2k)^2 = 2q^2$$
$$4k^2 = 2q^2$$
$$q^2 = 2k^2 \quad \cdots (2)$$
Step 6: Conclude q is even.
From equation (2), q² is divisible by 2.
Since 2 is prime, if 2 | q², then 2 | q.
Step 7: Derive the contradiction.
We have shown that both p is even and q is even, meaning:
$$\gcd(p, q) \geq 2$$
But this contradicts our assumption that gcd(p, q) = 1 (the fraction was in lowest terms).
Step 8: Conclusion.
Our assumption that ā2 is rational leads to a contradiction. Therefore, by proof by contradiction:
$$\boxed{\sqrt{2} \text{ is irrational.} \quad \blacksquare}$$
2081 Ā· 5 marks
Define proposition. Convert the following sentences to predicate: (a) Some kind hearted peoples do still exist. (b) Student who study hard and do the homework get good marks in exam. [5]
Show solved answerHide answer
Proposition and Predicate Logic
Definition of Proposition
A proposition is a declarative statement that is either true or false, but not both simultaneously. It has a definite truth value (T or F).
Examples:
- "2 + 2 = 4" (True proposition)
- "The sky is green" (False proposition)
- "Close the door!" (NOT a proposition - it is a command)
Converting Sentences to Predicate Logic
(a) Some kind hearted people do still exist.
Identify the components:
- Let K(x) = "x is kind hearted"
- Let E(x) = "x still exists" (or "x is a person who still exists")
- The quantifier "Some" maps to the Existential Quantifier (ā)
Predicate Form:
$$\exists x ; [K(x) \land E(x)]$$
Reading: "There exists some x such that x is kind hearted and x still exists."
(b) Students who study hard and do the homework get good marks in exam.
Identify the components:
- Let S(x) = "x is a student"
- Let H(x) = "x studies hard"
- Let D(x) = "x does the homework"
- Let G(x) = "x gets good marks in exam"
- The quantifier "All/Every" (implied) maps to the Universal Quantifier (ā)
Predicate Form:
$$\forall x ; [S(x) \land H(x) \land D(x) \Rightarrow G(x)]$$
Reading: "For all x, if x is a student and x studies hard and x does the homework, then x gets good marks in the exam."
Note: The existential quantifier (ā) uses conjunction (ā§) with its conditions, while the universal quantifier (ā) typically uses implication (ā) to express conditional relationships.
Propositions and non-propositions
2079 Ā· 10 marks
Give any four examples that are not propositions. Assume the premises, all over smart persons are stupid, children of stupid persons are naughty, John is over smart, Sam is children of John. Using rules of inferences, show that Sam is naughty.[10]
Tautology and contradiction
2078 Ā· 5 marks
What is tautology? Show $(p \land q) \rightarrow (p \lor q)$ is a tautology. [5]
Negation of statements
2080.1 Ā· 5 marks
List the negations of following statements: (a) He has passed the exam. (b) All dogs are loyal. (c) Some medicine has side effect. (d) If you study then you will pass the exam. (e) Open the door. [5]
Converse, inverse, and contrapositive
0 Ā· 5 marks
What do you mean by converse, inverse, and contrapositive? Show that the sentences "if it is hot today then today is Sunday" and "if it is not Sunday then today is not hot" are logically equivalent. [5]
Make Unit 1 stick
Practice BIT152 with flashcards & quizzes