0% found this document useful (0 votes)
27 views

DM Assignment

P → (Q ∨ R) ii. Either John is in the final year or he is not studying CS. But he is not in the final year. Let, P: John is in the final year. Q: John is studying CS. R: John is not in the final year. Then the sentence translates to: (P ∨ ¬Q) ∧ R iii. If Mary is studying in CSE department and she is not in first year, then she is either in second year or third year. Let, P: Mary is studying in CSE department Q: Mary is not in first year R: Mary is in second

Uploaded by

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

DM Assignment

P → (Q ∨ R) ii. Either John is in the final year or he is not studying CS. But he is not in the final year. Let, P: John is in the final year. Q: John is studying CS. R: John is not in the final year. Then the sentence translates to: (P ∨ ¬Q) ∧ R iii. If Mary is studying in CSE department and she is not in first year, then she is either in second year or third year. Let, P: Mary is studying in CSE department Q: Mary is not in first year R: Mary is in second

Uploaded by

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

Department: COMPUTER SCIENCE AND ENGINEERING

Semester: Spring 2023

Program: Bachelor of Computer Science and Engineering


Course Title: Discrete Mathematics
Course Code : MAT 231

ASSIGNMENT

Student Name: Riha Rahman


Student ID: 22100103
Student Batch: 24th
Submission Date:01-07-2023
Course Teacher:Naima Islam Nodi

NARAYANGANJ 2023
Question 1:
Prove the following Set identities using Membership Table, Set Builder
Notation and Venn Diagram.
i. De Morgan’s Law
ii. Associative Law
iii. Distributive Law

Answer:-
De Morgan’s Law of union :

The complement of the union of the two sets A and B will be equal to the
intersection of A' (complement of A) and B' (complement of B). This is also known
as De Morgan's Law of Union. It can be represented as (A ∪ B)' = A' ∩ B'.
De Morgan's Law of Intersection:

The complement of the intersection of A and B will be equal to the union of A' and
B'. This condition is called De Morgan's law of Intersection. It can be given by
(A ∩ B)' = A' ∪ B'.

Membership Table of De Morgan’s Law of union (A ∪ B)' = A' ∩ B'.


A B A∪B (A ∪ B)' A' B' A' ∩ B'
1 1 1 0 0 0 0
1 0 1 0 0 1 0
0 1 1 0 1 0 0
0 0 0 1 1 1 1
Set Builder Notation of De Morgan’s Law of union (A ∪ B)' = A' ∩ B'.
Let ,
X ∈(A ∪ B)'
➢ X ∉ (A ∪ B)
➢ X ∉ A' and x ∉B'
➢ X ∈ A' ∩ B'
Hence , (A ∪ B)' ⊆ A' ∩ B' ………………………(1)

Let ,
X ∈ A' ∩ B'
➢ X ∉ A' and x ∉B'
➢ X ∉ (A ∪ B)
➢ X ∈(A ∪ B)'
Hence , A '∪ B' ⊆(A ∪ B)' ……………………..(2)

From 1 and 2
(A ∪ B)' = A' ∩ B'
(proved)
Set Builder Notation of De Morgan’s Law of intersection (A ∩ B)' = A'
∪ B'
Let ,
X ∈ (A∩ B)'
➢ X ∉ (A∩ B)
➢ X ∉ A or X ∉ B
➢ X ∈ A' or X ∈ B'
➢ X ∈ A'∪ B'
∴ (A ∩ B)' ⊆ A' ∪ B' ……………………(1)
Let,
➢ X ∈ A'∪ B'
➢ X ∈ A' or X ∈ B'
➢ X ∉ A or X ∉ B
➢ X ∉ (A∩ B)
X ∈ (A∩ B)'
∴A' ∪ B' ⊆ (A ∩ B)'……………………(2)
From (1) and (2)
(A ∩ B)' = A' ∪ B'
(proved)
Venn diagram of De Morgan’s Law of union (A ∪ B)' = A' ∩ B'.
Venn diagram of De Morgan’s Law of intersection (A ∩ B)' = A' ∪ B'
Assocative law ;-
Associative law, in mathematics, either of two laws relating to number
operations of addition and multiplication.

For any three finite set A,B and C;


(1) (A ∪ B) ∪ C= A ∪ (BUC)
(2) (A ∩ B) ∩ C = A ∩ (B ∩ C)

Thus union and intersection are associative .


Membership Table
Assocative law of UNION (A ∪ B) ∪ C= A ∪ (BUC)
A B C (A ∪ B) (A ∪ B) ∪ C (BUC) A ∪ (BUC)
1 1 1 1 1 1 1
1 1 0 1 1 1 1
1 0 1 1 1 1 1
1 0 0 1 1 0 1
0 1 1 1 1 1 1
0 1 0 1 1 1 1
0 0 1 0 1 1 1
0 0 0 0 0 0 0

