Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views6 pages

Discrete Structure Assiment

This document presents an assignment on Information Communication Technology submitted by Shayan Ullah, focusing on logical equivalences using laws of logic. It includes proofs demonstrating the equivalence of expressions involving propositional variables p and q, as well as truth tables to verify these equivalences. The assignment concludes with a request to draw a logic circuit representing the derived expression.

Uploaded by

zohaib.wazir002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

Discrete Structure Assiment

This document presents an assignment on Information Communication Technology submitted by Shayan Ullah, focusing on logical equivalences using laws of logic. It includes proofs demonstrating the equivalence of expressions involving propositional variables p and q, as well as truth tables to verify these equivalences. The assignment concludes with a request to draw a logic circuit representing the derived expression.

Uploaded by

zohaib.wazir002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

DATE:21/NOV/ 2023

INFORMATION COMMUNICATION
TECHNOLOGY
ASSIGNMENT 1

 Submitted By:
Shayan ullah
 Reg no :
B23F0001SE033

 Submitted to
________________________
Software Engineering
PAK-AUSTRIA Fachhochschule
Institute of Applied Sciences and Technology

Q.1:
Using Laws of Logic, state the following expressions are logical
equivalent.

~ (~ p ∧q) ∧(p ∨q) ≡ p


Statement:

~ (~ p ∧ q) ∧ (p ∨ q) ≡ p

Proof:

Step 1: Apply De Morgan's Law to negate the first expression:

~ (~ p ∧ q) ≡ ~~(p ∧ q) ≡ p ∨ ~q

Therefore, the expression becomes:


(p ∨ ~q) ∧ (p ∨ q) ≡ p

Step 2: Apply the distributive property of conjunction over disjunction:

(p ∨ ~q) ∧ (p ∨ q) ≡ (p ∧ p) ∨ (p ∧ ~q) ∨ (~q ∧ p) ∨ (~q ∧ q)

Since p ∧ p is equivalent to p, and ~q ∧ q is equivalent to false, we can simplify


further:
(p ∨ ~q) ∧ (p ∨ q) ≡ p ∨ (p ∧ ~q) ∨ (~q ∧ p)

Step 3: Apply the associative property and commutative property of conjunction:


p ∨ (p ∧ ~q) ∨ (~q ∧ p) ≡ p ∨ (~q ∧ p) ∨ (p ∧ ~q)

Step 4: Apply the distributive property of disjunction over conjunction:

p ∨ (~q ∧ p) ∨ (p ∧ ~q) ≡ (p ∨ ~q) ∨ (p ∨ p ∧ ~q)

Step 5: Apply the distributive property again and simplify:

(p ∨ ~q) ∨ (p ∨ p ∧ ~q) ≡ (p ∨ ~q) ∨ (p ∨ ~q)

Step 6: Apply the idempotent property of disjunction:

(p ∨ ~q) ∨ (p ∨ ~q) ≡ p ∨ ~q
Therefore, we have proven that the following expressions are logically equivalent:

~ (~ p ∧ q) ∧ (p ∨ q) ≡ p

Q2.

Let p and q are two propositional variables having bidirectional relations, i.e., p ↔ q

1. Using the laws of logical equivalence to state that following expressions are logical equivalent.

P ↔ q ≡ (p → q) ^ (q → p) ≡ (~q ^ ~p) ∨ (p ^ q)

Solution:
Statement 1:
Proof by De Morgan's Laws:

p ↔ q ≡ ~~(p ∧ ~q) ≡ (p ∧ ~p) ∨ (~q ∧ q) ≡ p ∨ q

(p → q) ^ (q → p) ≡ (p ∧ ~q) ∨ (~q ∧ p) ≡ p ∨ q

Therefore, p ↔ q is logically equivalent to (p → q) ^ (q → p).

Statement 2:
Proof by distributive property:

(p → q) ^ (q → p) ≡ (p ∧ ~q) ^ (q ∧ ~p) ≡ (p ∧ q) ∧ (~q ∧ ~p) ≡ (~q ∧ ~p) ∨ (p ∧ q)

Therefore, (p → q) ^ (q → p) is logically equivalent to (~q ∧ ~p) ∨ (p ∧ q).

Statement 3:
Proof by direct proof:
Assume (~q ∧ ~p) ∨ (p ∧ q).

2. Lista truth table to verify above equivalence.

Solution:
Statement 1:

p q p→q q→p (p → q) ^ (q → p) p↔q


T T T T T T
T F F T F F
F T T F F F
F F T T T T

Statement 2:

p q ~q ~p ~q ∧ ~p p∧q (~q ∧ ~p) ∨ (p ∧ q)


T T F F F T T
T F T F T F T
F T F T T F T
F F T T T F T

Statement 3:

p q ~q ~p ~q ∧ ~p p∧q (~q ∧ ~p) ∨ (p ∧ q) p


T T F F F T T T
T F T F T F T T
F T T F F F F F
F F T T T F T F

3. Draw a logic circuit which gives (~q ^ ~p) ∨ (p ^ q) at its output.

q
~q
(~q ^ ~p)

~p
P

You might also like