0% found this document useful (0 votes)
13 views9 pages

Discrete Mathematics

The document provides an overview of Discrete Mathematics, focusing on key concepts such as sets, relations, functions, propositional logic, and predicate logic. It defines sets, power sets, types of relations, and various logical operations, including connectives and truth tables. Additionally, it discusses normal forms, quantifiers, and well-formed formulas in predicate logic.

Uploaded by

jahansaruar3
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)
13 views9 pages

Discrete Mathematics

The document provides an overview of Discrete Mathematics, focusing on key concepts such as sets, relations, functions, propositional logic, and predicate logic. It defines sets, power sets, types of relations, and various logical operations, including connectives and truth tables. Additionally, it discusses normal forms, quantifiers, and well-formed formulas in predicate logic.

Uploaded by

jahansaruar3
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

Discrete Mathematics

Md. Sohag Hossain


Maintenance Engineer (Principal Officer)
Rajshahi Krishi Unnayan Bank (RAKUB)
Discrete Mathematics is a branch of mathematics involving discrete elements that uses algebra
and arithmetic. It is increasingly being applied in the practical fields of mathematics and computer
science. It is a very good tool for improving reasoning and problem-solving capabilities.
Set - Definition
A set is an unordered collection of different elements. A set can be written explicitly by listing its
elements using set bracket. If the order of the elements is changed or any element of a set is
repeated, it does not make any changes in the set.
Some Example of Sets
 A set of all positive integers
 A set of all the planets in the solar system
 A set of all the states in India
 A set of all the lowercase letters of the alphabet
Power Set
Power set of a set S is the set of all subsets of S including the empty set. The cardinality of a
power set of a set S of cardinality n is 2^n. Power set is denoted as P(S).

Example −

For a set S={a,b,c,d}


let us calculate the subsets –

Subsets with 0 elements − {∅}


(the empty set)

Subsets with 1 element − {a},{b},{c},{d}


Subsets with 2 elements − {a,b},{a,c},{a,d},{b,c},{b,d},{c,d}
Subsets with 3 elements − {a,b,c},{a,b,d},{a,c,d},{b,c,d}
Subsets with 4 elements − {a,b,c,d}
Hence, P(S)=
{{∅},{a},{b},{c},{d},{a,b},{a,c},{a,d},{b,c},{b,d},{c,d},{a,b,c},{a,b,d},{a,c,d},{b,c,d},{a,b,c,
d}}
|P(S)|=2^4=16
Note − The power set of an empty set is also an empty set.

|P({∅})|=2^0=1

Relation:
A binary relation R from set x to y (written as xRy or R(x,y)) is a subset of the Cartesian product
x×y. If the ordered pair of G is reversed, the relation also changes.
Generally an n-ary relation R between sets A1,…, and An is a subset of the n-ary product
A1×⋯×An. The minimum cardinality of a relation R is Zero and maximum is n2 in this case.
A binary relation R on a single set A is a subset of A×A.
For two distinct sets, A and B, having cardinalities m and n respectively, the maximum cardinality
of a relation R from A to B is mn.
Types of Relations
The Empty Relation between sets X and Y, or on E, is the empty set ∅
The Full Relation between sets X and Y is the set X×Y
The Identity Relation on set X is the set {(x,x)|x∈X}
The Inverse Relation R' of a relation R is defined as − R′={(b,a)|(a,b)∈R}
Example − If R={(1,2),(2,3)} then R′ will be {(2,1),(3,2)}
A relation R on set A is called Reflexive if ∀a∈A is related to a (aRa holds)
Example − The relation R={(a,a),(b,b)} on set X={a,b} is reflexive.
A relation R on set A is called Irreflexive if no a∈A is related to a (aRa does not hold).
Example − The relation R={(a,b),(b,a)} on set X={a,b} is irreflexive.
A relation R on set A is called Symmetric if xRy implies yRx, ∀x∈A and ∀y∈A.
Example − The relation R={(1,2),(2,1),(3,2),(2,3)}on set A={1,2,3} is symmetric.
A relation R on set A is called Anti-Symmetric if xRy and yRx implies x=y∀x∈A and ∀y∈A.
Example − The relation R={(x,y)→N|x≤y}is anti-symmetric since x≤y and y≤x implies x=y.
A relation R on set A is called Transitive if xRy and yRz implies xRz,∀x,y,z∈A.
Example − The relation R={(1,2),(2,3),(1,3)} on set A={1,2,3} is transitive.
A relation is an Equivalence Relation if it is reflexive, symmetric, and transitive.
Example − The relation R={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3),(3,2),(1,3),(3,1)} on set A={1,2,3}
is an equivalence relation since it is reflexive, symmetric, and transitive.
Function - Definition
A function or mapping (Defined as f:X→Y) is a relationship from elements of one set X to
elements of another set Y (X and Y are non-empty sets). X is called Domain and Y is called
Codomain of function ‘f’.
Function ‘f’ is a relation on X and Y such that for each x∈X, there exists a unique y∈Y such that
(x,y)∈R. ‘x’ is called pre-image and ‘y’ is called image of function f.
A function can be one to one or many to one but not one to many.
Propositional Logic is concerned with statements to which the truth values, “true” and “false”,
can be assigned. The purpose is to analyze these statements either individually or in a composite
manner.
Prepositional Logic – Definition
A proposition is a collection of declarative statements that has either a truth value "true” or a truth
value "false". A propositional consists of propositional variables and connectives. We denote the
propositional variables by capital letters (A, B, etc). The connectives connect the propositional
variables.
Some examples of Propositions are given below −
"Man is Mortal", it returns truth value “TRUE”
"12 + 9 = 3 – 2", it returns truth value “FALSE”
The following is not a Proposition −
"A is less than 2". It is because unless we give a specific value of A, we cannot say whether the
statement is true or false.
Connectives
In propositional logic generally we use five connectives which are −
OR (∨)
AND (∧)
Negation/ NOT (¬)
Implication / if-then (→)
If and only if (⇔).
OR (∨) − The OR operation of two propositions A and B (written as A∨B) is true if at least any
of the propositional variable A or B is true.
The truth table is as follows −
A B A∨B
True True True
True False True
False True True
False False False