Associative Law of Intersection: (A ∩ B) ∩ C = A ∩ (B ∩ C)


A B C (A∩B) (A∩B)∩C (B∩C) A∩(B∩C)
1 1 1 1 1 1 1
1 1 0 1 0 0 0
1 0 1 0 0 0 0
1 0 0 0 0 0 0
0 1 1 0 0 1 0
0 1 0 0 0 0 0
0 0 1 0 0 0 0
0 0 0 0 0 0 0

Set builder notaion of Assocative law of UNION (A∪B)∪C= A∪(BUC)


Let ,
Let x ∈ (A ∪ B) ∪ C
➢ x ∈ (A ∪ B) ∪ C
➢ x ∈ (A or B) or x ∈ C
➢ x ∈ (A or B) or x ∈ C
➢ x ∈ A or x ∈ B or x ∈ C
➢ x ∈ A or x ∈ (B or C)
➢ x ∈ A or (B or C)
➢ x ∈ A ∪ (B ∪ C)
(A ∪ B) ∪ C ⊂ A ∪ (B ∪ C)……………………………..(1)

Let x ∈ A ∪ (B ∪ C)
➢ x ∈ A ∪ (B ∪ C)
➢ x ∈ A or x ∈ (B or C)
➢ x ∈ A or x ∈ B or x ∈ C
➢ x ∈ (A or B) or x ∈ C
➢ x ∈ (A or B) or C
➢ x ∈ (A ∪ B) ∪ C
A ∪ (B ∪ C) ⊂ (A ∪ B) ∪ C…………………………………(2)

From (1) and (2)


∴ (A ∪ B) ∪ C = A ∪ (B ∪ C)
(proved)

Set builder notaion of Assocative law of Intersection:


(A ∩ B) ∩ C= A ∩ ( B ∩ C )
Let x ∈ (A ∩ B) ∩ C
➢ x ∈ (A ∩ B) ∩ C
➢ x ∈ (A and B) and x ∈ C
➢ x ∈ A, x ∈ B and x ∈ C
➢ x ∈ A and x ∈ (B and C)
➢ x ∈ A and (B and C)
➢ x ∈ A ∩ (B ∩ C)
∴ (A ∩ B) ∩ C ⊂ A ∩ (B ∩ C)……………………….(1)

Let x ∈ A ∩ (B ∩ C).
➢ x ∈ A ∩ (B ∩ C)
➢ x ∈ A and x ∈ (B and C)
➢ x ∈ A, x ∈ B and x ∈ C
➢ x ∈ (A and B) and x ∈ C
➢ x ∈ (A and B) and C
➢ x ∈ (A ∩ B) ∩ C
∴A ∩ (B ∩ C) ⊂ (A ∩ B) ∩ C……………………………(2)

From (1) and (2)


(A ∩ B) ∩ C = A ∩ (B ∩ C)
(proved)

Venn diagram of Assocative law of Intersection:

(A ∪ B) ∪ C = A ∪ (B ∪ C)

Fig :- (A ∪ B) ∪ C = A ∪ (B ∪ C)
iii. Distributive Law
The Distributive Property is an algebraic property that is used to
multiply a single value and two or more values within a set of
parenthesis. The distributive Property States that when a factor is
multiplied by the sum/addition of two terms, it is essential to multiply
each of the two numbers by the factor, and finally perform the addition
operation. This property can be stated symbolically as:
A ( B+ C) = AB + AC
Where A, B and C are three different values.
(1) A∪(B∩C)=(A∪B)∩(A∪C)
(2) A∩(B∪C)=(A∩B)∪(A∩C)
Membership table of Distributive law of
A∪(B∩C)= (A∪B)∩(A∪C)

A B C B∩C A∪(B∩C) (A∪B) (A∪C) (A∪B)∩(A∪C)


1 1 1 1 1 1 1 1
1 1 0 0 1 1 1 1
1 0 1 0 1 1 1 1
1 0 0 0 1 1 1 1
0 1 1 1 1 1 1 1
0 1 0 0 0 1 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0

Membership table of Distributive law of


A∩(B∪C)=(A∩B)∪(A∩C)

A B C B∪C A∩(B∪C) (A∩B) (A∩C) (A∩B)∪(A∩C)


