Professional Documents
Culture Documents
Mca104 3
Mca104 3
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.
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:
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:
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:
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.
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.
T T T T T F
T F F T T F
F T T F 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”.
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
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.