AND (∧) − The AND operation of two propositions A and B (written as A∧B) is true if both the
propositional variable A and B is true.
The truth table is as follows −

A B A∧B
True True True
True False False
False True False
False False False

Negation (¬) − The negation of a proposition A (written as ¬A) is false when A is true and is
true when A is false.
The truth table is as follows −

A ¬A
True False
False True

Implication / if-then (→) − An implication A→B is the proposition “if A, then B”. It is false if
A is true and B is false. The rest cases are true.
The truth table is as follows –
A B A→B
True True True
True False False
False True True
False False True
If and only if (⇔) − A⇔B is bi-conditional logical connective which is true when p and q are
same, i.e. both are false or both are true.
The truth table is as follows −
A B A⇔B
True True True
True False False
False True False
False False True

Tautologies
A Tautology is a formula which is always true for every value of its propositional variables.
Example − Prove [(A→B)∧A]→B is a tautology
The truth table is as follows –
A B A→B (A → B) ∧ A [( A → B ) ∧ A] → B
True True True True True
True False False False True
False True True False True
False False True False True

As we can see every value of [(A→B)∧A]→B is "True", it is a tautology.


Contradictions
A Contradiction is a formula which is always false for every value of its propositional variables
Example − Prove (A∨B)∧[(¬A)∧(¬B)] is a contradiction
The truth table is as follows −

A B A∨B ¬A ¬B (¬ A) ∧ ( ¬ B) (A ∨ B) ∧ [( ¬ A) ∧ (¬ B)]
True True True False False False False
True False True False True False False
False True True True False False False
False False False True True True False

As we can see every value of (A∨B)∧[(¬A)∧(¬B)] is “False”, it is a contradiction.


Contingency
A Contingency is a formula which has both some true and some false values for every value of
its propositional variables.
Example − Prove (A∨B)∧(¬A) a contingency
The truth table is as follows –
A B A∨B ¬A (A ∨ B) ∧ (¬ A)
True True True False False
True False True False False
False True True True True
False False False True False

As we can see every value of (A∨B)∧(¬A) has both “True” and “False”, it is a contingency.
Propositional Equivalences
Two statements X and Y are logically equivalent if any of the following two conditions hold −
The truth tables of each statement have the same truth values.
The bi-conditional statement X⇔Y is a tautology.
Example − Prove ¬(A∨B)and[(¬A)∧(¬B)] are equivalent
Testing by 1st method (Matching truth table)
A B A∨B ¬ (A ∨ B) ¬A ¬B [(¬ A) ∧ (¬ B)]
True True True False False False False
True False True False False True False
False True True False True False False
False False False True True True True

Here, we can see the truth values of ¬(A∨B)and[(¬A)∧(¬B)] are same, hence the statements are
equivalent.
Testing by 2nd method (Bi-conditionality)
A B ¬ (A ∨ B ) [(¬ A) ∧ (¬ B)] [¬ (A ∨ B)] ⇔ [(¬ A ) ∧ (¬ B)]
True True False False True
True False False False True
False True False False True
False False True True True

As [¬(A∨B)]⇔[(¬A)∧(¬B)] is a tautology, the statements are equivalent.


