Mada za sehemu hiiLogicMada 5
A negation is a sentence which has an opposite truth value to the given one.
One way of forming a negation is to put the word "not" with a verb.
Example: 6 is divisible by 3
6 is not divisible by 3
It is not true that 6 is divisible by 3
It is false that 6 is divisible by 3
Given a statement , its negation is denoted
The complement of is
Truth table for negation
| P | ~P |
|---|---|
| T | F |
| F | T |
Another word used to combine sentences is the word "or".
Consider the sentence
i) ii)
Combining them with the word "or" i.e. or
The connective word "or" is called a disjunction and is symbolized by ""
The truth value for disjunction is only false when both the components are false.
If and are statements, then or is symbolized as
has a truth value false in one case when both and are false.
Truth table for disjunction
| P | Q | P ∨ Q |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
These are statements of the form "if……..then……"
Example. If a quadrilateral is a parallelogram then the pair of opposite sides are parallel.
The phrase "a quadrilateral is a parallelogram" is called hypothesis or antecedent.
The phrase "the pair of opposite sides are parallel" is called a conclusion or consequent.
If hypothesis
conclusion
Then the statement if then is an implication, in short we write
Consider the statement
If then T
If then T If hypothesis is T and conclusion is F then F then the implication is T
Note: The compound statement is false only in one case is true and is false.
Truth table for
| P | Q | P → Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
Propositions which carry the same meaning as if then
- If ,
- if
- provided that
- only if
- is a sufficient condition for
- is a necessary condition for
-
Determine the truth values of the following
-
If then T
-
If then T
-
If then F
-
If then T
-
Find the components of the following compound
i) If then
ii) only if
iii) If Galileo was born before Descartes then Newton was born before Shakespeare
-
Galileo was born before Descartes
-
Newton was born before Shakespeare
-
Write a truth table for
i) ii) iii)
Solutions
i)
| P | Q | P ∧ Q | P ∨ Q | (P ∧ Q) ∨ (P ∨ Q) |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | T | T |
| F | T | F | T | T |
| F | F | F | F | F |
ii)
| P | Q | P → Q | (P → Q) ∧ P |
|---|---|---|---|
| T | T | T | T |
| T | F | F | F |
| F | T | T | F |
| F | F | F | F |
iii)
| P | Q | P → Q | (P → Q) → Q |
|---|---|---|---|
| T | T | T | T |
| T | F | F | T |
| F | T | T | T |
| F | F | T | F |
Consider the truth table for
| P | Q | P → Q | Q → P | (P → Q) ∧ (Q → P) |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | T | F |
| F | T | T | F | F |
| F | F | T | T | T |
The statement is known as biconditional statement and is abbreviated as
Truth table for
| P | Q | P ↔ Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
Note: is read if and only if
is true when both and are true or when and are false.
Example. The truth value of if and only if (F)
if and only if (F)
if and only if (T)
if and only if (T)
Given a proposition: if a quadrilateral is a parallelogram then its opposite sides are parallel,
Converse: If the opposite sides are parallel, then the quadrilateral is a parallelogram i.e. .
Contrapositive: If the opposite sides are not parallel, then the quadrilateral is not a parallelogram. i.e.
Inverse: if a quadrilateral is not a parallelogram, then the opposite sides are not parallel i.e.
Truth table for implication, converse, contrapositive, inverse
| P | Q | P → Q | Q → P | ~ P | ~ Q | ~ Q → ~P | ~P → ~ Q |
|---|---|---|---|---|---|---|---|
| T | T | T | T | F | F | T | T |
| T | F | F | T | F | T | F | T |
| F | T | T | F | T | F | T | F |
| F | F | T | T | T | T | T | T |
Column 3 has exactly truth value as column 7
i.e.
Two propositions are logically equivalent if they have exactly the same truth values.
E.g. and are logically equivalent.
Solution: Draw truth for and
| P | Q | P ∨ Q | Q ∨ P |
|---|---|---|---|
| T | T | T | T |
| T | F | T | T |
| F | T | T | T |
| F | F | F | F |
Since column 3 has exactly the same truth values as column 4 then
Questions
Show whether or not the following propositions are logically equivalent
i) ,
| P | Q | P → Q | ~ P | ~ P ∨ Q |
|---|---|---|---|---|
| T | T | T | F | T |
| T | F | F | F | F |
| F | T | T | T | T |
| F | F | T | T | T |
Since column 3 and 5 have exactly the same truth value therefore
ii) ;
| P | Q | P ∨ Q | P → (P ∨ Q) | p → Q |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | T | T | F |
| F | T | T | T | T |
| F | F | F | T | T |
Since column 4 does not have exactly same truth value as column 5 then
iii) :
| P | Q | P → Q | ~ P | ~ P → Q |
|---|---|---|---|---|
| T | T | T | F | T |
| T | F | F | F | T |
| F | T | T | T | T |
| F | F | T | T | F |
Since column 3 does not have exactly same truth values as column 5 therefore
iv) ;
| P | Q | P → Q | Q → P |
|---|---|---|---|
| T | T | T | T |
| T | F | F | T |
| F | T | T | F |
| F | F | T | T |
Since column 3 does not have exactly same truth values as column 4 therefore
v) ;
| P | Q | ~ Q | P → Q | ~ (P → Q) | P ∨ ~Q |
|---|---|---|---|---|---|
| T | T | F | T | F | T |
| T | F | T | F | T | T |
| F | T | F | T | F | F |
| F | F | T | T | F | T |
Since column 5 does not have exactly same truth value as column 6 therefore
vi) ;
| P | Q | ~ P | ~ Q | P ∨ Q | ~ (P ∨ Q) | ~P ∧ ~Q |
|---|---|---|---|---|---|---|
| T | T | F | F | T | F | F |
| T | F | F | T | T | F | F |
| F | T | T | F | T | F | F |
| F | F | T | T | F | T | T |
Since column 6 has exact same truth values as column 7 therefore
Compound statements with three components , , .
Consider the following compound statement,
Triangles have all three sides and either the area of a circular region of radius is or it is false that the diagonals of a parallelogram do not meet.
Solution
(To symbolize the above statement)
Let triangles have three sides
Let circular region of radius is
Let diagonals of parallelogram do not meet
To find the truth values of the above statement
| P | Q | R | ~ R | Q ∨ ~R | P ∧ (Q ∨ ~ R) |
|---|---|---|---|---|---|
| T | T | F | T | T | T |
The statement has a truth value true.
A tautology is a proposition which is always true under all possible truth conditions of its component parts.
Example
Show that whether or not is a tautology
| P | Q | ~ P | ~ Q | P ∧ Q | ~ (P ∧ Q) | ~ P → ~Q | ~ (P ∧ Q) ∨ (~ P → ~Q) |
|---|---|---|---|---|---|---|---|
| T | T | F | F | T | F | T | T |
| T | F | F | T | F | T | T | T |
| F | T | T | F | F | T | F | T |
| F | F | T | T | F | T | T | T |
Since column 8 has all the truth values True (T) therefore it is TAUTOLOGY.
Since column 8 has truth value true throughout then, is a tautology.
Questions
- Show whether the given compound statements are tautology or not
i)
| P | Q | P ∧ Q | (P ∧ Q) → P |
|---|---|---|---|
| T | T | T | T |
| T | F | F | T |
| F | T | F | T |
| F | F | F | T |
Since column 4 has truth value true throughout then is a tautology.
ii)
| P | Q | P ∧ Q | P → (P ∧ Q) |
|---|---|---|---|
| T | T | T | T |
| T | F | F | F |
| F | T | F | T |
| F | F | F | T |
Since column 4 does not have truth value true throughout then is not a tautology.
iii)
| P | ~ P | P → ~P |
|---|---|---|
| T | F | F |
| F | T | T |
Since column 3 does not have the truth value true throughout then
is not a tautology.
iv)
| P | Q | P → Q | ~ P | ~P → Q | (P → Q) → (~ P → Q) |
|---|---|---|---|---|---|
| T | T | T | F | T | T |
| T | F | F | F | T | T |
| F | T | T | T | T | T |
| F | F | T | T | F | F |
Since column 6 does not have the truth value true throughout then is not a tautology.
v)
| P | Q | P → Q | Q → P | (P → Q) ∨ (Q → P) |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | T | T |
| F | T | T | F | T |
| F | F | T | T | T |
Since column 5 has all truth values true throughout then is a tautology.
- Express the following in symbolic form and then find its truth value
i) 2 is a prime, and either 4 is even or it's not true that 5 is even
Solution
Let 2 is a prime
Let 4 is even
Let 5 is even
| P | Q | R | ~ R | Q ∨ ~ R | P ∧ (Q ∨ ~ R) |
|---|---|---|---|---|---|
| T | T | T | F | T | T |
has a truth value true.
ii) 7 is odd, or either London is in France and it is false that Paris is not in Denmark
Let 7 is odd
London is in France
Paris is not in Denmark
| P | Q | R | ~ R | Q ∧ ~R | P ∨ (Q ∧ ~ R) |
|---|---|---|---|---|---|
| T | F | T | F | F | T |
has a truth value True.
- Find the truth values of if
, , all has truth value T
If , , all have truth value of F
If is true, is false and is false
| P | Q | R | ~ R | Q ∨ ~ R | P ∧ (Q ∨ ~ R) |
|---|---|---|---|---|---|
| T | T | T | F | T | T |
| F | F | F | T | T | F |
| T | F | F | T | T | T |
A complete truth table for general cases
- Only one compound — Two rows
| P |
|---|
| T |
| F |
- Two components and — Four rows
| P | Q |
|---|---|
| T | T |
| T | F |
| F | T |
| F | F |
- Three components , , — Eight rows
| P | Q | R |
|---|---|---|
| T | T | T |
| T | T | F |
| T | F | T |
| T | F | F |
| F | T | T |
| F | T | F |
| F | F | T |
| F | F | F |
- Four components , , , — Sixteen rows
| P | Q | R | S |
|---|---|---|---|
| T | T | T | T |
| T | T | T | F |
| T | T | F | T |
| T | T | F | F |
| T | F | T | T |
| T | F | T | F |
| T | F | F | T |
| T | F | F | F |
| F | T | T | T |
| F | T | T | F |
| F | T | F | T |
| F | T | F | F |
| F | F | T | T |
| F | F | T | F |
| F | F | F | T |
| F | F | F | F |
Example constructs a truth table for the compound statement
Mwalimu
Unasoma somo hili? Niulize nikuelezee chochote kilichomo.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu mada hii.
Ingia ili kuuliza