CS 210 Assignment2 27100134
CS 210 Assignment2 27100134
CS 210 Assignment2 27100134
CS-210 Homework 2
Meesum Ali Student ID: 27100134
21 September 2024
1 Problem 1
Collaborated with: X,Y,Z.
1. Since P represents the power set, so P (X ∩ Y ) is the set of all subsets of (X ∩ Y ). So, we can write it as:
A = P (X ∩ Y ) ={S | S ⊆ (X ∩ Y )}.
Similarly for B, we can write it as;
B = P (X) ∩ P (Y ) = {S | S ⊆ (P (X) ∩ P (Y ))}
Since A = P (X ∩ Y ) is the set of all subsets of X ∩ Y or S ⊆ (P (X) ∩ P (Y )), While on the other hand
B = P (X) ∩ P (Y ) is the set of all subsets of X and Y, (or S ⊆ X ∩ S ⊆ Y ).
Since a set S ⊆ (X ∩ Y ) is exactly the same as a set that is a subset of both X and Y, we can conclude:
P (X ∩ Y ) = P (X) ∩ P (Y ) or we can say that A = B.
Hence Proved.
2 Problem 2
Collaborated with: X,Y,Z.
We will start by applying gates in the numbering they’re mentioned.
1. Input: A
Output : A
2. Input: C
Output: C
3. Input: B, C
Output: B.C
4. Input: B, C
Output: B.C
5. Input: B,C
Output: B.C
6. Input: A, (B.C)
Output : A.(B.C)
7. Input: A, (B. C)
Output : A . (B. C)
8. Input: A, (B.C)
Output: A.(B.C)
9. Input: A.(B.C), A.(B.C)
Output: A.(B.C) + A.(B.C)
3 Problem 3
Collaborated with: X,Y,Z.
1. From LHS and RHS:
(P → R) ∨ (Q → R) ≡ (P ∧ Q) → R
(¬P ∨ R) ∨ (¬Q ∨ R) ≡ ¬(P ∧ Q) ∨ R (Implication Laws)
(¬P ∨ ¬Q) ∨ R ≡ (¬P ∨ ¬Q) ∨ R (Distributive law on LHS and DeMorgan’s Law on RHS)
(¬P ∨ ¬Q) ∨ R ≡ (¬P ∨ ¬Q) ∨ R
Hence Proved.
2. From LHS and RHS:
P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R)
P ∧ (Q ∨ R) ≡ P ∧ (Q ∨ R) (Distributive Law)
Hence Proved.
3. The expression is:
¬[¬[(P ∨ Q) ∧ R] ∨ ¬Q] ≡ Q ∧ R
¬[¬(P ∨ Q) ∨ ¬R ∨ ¬Q] ≡ Q ∧ R (DeMorgan’s Law)
4 Problem 4
Collaborated with: X,Y,Z.
1. We want to prove that :
(A ∪ B ∪ C)′ = A′ ∩ B ′ ∩ C ′
Let U be the universal set containing all possible elements relevant to sets A, B, and C.
2 1 1 0 0 0 1 1 0 0
3 1 0 1 0 1 0 1 0 0
4 1 0 0 0 1 1 1 0 0
5 0 1 1 1 0 0 1 0 0
6 0 0 1 1 1 0 1 0 0
7 0 1 0 1 0 1 1 0 0
8 0 0 0 1 1 1 0 1 1
Let U be the universal set containing all possible elements relevant to sets A, B, and C.
Next, we need to compute the complement of ((A ∩ B) ∪ (A′ ∩ C)):
′
Element (A ∩ B) ∪ (A′ ∩ C) ((A ∩ B) ∪ (A′ ∩ C))
1 1 0
2 1 0
3 0 1
4 0 1
5 1 0
6 0 1
7 1 0
8 0 1
Element A B C A′ B′ C′ A ∩ B′ A′ ∩ C ′ (A ∩ B ′ ) ∪ (A′ ∩ C ′ )
1 1 1 1 0 0 0 0 0 0
2 1 1 0 0 0 1 0 0 0
3 1 0 1 0 1 0 1 0 1
4 1 0 0 0 1 1 1 0 1
5 0 1 1 1 0 0 0 0 0
6 0 1 0 1 0 1 0 1 1
7 0 0 1 1 1 0 0 0 0
8 0 0 0 1 1 1 0 1 1