You are on page 1of 11

MCA: Ist

MCA104: DISCRETE MATHEMATICS

Shambhu Sharan Srivastava


Associate Professor,
School of Management Sciences, Varanasi
sssrivastava@smsvarnasi.com
Syllabus Unit – III

1. Propositional:
1.1 Propositions,
1.2 Truth tables,
1.3 Tautology,
1.4 Contradiction,
1.5 Algebra of Propositions,
1.6 Theory of Inference and Natural Detection.
2. Predicate Logic:
2.1 Theory of Predicates,
2.2 First order predicate,
2.3 Predicate formulas,
2.4 Quantifiers,
2.5 Inference theory of predicate logic.

MCA104: Discrete Mathematics


Unit Three

Preposition: Introduction
Propositional logic: Propositional logic (PL) is the simplest form of logic where all the statements
are made by propositions. A proposition is a declarative statement which is either true or false.
It is a technique of knowledge representation in logical and mathematical form.

Example:
a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.
Following are some basic facts about propositional logic:
1. Propositional logic is also called Boolean logic as it works on 0 and 1.
2. In propositional logic, we use symbolic variables to represent the logic, and we can use
any symbol for a representing a proposition, such A, B, C, P, Q, R, etc.
3. Propositions can be either true or false, but it cannot be both.
4. Propositional logic consists of an object, relations or function, and logical connectives.
5. These connectives are also called logical operators.
6. The propositions and connectives are the basic elements of the propositional logic.
7. Connectives can be said as a logical operator which connects two sentences.
8. A proposition formula which is always true is called tautology, and it is also called a valid
sentence.
9. A proposition formula which is always false is called Contradiction.
10. A proposition formula which has both true and false values is called
11. Statements which are questions, commands, or opinions are not propositions such as
"Where is Rohini", "How are you", "What is your name", are not propositions.

Syntax of propositional logic: The syntax of propositional logic defines the allowable sentences
for the knowledge representation. There are two types of Propositions:

MCA104: Discrete Mathematics


1. Atomic Propositions: Atomic propositions are the simple propositions. It consists of a
single proposition symbol. These are the sentences which must be either true or false.

Example:
a) 2+2 is 4, it is an atomic proposition as it is a true fact.
b) "The Sun is cold" is also a proposition as it is a false fact.
2. Compound propositions: Compound proposition: Compound propositions are
constructed by combining simpler or atomic propositions, using parenthesis and logical
connectives.

Example:
a) "It is raining today, and street is wet."
b) "Ankit is a doctor, and his clinic is in Mumbai."

Logical Connectives: Logical connectives are used to connect two simpler propositions or
representing a sentence logically. We can create compound propositions with the help of logical
connectives. There are mainly five connectives, which are given as follows:

1. Negation: A sentence such as P’ is called negation of P. A literal can be either Positive


literal or negative literal.
2. Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a conjunction.

Example: Rohan is intelligent and hardworking. It can be written as,


P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
3. Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction, where
P and Q are the propositions.

Example: "Ritika is a doctor or Engineer",


Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.

MCA104: Discrete Mathematics


4. Implication: A sentence such as P → Q, is called an implica on. Implica ons are also
known as if-then rules. It can be represented as

Example: If it is raining, then the street is wet.


Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
5. Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example If I am
breathing, then I am alive

Example: P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.

Following is the summarized table for Propositional Logic Connectives:

Truth Table: In propositional logic, we need to know the truth values of propositions in all
possible scenarios. We can combine all the possible combination with logical connectives, and
the representation of these combinations in a tabular format is called Truth table. Following are
the truth table for all logical connectives:

MCA104: Discrete Mathematics


Truth table with three propositions: We can build a proposition composing three propositions
P, Q, and R. This truth table is made-up of 8n Tuples as we have taken three proposition symbols.

MCA104: Discrete Mathematics


Precedence of connectives: Just like arithmetic operators, there is a precedence order for
propositional connectors or logical operators. This order should be followed while evaluating a
propositional problem. Following is the list of the precedence order for operators:
Precedence Operators
First Precedence Parenthesis
Second Precedence Negation
Third Precedence Conjunction(AND)
Fourth Precedence Disjunction(OR)
Fifth Precedence Implication
Six Precedence Biconditional
Logical equivalence: Logical equivalence is one of the features of propositional logic. Two
propositions are said to be logically equivalent if and only if the columns in the truth table are
identical to each other.
Let's take two propositions A and B, so for logical equivalence, we can write it as A⇔B. In below
truth table we can see that column for A’∨ B and A→B, are identical hence both are logically
equivalent.

