Student Name: FARAH NAZIR
Student ID: BC240402151
MTH202 (SPRING 2025)
Assignment#1
Question No1:
Use a truth table to determine if the given argument is valid or invalid.
p∧q↦~r
p∨~q
~q↦p
Conclusion: ~r
Solution:
Explanation:
To determine if the argument is valid, we will construct a truth table for the premises and the
conclusion. The argument is valid if every time the premises are true, the conclusion is also true.
Truth Table
We will evaluate the truth values for p, q, and r
p q r ~q p∧q ~r p∧q↦~ p∨~q ~q↦p ~r
r
T T T F T F F T T F
T T F F T T T T T T
T F T T F F T T T F
T F F T F T T T T T
F T T F F F T F T F
F T F F F T T F T T
F F T T F F T T F F
F F F T F T T T F T
Checked where all premises are true:
Row 2: All true, conclusion T.
Row 3: All true, conclusion F.
Row 4: All true, conclusion T.
In Row 3, premises are true but conclusion is false, so it’s invalid.
Answer: The argument is invalid
Question No: 2
Use De Morgan’s Laws to find the negation of each of the following statements.
(a)Jan is rich and happy.
(b)Carlos will bicycle or run tomorrow.
(c) Mei walks or takes the bus to class.
(d)Ibrahim is smart and hard working
Solution:
De Morgan’s Laws:
Negation of AND: ¬(P ∧ Q) = ¬P ∨ ¬Q
Negation of OR: ¬(P ∨ Q) = ¬P ∧ ¬Q
Let's apply this to each statement given in the solution:
(a)Jan is rich and happy.
Let P = Jan is rich, Q = Jan is happy.
Given: P ∧ Q (AND statement).
By De Morgan’s Law: ¬(P ∧ Q) = ¬P ∨ ¬Q.
¬P = Jan is not rich.
¬Q = Jan is not happy.
Negation: Jan is not rich or not happy.
Final Answer: Jan is not rich or not happy.
(b)Carlos will bicycle or run tomorrow. .
Let P = Carlos will bicycle, Q = Carlos will run.
Given: P ∨ Q (OR statement).
By De Morgan’s Law: ¬(P ∨ Q) = ¬P ∧ ¬Q.
¬P = Carlos will not bicycle.
¬Q = Carlos will not run.
Negation: Carlos will not bicycle and not run.
Final Answer: Carlos will not bicycle and not run tomorrow.
(c) Mei walks or takes the bus to class.
Let P = Mei walks, Q = Mei takes the bus.
Given: P ∨ Q (OR statement).
By De Morgan’s Law: ¬(P ∨ Q) = ¬P ∧ ¬Q.
¬P = Mei does not walk.
¬Q = Mei does not take the bus.
Negation: Mei does not walk and does not take the bus.
Final Answer: Mei does not walk and does not take the bus to class.
(d)Ibrahim is smart and hard working
Let P = Ibrahim is smart, Q = Ibrahim is hard working.
Given: P ∧ Q (AND statement).
By De Morgan’s Law: ¬(P ∧ Q) = ¬P ∨ ¬Q.
¬P = Ibrahim is not smart.
¬Q = Ibrahim is not hard working.
Negation: Ibrahim is not smart or not hard working.
Final Answer: Ibrahim is not smart or not hard working.
Question No: 3
Find out the outputs of given digital logic circuit.
Explanation
The given digital logic circuit consists of three inputs: p, q, and r. The circuit includes NOT
gates, AND gates, and OR gates. We need to determine the output in the solution:
Solution:
First, there is a NOT gate on r, so it becomes ¬r.
Then, an OR gate takes q and ¬r as inputs: q OR ¬r = q + ¬r.
Next, an AND gate takes p and (q + ¬r) as inputs: p AND (q + ¬r) = p × (q + ¬r).
Finally, a NOT gate inverts the AND output: NOT(p × (q + ¬r)) = ¬(p × (q + ¬r)).
The final output of the circuit is: ¬(p × (q + ¬r)).
Let’s make a truth table to check the output for all combinations of p, q, r:
p q r ¬r q OR ¬r p AND (q OR ¬r) NOT (p AND (q OR ¬r))
0 0 0 1 1 0 1
0 0 1 0 0 0 1
0 1 0 1 1 0 1
0 1 1 0 1 0 1
1 0 0 1 1 1 0
1 0 1 0 0 0 1
1 1 0 1 1 1 0
1 1 1 0 1 1 0
Final Output
Logical Expression: ¬(p × (q + ¬r))
Output Values: 1, 1, 1, 1, 0, 1, 0, 0
Question No: 4
Construct an algebraic proof for the given statements. Cite the property\definition\
law\theorem used at each step.
For all sets 𝐴, 𝐵 and 𝐶, (𝐴 − 𝐵) ∪ (𝐵 − 𝐴) = (𝐴 ∪ 𝐵) − (𝐴 ∩ 𝐵)
Solution:
and prove the identity (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B).
The statement involves only sets A and B, so we assume the mention of C is irrelevant
Proof:
We start with the left-hand side and use set algebra to show it equals the right-hand side.
1. (A − B) ∪ (B − A)
By the definition of set difference, A − B = A ∩ Bc and B − A = B ∩
Ac. So, (A − B) ∪ (B − A) = (A ∩ Bc) ∪ (B ∩ Ac).
Definition: Set difference (X − Y = X ∩ Y c).
2. (A ∩ Bc) ∪ (B ∩ Ac)
Using the distributive law, (P ∩ Q) ∪ (R ∩ S) = (P ∪ R) ∩ (Q ∪
S), where P = A, Q = Bc, R = B, S = Ac.
So, (A ∩ Bc) ∪ (B ∩ Ac) = (A ∪ B) ∩ (Bc ∪ Ac).
Law: Distributive law.
3. (A ∪ B) ∩ (Bc ∪ Ac)
By De Morgan’s law, (A ∩ B)c = Ac ∪ Bc.
Thus, Bc ∪ Ac = Ac ∪ Bc = (A ∩ B)c.
So, (A ∪ B) ∩ (Bc ∪ Ac) = (A ∪ B) ∩ (A ∩ B)c.
Theorem: De Morgan’s law.
4. (A ∪ B) ∩ (A ∩ B)c
By the definition of set difference, X ∩ Y c = X − Y ,
where X = A ∪ B, Y = A ∩ B.
So, (A ∪ B) ∩ (A ∩ B)c = (A ∪ B) − (A ∩ B).
Definition: Set difference.
Therefore, (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B).