1 1 1 1 1 1 1 1
1 1 0 1 1 1 0 1
1 0 1 1 1 0 1 1
1 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
Set Builder Notation A∪(B∩C)= (A∪B)∩(A∪C)
The law states that taking the union of a set to the intersection of two
other sets is the same as taking the union of the original set and both the
other two sets separately, and then taking the intersection of the results.
Let x ∈ A ∪ (B ∩ C)
➢ x ∈ A or x ∈ (B and C)
➢ x ∈ A or {x ∈ B and x ∈ C}
➢ {x ∈ A or x ∈ B} and {x ∈ A or x ∈ C}
➢ x ∈ (A or B) and x ∈ (A or C)
➢ x ∈ (A ∪ B) ∩ x ∈ (A ∩ C)
➢ x ∈ (A ∪ B) ∩ (A ∪ C)
∴A ∪ (B ∩ C) ⊂ (A ∪ B) ∩ (A ∪ C)………………….(1)

Let x ∈ (A ∪ B) ∩ (A ∪ C)
➢ x ∈ (A or B) and x ∈ (A or C)
➢ {x ∈ A or x ∈ B} and {x ∈ A or x ∈ C}
➢ x ∈ A or {x ∈ B and x ∈ C}
➢ x ∈ A or {x ∈ (B and C)}
➢ x ∈ A ∪ {x ∈ (B ∩ C)}
➢ x ∈ A ∪ (B ∩ C)
∴ (A ∪ B) ∩ (A ∪ C) ⊂ A ∪ (B ∩ C)………………….(2)

From (1) and (2)

A∪(B∩C)= (A∪B)∩(A∪C)
(proved)
Set Builder Notation of A∩(B∪C)=(A∩B)∪(A∩C)
The law states that taking the intersection of a set to the union of two
other sets is the same as taking the intersection of the original set and
both the other two sets separately, and then taking the union of the
results.
Let x ∈ A ∩ (B ∪ C)
x ∈ A ∩ (B ∪ C)
x ∈ A and x ∈ (B or C).
x ∈ A and {x ∈ B or x ∈ C}
{x ∈ A and x ∈ B} or {x ∈ A and x ∈ C}
x ∈ (A ∩ B) or x ∈ (A ∩ C)
x ∈ (A ∩ B) ∪ (A ∩ C)
∴ A ∩ (B ∪ C) ⊂ (A ∩ B) ∪ (A ∩ C)…………………(1)
Let x ∈ (A ∩ B) ∪ (A ∩ C)
x ∈ (A ∩ B) ∪ (A ∩ C)
x ∈ (A ∩ B) or x ∈ (A ∩ C).
x ∈ (A and B) or (A and C)
{x ∈ A and x ∈ B} or {x ∈ A and x ∈ C}
x ∈ A and {x ∈ B or x ∈ C}
x ∈ A and x ∈ (B or C)
x ∈ A ∩ (B ∪ C)
∴ (A ∩ B) ∪ (A ∩ C) ⊂ A ∩ (B ∪ C)……………………..(2)
From (1) and (2)
A∩(B∪C)=(A∩B)∪(A∩C) (proved)
Venn diagram of A∪(B∩C)= (A∪B)∩(A∪C)

Fig :- A∪(B∩C)= (A∪B)∩(A∪C)

Venn diagram of A∩(B∪C)=(A∩B)∪(A∩C)


2. Translate the following English Sentences to form Compound
Propositions:
i. If Joe is in the dual degree program, then he is either not in
first year, or is in CS course.
Let,
P: Joe is in the dual degree program.
Q: Joe is not in the first year.
R: Joe is in a CS course.
Translated form is :-P → (Q ∨ R)
ii. Joe is in the dual degree program and in first year.
Let,
P: Joe is in the dual degree program.
Q: Joe is in the first year.
Translated form is :- P ∧ Q

iii. Joe must be in the dual degree program to register in CS


course.
Let:
P: Joe is in the dual degree program.
Q: Joe can register in a CS course.
Translated form is :- P → Q

iv. Everyone will pass the CS course if they do the homework


regularly and attend in
the exam.
Let ,
P: Everyone does the homework regularly.
Q: Everyone attends the exam.
R: Everyone will pass the CS course.

Translated form is :- (P ∧ Q) → R
3) Prove the following expressions with proper explanation and
example:
i. If R ⊂ X × Y is a relation, then is R a function?
"If R is a subset of X × Y, then R is a function," we need to understand
the definitions of a relation and a function.

A relation between two sets X and Y is a subset of their Cartesian


product, denoted as R ⊆ X × Y. A function, on the other hand, is a
special type of relation where each element from the first set (domain) is
related to exactly one element in the second set (codomain). In other
words, for every x ∈ X, there exists a unique y ∈ Y such that (x, y) ∈ R.

Now, let's prove the statement:

Statement: If R ⊆ X × Y is a relation, then R is a function.