Inverse, Converse, and Contra-positive
Implication / if-then (→) is also called a conditional statement. It has two parts −
Hypothesis, p
Conclusion, q
As mentioned earlier, it is denoted as p→q.
Example of Conditional Statement − “If you do your homework, you will not be punished.”
Here, "you do your homework" is the hypothesis, p, and "you will not be punished" is the
conclusion, q.
Inverse − An inverse of the conditional statement is the negation of both the hypothesis and the
conclusion. If the statement is “If p, then q”, the inverse will be “If not p, then not q”. Thus the
inverse of p→q is ¬p→¬q.
Example − The inverse of “If you do your homework, you will not be punished” is “If you do
not do your homework, you will be punished.”
Converse − The converse of the conditional statement is computed by interchanging the
hypothesis and the conclusion. If the statement is “If p, then q”, the converse will be “If q, then
p”. The converse of p→q is q→p.
Example − The converse of "If you do your homework, you will not be punished" is "If you will
not be punished, you do your homework”.
Contra-positive − The contra-positive of the conditional is computed by interchanging the
hypothesis and the conclusion of the inverse statement. If the statement is “If p, then q”, the
contra-positive will be “If not q, then not p”. The contra-positive of p→q
is ¬q→¬p.
Example − The Contra-positive of " If you do your homework, you will not be punished” is "If
you are punished, you did not do your homework”.
Duality Principle
Duality principle states that for any true statement, the dual statement obtained by interchanging
unions into intersections (and vice versa) and interchanging Universal set into Null set (and vice
versa) is also true. If dual of any statement is the statement itself, it is said self-dual statement.
Example − The dual of (A∩B)∪C is (A∪B)∩C
Normal Forms
We can convert any proposition in two normal forms −
Conjunctive normal form
Disjunctive normal form
Conjunctive Normal Form
A compound statement is in conjunctive normal form if it is obtained by operating AND among
variables (negation of variables included) connected with ORs. In terms of set operations, it is a
compound statement obtained by Intersection among variables connected with Unions.
Examples
 (A∨B)∧(A∨C)∧(B∨C∨D)
 (P∪Q)∩(Q∪R)
Disjunctive Normal Form
A compound statement is in disjunctive normal form if it is obtained by operating OR among
variables (negation of variables included) connected with ANDs. In terms of set operations, it is
a compound statement obtained by Union among variables connected with Intersections.
Examples

 (A∧B)∨(A∧C)∨(B∧C∧D)
 (P∩Q)∪(Q∩R)

Predicate Logic deals with predicates, which are propositions containing variables.
Predicate Logic – Definition
A predicate is an expression of one or more variables defined on some specific domain. A
predicate with variables can be made a proposition by either assigning a value to the variable or
by quantifying the variable.
The following are some examples of predicates −
 Let E(x, y) denote "x = y"
 Let X(a, b, c) denote "a + b + c = 0"
 Let M(x, y) denote "x is married to y"
Well Formed Formula
Well Formed Formula (wff) is a predicate holding any of the following –
 All propositional constants and propositional variables are wffs
 If x is a variable and Y is a wff, ∀xY and ∃xY are also wff
 Truth value and false values are wff
 Each atomic formula is a wff
 All connectives connecting wffs are wffs
Quantifiers
The variable of predicates is quantified by quantifiers. There are two types of quantifier in
predicate logic − Universal Quantifier and Existential Quantifier.
Universal Quantifier
Universal quantifier states that the statements within its scope are true for every value of the
specific variable. It is denoted by the symbol ∀.
∀xP(x) is read as for every value of x, P(x) is true.
Example − "Man is mortal" can be transformed into the propositional form ∀xP(x) where P(x) is
the predicate which denotes x is mortal and the universe of discourse is all men.
Existential Quantifier
Existential quantifier states that the statements within its scope are true for some values of the
specific variable. It is denoted by the symbol ∃.
∃xP(x) is read as for some values of x, P(x) is true.
Example − "Some people are dishonest" can be transformed into the propositional form ∃xP(x)
where P(x) is the predicate which denotes x is dishonest and the universe of discourse is some
people.
Nested Quantifiers
If we use a quantifier that appears within the scope of another quantifier, it is called nested
quantifier.
Example
 ∀ a∃bP(x,y) where P(a,b) denotes a+b=0
 ∀ a∀b∀cP(a,b,c) where P(a,b) denotes a+(b+c)=(a+b)+c
Note − ∀a∃bP(x,y)≠∃a∀bP(x,y).

Discrete Mathematics - Rules of Inference:


https://www.tutorialspoint.com/discrete_mathematics/rules_of_inference.htm
Operators & Postulates:
https://www.tutorialspoint.com/discrete_mathematics/operators_and_postulates.htm

You might also like