Properties of Operators:
Commutativity: P∧ Q= Q ∧ P, or P ∨ Q = Q ∨ P.
Associativity: (P ∧ Q) ∧ R= P ∧ (Q ∧ R), or (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
Identity element: P ∧ True = P, and P ∨ True= True.
Distributive: P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R). P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
DE Morgan's Law: (P ∧ Q)’ = (P’) ∨ (Q’) and (P ∨ Q)’ = (P’) ∧ (Q’).
Double-negation elimination: ¬ (¬P) = P.

MCA104: Discrete Mathematics


Limitations of Propositional logic: We cannot represent relations like ALL, some, or none with
propositional logic.
Example:
1. All the girls are intelligent.
2. Some apples are sweet.

Propositional logic has limited expressive power.


In propositional logic, we cannot describe statements in terms of their properties or logical
relationships.

Tautology: A tautology is a compound statement which is true for every value of the individual
statements. The word tautology is derived from a Greek word where ‘tauto’ means ‘same’ and
‘logy’ means ‘logic’. A compound statement is made with two more simple statements by using
some conditional words such as ‘and’, ‘or’, ‘not’, ‘if’, ‘then’, and ‘if and only if’. For example, for
any two given statements such as x and y, (x → y) ∨ (y → x) is a tautology.
The simple examples of tautology are;
 Either Mohan will go home or Mohan will not go home.
 He is healthy or he is not healthy
 A number is odd or a number is not odd.

Contradiction: We have already discussed the term tautology, which is true for every value of
the two or more given statements. The contradiction is just the opposite of tautology. When a
compound statement formed by two simple given statements by performing some logical
operations on them, gives the false value only is called a contradiction or in different terms, it is
called a fallacy. If (x → y) ∨ (y → x) is a tautology, then [(x → y) ∨ (y → x)]’ is a fallacy/contradiction.

x y x→y y→x (x → y) ∨ (y → x) [(x → y) ∨ (y → x)]’

T T T T T F

T F F T T F

F T T F T F

MCA104: Discrete Mathematics


F F T T T F

Inverse, Converse, and Contra-positive: if-then (→) is also called a conditional statement. It has
two parts − hypothesis, p and 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”.

Inference theory in discrete mathematics: The interference theory can be described as the
analysis of validity of the formula from the given set of premises.
Structure of an argument: An argument can be defined as a sequence of statements. The
argument is a collection of premises and a conclusion. The conclusion is used to indicate the last

MCA104: Discrete Mathematics


statement, and premises are used to indicate all the remaining statements. Before the
conclusion, the symbol ∴ will be placed. The following syntax is used to show the premises and
conclusion:
Premises: p1, p2, p3, p4, ….., pn
Conclusion: q
If (p1∧ p2 ∧ p3 ∧ p4 ∧ …… ∧ pn) → q indicates a topology, in this case, the argument will be
termed as valid otherwise, it will be termed invalid.
Quantifiers: Quantifiers can be described as a collection of statements used to determine the
truth of elements of a given predicate. It also contains the predicate, which can be described as
a statement used to have a specific number of variables (terms). The quantifiers are basically of
two types, which are described as follows:
Existential quantifiers are indicated by the symbol ∃. In general form, it is represented by words
some, there exits, or at least one.
Universal quantifiers are indicated by the symbol ∀. It is represented by words every, any, all or
each.

Predicate Logic: Predicate Logic deals with predicates, which are propositions, consist of
variables.
A predicate is an expression of one or more variables determined on some specific domain. A
predicate with variables can be made a proposition by either authorizing a value to the variable
or by quantifying the variable.
The following are some examples of predicates.
1. Consider E(x, y) denote "x = y"
2. Consider X(a, b, c) denote "a + b + c = 0"
3. Consider M(x, y) denote "x is married to y."

Quantifier: The variable of predicates is quantified by quantifiers. There are two types of
quantifier in predicate logic - Existential Quantifier and Universal Quantifier.

MCA104: Discrete Mathematics


Existential Quantifier: If p(x) is a proposition over the universe U. Then it is denoted as ∃x p(x)
and read as "There exists at least one value in the universe of variable x such that p(x) is true. The
quantifier ∃ is called the existential quantifier.
There are several ways to write a proposition, with an existential quantifier, i.e.,
(∃x∈A) p(x) or ∃x∈A such that p (x) or (∃x)p(x) or p(x) is true for some x ∈A.
Universal Quantifier: If p(x) is a proposition over the universe U. Then it is denoted as ∀x,p(x)
and read as "For every x∈U,p(x) is true." The quantifier ∀ is called the Universal Quantifier.
There are several ways to write a proposition, with a universal quantifier.
∀x∈A,p(x) or p(x), ∀x ∈A Or ∀x,p(x) or p(x) is true for all x ∈A.

MCA104: Discrete Mathematics

You might also like