Proof:

Assume that R ⊆ X × Y is a relation.

To show that R is a function, we need to demonstrate that for every x ∈


X, there exists a unique y ∈ Y such that (x, y) ∈ R.

Let's consider an example to illustrate this:


X = {1, 2, 3} (domain)
Y = {a, b, c} (codomain)

R = {(1, a), (2, b), (3, c)} (relation)

In this example, R is a subset of X × Y since every element in R is an


ordered pair where the first element belongs to X and the second
element belongs to Y.

Now, let's check if R is a function:

For x = 1, we have (1, a) ∈ R, which satisfies the condition of a function.

For x = 2, we have (2, b) ∈ R, which satisfies the condition of a function.

For x = 3, we have (3, c) ∈ R, which satisfies the condition of a function.

Thus, for every x ∈ X, there exists a unique y ∈ Y such that (x, y) ∈ R,


indicating that R is indeed a function.

Therefore, we have proved that if R ⊆ X × Y is a relation, then R is a


function.
ii. If F: X → Y is a function, then is F a relation?

To prove the statement "If F: X → Y is a function, then F is a relation,"


we need to understand the definitions of a function and a relation.

A function F from a set X to a set Y is a rule that assigns each element x


∈ X to a unique element y ∈ Y. A relation, on the other hand, is a set of
ordered pairs (x, y) where x is related to y.

Now, let's prove the statement:

Statement: If F: X → Y is a function, then F is a relation.

Proof:

Assume that F: X → Y is a function.

To show that F is a relation, we need to demonstrate that for every x ∈


X, there exists a corresponding y ∈ Y such that (x, y) ∈ F.

Let's consider an example to illustrate this:

X = {1, 2, 3} (domain)
Y = {a, b, c} (codomain)
F = {(1, a), (2, b), (3, c)} (function)

In this example, F is a function since it assigns each element in X to a


unique element in Y.

Now, let's check if F is a relation:

For x = 1, we have (1, a) ∈ F, which satisfies the condition of a relation.

For x = 2, we have (2, b) ∈ F, which satisfies the condition of a relation.

For x = 3, we have (3, c) ∈ F, which satisfies the condition of a relation.

Thus, for every x ∈ X, there exists a corresponding y ∈ Y such that (x, y)


∈ F, indicating that F is indeed a relation.

Therefore, we have proved that if F: X → Y is a function, then F is a


relation.
4)For the relation {(1, 2), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4), (4, 4)}
on the set {1, 2, 3,4}, decide whether it is reflexive and/or symmetric
and/or antisymmetric and/or transitive.
Reflexivity:
A relation R on a set X is reflexive if every element in X is related to
itself, i.e., for every x ∈ X, (x, x) ∈ R.
Let's check if the given relation is reflexive:
The given relation is {(1, 2), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4), (4,
4)} on the set {1, 2, 3, 4}.
For the element 1, (1, 1) is not present in the relation. Therefore, the
relation is not reflexive.
Symmetry:
A relation R on a set X is symmetric if for every (x, y) ∈ R, (y, x) is also
in R.
Let's check if the given relation is symmetric:
The given relation is {(1, 2), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4), (4,
4)} on the set {1, 2, 3, 4}.
For each pair (x, y) in the relation, we check if the pair (y, x) is also
present.
(1, 2) is in the relation, but (2, 1) is not in the relation.
(2, 3) is in the relation, but (3, 2) is also in the relation.
(3, 4) is in the relation, but (4, 3) is not in the relation.
Since there are some pairs for which (y, x) is not in the relation, the
relation is not symmetric.
Antisymmetry:
A relation R on a set X is antisymmetric if for every distinct (x, y) in R,
(y, x) is not in R.
Let's check if the given relation is antisymmetric:
The given relation is {(1, 2), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4), (4,
4)} on the set {1, 2, 3, 4}.
For each distinct pair (x, y) in the relation, we check if the pair (y, x) is
not in the relation.
(1, 2) and (2, 1) are not in the relation.
(2, 3) and (3, 2) are in the relation, but they are not distinct.
(2, 4) and (4, 2) are not in the relation.
(3, 4) and (4, 3) are not in the relation.
Since for all distinct (x, y) in the relation, (y, x) is not in the relation, the
relation is antisymmetric.
Transitivity:
A relation R on a set X is transitive if for every (x, y) and (y, z) in R, (x,
z) is also in R.
Let's check if the given relation is transitive:
The given relation is {(1, 2), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4), (4,
4)} on the set {1, 2, 3,4}
5. Draw the graphs K5, C7, W6, K3,5, Q2, Q3.
K5

C7

W6
K3,5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy