• Discrete mathematics is the part of the mathematics devoted to the study of
discrete mathematical concepts.
• It deals with countable, distinct, and separate values (as opposed to
continuous values in calculus).
• It is the foundation of logic, set theory, relations, graphs in Mathematics
and algorithms, programming, and data structures in Computer Science.
Reference books:
1. Kenneth H. Rosen, “Discrete Mathematics and its applications”,Tata McGraw Hill,
V Edition 2003.
2. B.S. Grewal, J. S. Grewal, “Numerical Methods in Engineering and Science”,
Khanna Publishers, 6th edition, 2002.
3. Bernard Kolman, Robert C. Busby, Sharon Ross, “Discrete Mathematical
Structures” III edition, PHI 2001.
Propositional logic
Propositions or Statements:
A proposition or a statement is a declarative sentence (that is, a sentence that declares
a fact) that is either true or false, but not both.
These are statements:
• Telephone numbers in the India have 10 digits.
• The moon is made of cheese.
• 42 is a perfect square.
• Every even number greater than 2 can be expressed as the sum of two primes.
• 3 + 7 = 12
• God exists
And these are not statements:
• Would you like some cake?
• The sum of two squares.
• 1 + 3 + 5 + 7 + · · · + 2n + 1.
• Shut the door, please
• 3 + 𝑥 = 12.
Propositional variables:
• We use alphabets to denote propositional variables (or statement
variables), that is, variables that represent propositions.
• conventional letters used for propositional variables are 𝑝, 𝑞, 𝑟, 𝑠, . . . .
• The truth value of a proposition is true, denoted by T, if it is a true
proposition,
• and the truth value of a proposition is false, denoted by F, if it is a
false proposition.
Simple propositions:
The following propositions are simple statements:
1. The Sun rises in the east.
2. The approximate value of 𝜋 is 3.14.
Compound propositions:
A compound proposition is formed by two or more simple propositions by using logical
connectives “and”, “or” and “not”.
Example: Let 𝑝: The sun is shining today.
𝑞: It is cold.
The compound statement of the simple propositions is
𝑝 𝑎𝑛𝑑 𝑞: The sun is shining today 𝑎𝑛𝑑 it is cold.
Basic logical operators:
We will now introduce the logical operators that are used to form new
propositions from two or more existing propositions. These logical operators are
also called connectives.
1. Negation ∶ If 𝑝 is the statement, the negation of 𝑝 is the statement 𝑛𝑜𝑡 𝑝,
denoted by ~𝑝 𝑜𝑟 ¬𝑝.
The truth value of the negation of 𝑝, ¬𝑝, is the opposite of the truth value of 𝑝.
The truth table for the Negation of the proposition is:
𝑝 ¬𝑝
Example: Let 𝑝: Michael’s PC runs Linux
T F
F T
2. Conjunction: The conjunction of two statements 𝑝 and 𝑞 is the compound
statement “ 𝑝 and 𝑞 ”, denoted by 𝑝 ∧ 𝑞.
The connective “and” is denoted by the symbol ∧.
The conjunction 𝑝 ∧ 𝑞 is true when both 𝑝 and 𝑞 are true and is false otherwise.
The truth table for the Conjunction of the two propositions is:
𝑝 𝑞 𝑝∧𝑞
T T T
T F F
F T F
F F F
Note: In logic the word “but” sometimes is used instead of “and” in a
conjunction.
For example,
Let 𝑝: The sun is shining
and 𝑞: it is raining
𝑝 ∧ 𝑞: “The sun is shining, but it is raining”, is the another way of
saying “The sun is shining and it is raining”.
3. Disjunction: The disjunction of two statements 𝑝 and 𝑞 is the compound
statement “ 𝑝 or 𝑞 ”, denoted by 𝑝 ∨ 𝑞.
The connective “or” is denoted by the symbol ∨.
The disjunction 𝑝 ∨ 𝑞 is false when both 𝑝 and 𝑞 are false and is true otherwise.
The truth table for the Disjunction of the two propositions is:
𝑝 𝑞 𝑝∨𝑞
T T T
T F T
F T T
F F F
4. Exclusive OR (XOR): Let 𝑝 and 𝑞 be two statements. The exclusive or of
𝑝 and 𝑞 , denoted by 𝑝⨁𝑞 , is the proposition that is true when exactly one of 𝑝
and 𝑞 is true and is false otherwise.
The truth table for the exclusive or of the two propositions is:
𝑝 𝑞 𝑝⨁𝑞
T T F
T F T
F T T
F F F
Conditional statements:
Let 𝑝 and 𝑞 be propositions. The conditional statement(or implication)
𝑝 ⟹ 𝑞 (or 𝑝 ⟶ 𝑞) is the compound proposition “if 𝑝, then 𝑞.”
In the conditional statement 𝑝 ⇒ 𝑞,
𝑝 is called the hypothesis (or antecedent or premise) and
𝑞 is called the conclusion (or consequence).
Example: Consider the statement :
p is the statement “Bob gets a 95 on the final,”
and q is the statement “Bob will pass the exam.”
The conditional statement 𝑝 ⇒ 𝑞 is false when 𝑝 is true and 𝑞 is
false, and true otherwise.
Truth table is:
𝑝 𝑞 𝑝⟹𝑞
(𝑝 ⟶ 𝑞)
T T T
T F F
F T T
F F T
Some other terminologies of 𝒑 → 𝒒 are:
“if p, then q”
“p implies q”
“p only if q”
“p is sufficient for q”
“q whenever p”
“q when p”
“q is necessary for p”
“q follows from p”
Converse, Contrapositive and Inverse:
We can form some new conditional statements starting with a conditional
statement 𝑝 ⟹ 𝑞.
The proposition 𝑞⟹𝑝 is called the converse of 𝑝 ⟹ 𝑞.
The proposition ~𝑞 ⟹ ~𝑝 is called the contrapositive of 𝑝 ⟹ 𝑞.
The proposition ~𝑝 ⟹ ~𝑞 is called the inverse of 𝑝 ⟹ 𝑞.
We will see that of these three conditional statements formed from
𝑝 ⟹ 𝑞, only the contrapositive always has the same truth value as
𝑝 ⟹ 𝑞.
Example:
𝑝 ⟶ 𝑞: “If it is raining, then the home team wins”.
Converse(𝒒 ⟶ 𝒑): “If the home team wins, then it is raining”.
Contrapositive(~𝒒 ⟶ ~𝒑):
“If the home team does not win, then it is not raining”.
Inverse (~𝒑 ⟶ ~𝒒):
“If it is not raining, then the home team does not win”.
2. What are the contrapositive, the converse, and the inverse
of the following conditional statements:
(i) A positive integer is a prime only if it has no divisors other
than 1 and itself.
(ii) If it snows tonight, then I will stay at home tomorrow.
Biconditional Statements:
Let 𝑝 and 𝑞 be statements. The compound statement “𝑝 if and
only if 𝑞” is called the equivalence or biconditional statement,
denoted by 𝑝 ⟺ 𝑞 𝑜𝑟 𝑝 ⟷ 𝑞 .
We read 𝑝 ⟺ 𝑞 as, 𝑝 implies 𝑞 and implied by 𝑞.
So Biconditional statements are also called bi-implications.
Biconditional statement is true when 𝑝 and 𝑞 have the same truth values,
and is false otherwise.
Truth table is:
𝑝 𝑞 𝑝⟺𝑞
T T T
T F F
F T F
F F T
Let p and q be the propositions
p : It is below freezing. q : It is snowing.
Write these propositions using p and q and logical connectives (including
negations).
a) It is below freezing and snowing.
b) It is below freezing but not snowing.
c) It is not below freezing and it is not snowing.
d) It is either snowing or below freezing (or both).
e) If it is below freezing, it is also snowing.
f ) Either it is below freezing or it is snowing, but it is not snowing if
it is below freezing.
g) That it is below freezing is necessary and sufficient for it to be
snowing.
Tautology, Contradiction and Contingency:
A statement that is true for all possible values of its propositional
variables is called a tautology.
A statement that is always false is called a contradiction or an
absurdity, and a statement that can be either true or false,
depending on the truth values of its propositional variables, is
called a contingency.
Examples: Compute the truth table of the statement:
𝑝 ⟹ 𝑞 ⟺ ~𝑞 ⟹ ~𝑝 .
𝑝 𝑞 𝑝⟹𝑞 ~𝑞 ~𝑝 ~𝑞 𝑝⟹𝑞
⟹ ~𝑝 ⟺ (~𝑞
⟹ ~𝑝)
T T T F F T T
T F F T F F T
F T T F T T T
F F T T T T T
(a) The statement in the above Example is a tautology.
(b) The statement 𝑝 ∧ ~ 𝑝 is an absurdity. (Verify this.)
(c) The statement (𝑝 ⇒ 𝑞) ∧ (𝑝 ∨ 𝑞) is a contingency.
Logical equivalence of statements:
Two statements (simple or compound) 𝑝 and 𝑞 are said to be
logically equivalent or equivalent if “𝑝 ⟺ 𝑞” is tautology. It is also
denoted by 𝒑 ≡ 𝒒 𝑝 is equivalent to 𝑞 .
Example:
Show that conditional statement 𝑝 ⟹ 𝑞 is equivalent to ¬𝑝 ∨ 𝑞.
Truth table:
𝑝 𝑞 𝑝⟹𝑞 ¬𝑝 ¬𝑝 ∨ 𝑞 𝑝 ⟹ 𝑞 ⟺ ¬𝑝 ∨ 𝑞
T T T F T T
T F F F F T
F T T T T T
F F T T T T
Note: We observe that 𝑝 ⟹ 𝑞 and ¬𝑝 ∨ 𝑞 have the same truth
values for all possible truth values of 𝑝 and 𝑞.
∴ 𝑝 ⟹ 𝑞 ≡ ¬𝑝 ∨ 𝑞.
5. Show that the propositions 𝑝 ∧ 𝑞 ∨ 𝑟 𝑎𝑛𝑑 𝑝 ∧ 𝑞 ∨ 𝑝 ∧ 𝑟 are
equivalent.
6. Show that the following propositions are tautology.
(i) 𝑝 ∧ 𝑝 ⟹ 𝑞 ⟹𝑞
(ii) ~𝑝 ∧ 𝑝 ∨ 𝑞 ⟶𝑞
(iii) 𝑝⟶𝑞 ∧ 𝑞⟶𝑟 ⟶ 𝑝⟶𝑟 .
Problems:
1. Let 𝑝 be the statement “It is cold” and let 𝑞 be “It is raining”. Give
a simple verbal sentence which describe each of the following
statements:
(i) ~𝑝 (ii) 𝑝 ∧ 𝑞 (iii) 𝑝 ∨ 𝑞 (iv) 𝑞 ∨ ~𝑝 (v) 𝑞 ∧ ~𝑝.
Answer: (i) It is not cold.
(ii) It is cold and raining.
(iii) It is cold or it is raining.
(iv) It is raining or it is not cold.
(v) It is raining but not cold.
2. Let 𝑝: “ He is tall ” and 𝑞: He is good looking. Write each of the
following statements in symbolic form using 𝑝 and 𝑞.
(i) He is tall and good looking.
(ii) He is tall but not good looking.
(iii) It is false that he is short or good looking.
(iv) He is neither tall nor good looking.
Answers:
(i) 𝑝 ∧ 𝑞 (ii) 𝑝 ∧ ~𝑞 (iii) ~(~𝑝 ∨ 𝑞) (iv) ~𝑝 ∧ ~𝑞.
3. Show that the propositions ~(𝑝 ∧ 𝑞) and ~𝑝 ∨ ~𝑞 are logically
equivalent.
Solution: Truth table is:
𝑝 𝑞 𝑝∧𝑞 ~(𝑝 ∧ 𝑞) ~𝑝 ~𝑞 ~𝑝 ∨ ~𝑞
T T T F F F F
T F F T F T T
F T F T T F T
F F F T T T T
Since truth values of ~(𝑝 ∧ 𝑞) and ~𝑝 ∨ ~𝑞 are same, they are
logically equivalent.
4. Show that the proposition 𝑝 ∨ 𝑞 ∧ 𝑟 ⟺ 𝑝 ∨ 𝑞 ∧ 𝑝 ∨ 𝑟 is a
tautology.
Solution: Truth table is:
𝑝 𝑞 𝑟 𝑞∧𝑟 𝑝∨ 𝑞∧𝑟 𝑝∨𝑞 𝑝∨𝑟 𝑝∨𝑞 ∧ 𝑝∨𝑟 𝑝∨ 𝑞∧𝑟
⟺ 𝑝∨𝑞 ∧ 𝑝∨𝑟
T T T T T T T T T
T T F F T T T T T
T F T F T T T T T
T F F F T T T T T
F T T T T T T T T
F T F F F T F F T
F F T F F F T F T
F F F F F F F F T
Since truth values of 𝑝 ∨ 𝑞 ∧ 𝑟 ⟺ 𝑝 ∨ 𝑞 ∧ 𝑝 ∨ 𝑟 is true for all values of p, q and r, the
given proposition is a tautology.
Some more problems to workout:
1. Write a truth table to determine whether [𝑝 ∧ 𝑝 ∧ 𝑟 → 𝑠 ] → (𝑟 → 𝑠) is a
tautology.
2. Verify that the proposition 𝑝 ∨∼ (𝑝 ∧ 𝑞)is a tautology.
3. For any two propositions 𝑝, 𝑞,prove that 𝑝 → 𝑞is logically equivalent to (∼ 𝑝) ∨ 𝑞.
4. Show that proposition ∼ (𝑝 ∧ 𝑞)and ∼ 𝑝 ∨∼ 𝑞are logically equivalent.
5. Determine whether [p ( p → q) → q] is a tautology or a contradiction or a
contingency.
6. Write the truth table for [(p→q) (q → r)] → (p→r). Is it a tautology?
7. Write a truth table to determine [𝑝 ∧ ((𝑝 ∧ 𝑟) → 𝑠)] → (𝑟 → 𝑠) whether is a
tautology.
1. Show that the following propositions are tautology.
(i) 𝑝 ∧ 𝑞 ∨ 𝑟 ⟺ 𝑝 ∧ 𝑞 ∨ 𝑝 ∧ 𝑟
(ii) 𝑝 ∨ 𝑞 ∧ 𝑟 ⟺ 𝑝 ∨ 𝑞 ∧ 𝑝 ∨ 𝑟
(ii) 𝑝 ∧ 𝑝 ⟹ 𝑞 ⟹𝑞
2. Show that the propositions (𝑝 ⟷ 𝑞) and (𝑝 ⟶ 𝑞) ∧ (𝑞 ⟶ 𝑝) are equivalent.
3. Prove that: (DeMorgan’s law)
¬ 𝑝 ∧ 𝑞 ≡ ¬𝑝 ∨ ¬𝑞
¬ 𝑝 ∨ 𝑞 ≡ ¬𝑝 ∧ ¬𝑞
Inferences:
To infer is to draw conclusions from premises.
In place of word ‘premises’, you can also put: ‘data’, ‘information’,
‘facts’.
Examples of Inferences:
(1) You see smoke and infer that there is a fire.
(2) You count 19 persons in a group that originally had 20, and you
infer that someone is missing.
The reasoning process may be thought of as beginning with input
(premises, data, etc.) and producing output (conclusions).
Inferences are made on the basis of various sorts of things – data,
facts, information, states of affairs.
Logic correspondingly treats inferences in terms of collections of
statements, which are called arguments.
Logical argument:
An argument is a finite sequence of statements 𝑝1 , 𝑝2 , … , 𝑝𝑛 called
premises (or hypothesis) which lead to another statement 𝑞 is called
conclusion.
Such an argument is valid
if 𝑝1 ∧ 𝑝2 ∧ … ∧ 𝑝𝑛 ⟶ 𝑞 is true
or 𝑝1 ∧ 𝑝2 ∧ … ∧ 𝑝𝑛 ⟶ 𝑞 is a tautology.
In this case, we say that 𝑞 is logically follows from 𝑝1 , 𝑝2 , … , 𝑝𝑛 .
When “ 𝑞 is logically follows from 𝑝1 , 𝑝2 , … , 𝑝𝑛 ” , we can also
write it as:
𝑝1
𝑝2
⋮
𝑝𝑛
∴ 𝑞
This means that, if 𝑝1 is true, 𝑝2 is true,…, 𝑝𝑛 is true, then q is
also true.
Rules of Inference:
Rule 1. Rule of detachment (Modus ponens):
Example:
(1) Lisa wins a 10,000 rupees lottery. (𝑝)
(2) If Lisa wins 10,000 rupees lottery, then Reema will quit her job.
(𝑝 ⟶ 𝑞)
(3) Therefore, Reema will quit her job. (𝑞)
Rule 1. Rule of detachment (Modus ponens):
The tautology 𝒑 ∧ 𝒑 → 𝒒 → 𝒒 is called Modus ponens, or
the Rule of detachment.
The rule will be written in the tabular form as:
𝑝
𝑝 → 𝑞
∴ 𝑞
i.e., 𝑞 is the conclusion for the premises 𝑝 and 𝑝 → 𝑞.
If 𝑝 is true and 𝑝 → 𝑞 is true then the conclusion 𝑞 must be true.
Rule 2. Rule of the Syllogism:
Example 1:
(i) If I work all night on this homework, then I can answer all the
exercises.
(ii) If I answer all the exercises, I will understand the material.
(iii)Therefore, if I work all night on this homework, then I will
understand the material.
𝑝⟶𝑞
𝑞⟶𝑟
∴ 𝑝⟶𝑟
Rule 2. Rule of the Syllogism:
The tautology [ 𝒑 ⟶ 𝒒 ∧ 𝒒 ⟶ 𝒓 ] ⟶ (𝒑 ⟶ 𝒓) is called
Law of the Syllogism, where 𝑝, 𝑞 and 𝑟 are any statements.
It also can be written as: 𝑝⟶𝑞
𝑞⟶𝑟
∴ 𝑝⟶𝑟
Example 2: Consider the following argument:
(i) Rifa is baking a cake.
(ii) If Rifa is baking a cake, then she is not going to driving class.
(iii) If Rifa is not going to driving class, then her father will not buy her
a car.
(iv) Therefore, Rifa’s father will not buy her a car.
Logical implications is: 𝑝∧ 𝑝⟶𝑞 ∧ 𝑞⟶𝑟 ⟶𝑟
Proof of the above implication by using rules of inference:
Method 1:
Steps Reasons
1. 𝑝 Given hypothesis
2. 𝑝⟶𝑞 Given hypothesis
3. 𝑞 From steps 1 & 2 and using Modus ponens
4. 𝑞⟶𝑟 Given hypothesis
5. 𝑟 From steps 3 & 4 and using Modus ponens.
Method 2:
Steps Reasons
1. 𝑝⟶𝑞 Given hypothesis
2. 𝑞⟶𝑟 Given hypothesis
3. 𝑝⟶𝑟 From Rule 2(Hypothetical syllogism) and steps 1 &
2
4. 𝑝 Given hypothesis
5. 𝑟 From Rule 1( Modus ponens) and steps 3 & 4.
Rule 3. Modus Tollens:
Examples 1:
(i) If Linda is an excellent swimmer, then she can work as a lifeguard.
(ii) Linda cann’t work as a lifeguard.
(iii) Therefore, Linda is not an excellent swimmer.
Examples 2:
𝑖 If George does not have eight legs, then he is not a spider.
(ii) George is a spider.
Rule 3. Modus Tollens:
The logical implication of this rule is: 𝒑 ⟶ 𝒒 ∧ ~𝒒 ⟶ ~𝒑 .
It also can be written as: 𝑝⟶𝑞
~𝑞
∴ ~𝑝
Question: Show that the following argument is valid:
𝑝 ⟶ 𝑟 ∧ 𝑟 ⟶ 𝑠 ∧ 𝑡 ∨ ~𝑠 ∧ ~𝑡 ∨ 𝑢 ∧ ~𝑢 ⟶ ~𝑝.
or
𝑝⟶𝑟
𝑟⟶𝑠
𝑡 ∨ ~𝑠
~𝑡 ∨ 𝑢
~𝑢
∴ ~𝑝
Answer:
Steps Reasons
1. 𝑝⟶𝑟 Given hypothesis
2. 𝑟⟶𝑠 Given hypothesis
3. 𝑝⟶𝑠 From Rule 2(Hypothetical syllogism) and steps 1 & 2
4. 𝑡 ∨ ~𝑠 Given hypothesis
5. ~𝑠 ∨ 𝑡 From Commutativity of “∨”.
6. 𝑠⟶𝑡 From the Rule: 𝑝 ⟶ 𝑞 ≡ ~𝑝 ∨ 𝑞
7. 𝑝⟶𝑡 From Rule 2(Hypothetical syllogism) and steps 3 & 6
8. ~𝑡 ∨ 𝑢 Given hypothesis.
9. 𝑡⟶𝑢 Again from the Rule: 𝑝 ⟶ 𝑞 ≡ ~𝑝 ∨ 𝑞
10. 𝑝⟶𝑢 From Rule 2(Hypothetical syllogism) and steps 7 & 9
11. ~𝑢 Given hypothesis
12. ~𝑝 Rule 3(Modus Tollen) and steps 10 & 11.
Rule 4. Rule of Conjunction:
𝑝
𝑞
∴ 𝑝∧𝑞
Example:
(i) Linda is an excellent swimmer.
(ii) Linda can work as a lifeguard
(iii) There fore, Linda is an excellent swimmer and she can work as a
lifeguard.
Rule 5. Rule of disjunctive syllogism:
The logical implication of this rule is: 𝒑 ∨ 𝒒 ∧ ~𝒑 ⟶ 𝒒
𝑝∨𝑞
~𝑝
∴ 𝑞
Example:
(i) It is either raining or sunny.
(ii) It is not raining.
(iii)There fore it is sunny.
Rule 6: Rule of contradiction:
The logical implication of this rule is: ~𝒑 ⟶ 𝑭 ⟶ 𝒑.
~𝑝 ⟶ 𝐹
∴ 𝑝
Example:
The Sun does not rise in the east
Rule 7. Rule of conjunctive simplification:
The logical implication of this rule is: (𝒑 ∧ 𝒒) ⟶ 𝒑 and
(𝒑 ∧ 𝒒) ⟶ 𝒒 .
that is, 𝑝∧𝑞 and 𝑝∧𝑞
∴ 𝑝 ∴ 𝑞
Example:
(i) Reshma is an excellent dancer and she is also a singer.
(ii) Therefore, Reshma is an excellent dancer.
Rule 8: Rule of disjunctive amplification:
The logical implication is: 𝑝 ⟶ 𝑝 ∨ 𝑞.
𝑝
∴ 𝑝∨𝑞
Example:
(i) Linda is an excellent swimmer.
(ii) Linda is an excellent swimmer or she can work as a lifeguard.
Table:
Rules of Inference Tautology Name
𝑝 𝑝 ∧ 𝑝 → 𝑞 → 𝑞 Rule1: Modus ponens
𝑝 → 𝑞
∴ 𝑞
𝑝⟶𝑞 [ 𝑝 ⟶ 𝑞 ∧ 𝑞 ⟶ 𝑟 ] ⟶ (𝑝 ⟶ 𝑟) Rule 2: Hypothetical
𝑞⟶𝑟 syllogism
∴ 𝑝⟶𝑟
𝑝⟶𝑞 𝑝 ⟶ 𝑞 ∧ ~𝑞 ⟶ ~𝑝 Rule 3: Modus Tollen
~𝑞
∴ ~𝑝
Table:
Rules of Tautology Name
Inference
𝑝 [(𝑝) ∧ (𝑞)] ⟶ (𝑝 ∧ 𝑞) Rule 4: Conjunction
𝑞
∴ 𝑝∧𝑞
𝑝 ∨ 𝑞 ∧ ~𝑝 ⟶ 𝑞 Rule 5: Disjunctive
syllogism
Rules of Inference Tautology Name
~𝑝 ⟶ 𝐹 ⟶ 𝑝. Rule 6: Contradiction
(𝑝 ∧ 𝑞) ⟶ 𝑝 Rule 7: Conjunctive
and simplification
(𝑝 ∧ 𝑞) ⟶ 𝑞
and
𝑝 ⟶ 𝑝 ∨ 𝑞. Rule 8: Disjunctive
amplification
1. Write the following argument in symbolic form and then apply the
rules of inference to establish the validity of the argument.
“It is not sunny this afternoon and it is colder than yesterday”.
“We will go swimming only if it is sunny”.
“If we do not go swimming then we will take canoe trip”, and
“if we take a canoe trip, then we will be home by sunset”
lead to the conclusion “We will be home by sunset.”
Solution: Let p: It is sunny this afternoon,
q : It is colder than yesterday,
r : We will go swimming,
s : We will take a canoe trip,
t : We will be home by sunset.
Then the given hypothesis is: ~𝑝 ∧ q
r ⟶ 𝑝 (because it is 𝑟 only if 𝑝)
~𝑟 ⟶ 𝑠
𝑠⟶𝑡
∴ 𝑡
Steps Reasons
1. ~𝑝 ∧ q Given hypothesis
2. ~𝑝 From Rule 7(Conjunctive simplification)
3. r ⟶ 𝑝 Given hypothesis
4. ~r From steps 2 and 3 and Rule 3 (Modus Tollen)
5. ~𝑟 ⟶ 𝑠 Given hypothesis
6. 𝑠 From steps 4 & 5, using Rule 1( Modus ponens)
7. 𝑠⟶𝑡 Given hypothesis
8. 𝑡 From steps 6 & 7 and Rule 1( Modus ponens)
2. Write the following argument in symbolic form and then establish
the validity of the argument using the rules of inference. “If Dominic
goes to the racetrack, then Helen will be mad”. “If Ralph plays cards
all night, then Carmela gets mad”. “If either Helen or Carmela gets
mad, then their lawyer Veronica will be notified”. “Veronica has not
heard from either of these clients”. Consequently, “Dominic did not
make it to the racetrack and Ralph didn’t play cards all night”.
Solution: Consider
Thus symbolic form of the given argument is:
Solution:
Steps Reason
1. q∨s→t Hypothesis
2. ¬t Hypothesis
3. ¬ 𝑞∨𝑠 steps 1 and 2 and Modus tollen
4. ¬q ∧ ¬s step 3 and DeMorgan’s law
5. ¬q step 4 and conjunctive simplification
6. p→q Hypothesis
7. ¬p steps 5 & 6 and Modus tollen
8. ¬s step 4 and conjunctive simplification
9. r→s Hypothesis
10. ¬r steps 8 & 9 and Modus tollen
11. ¬p ∧ ¬r steps 7 and 10 and conjunction(Rule 4)
Problems: Establish the validity of the followings:
3.
4. 𝑝⟶𝑟
~𝑝 ⟶ 𝑞 or [(𝑝 ⟶ 𝑟) ∧ ~𝑝 ⟶ 𝑞 ∧ 𝑞 ⟶ 𝑠 ] ⟶ (~𝑟 ⟶ s)
𝑞⟶𝑠
∴ ~𝑟 ⟶ s
Answer:
Steps Reasons
1. ~𝑝 ⟶ 𝑞 Given hypothesis
2. 𝑞⟶𝑠 Given hypothesis
3. ~𝑝 ⟶ 𝑠 From Rule 2(Hypothetical syllogism) and steps 1 & 2
4. 𝑝⟶𝑟 Given hypothesis
5. ~𝑟 ⟶ ~𝑝 From the Rule 𝑝 ⟶ 𝑞 ≡ ~𝑞 ⟶ ~𝑝
6. ~𝑟 ⟶ 𝑠 From Rule 2(Hypothetical syllogism)and steps 5 and 3.
5. [ ~𝑝 ∨ ~𝑞 ⟹ 𝑟 ∧ 𝑠 ∧ 𝑟 ⟹ 𝑡 ∧ ~𝑡] ⟹ 𝑝
It is also can be written as:
~𝑝 ∨ ~𝑞 ⟹ 𝑟 ∧ 𝑠
𝑟⟹𝑡
~𝑡
∴ 𝑝
Answer:
Steps Reasons
1. 𝑟⟶𝑡 Given hypothesis
2. ~𝑡 Given hypothesis
3. ~𝑟 From Rule 3(Modus Tollen) and steps 1 & 2
4. ~𝑟 ∨ ~𝑠 From Rule 8(Disjunctive amplification)
5. ~(𝑟 ∧ 𝑠) From De’ Morgan’s law
6. ~𝑝 ∨ ~𝑞 ⟹ 𝑟 ∧ 𝑠 Given hypothesis
7. ~(~𝑝 ∨ ~𝑞) From Rule 3(Modus Tollen) and step 5 and 6
8. ~ ~p ∧ ~(~𝑞) From De’ Morgan’s law
𝑝∧𝑞 Because ~ ~𝑝 = 𝑝
9. 𝑝 Rule 7(conjunctive simplification) and step 8.
Establish the validity of the followings:
1. 2.
3. Write each of the following argument in symbolic form. Then
establish the validity of the argument or give a counter example to
show that it is invalid.
If Rochelle gets the supervisor’s position and works hard, then
she’ll get a raise. If she gets the raise, then she’ll buy a new car. She
has not purchased a new car. Therefore either Rochell did not get the
supervisor’s position or she did not work hard.
Methods of proof:
1. Proof by direct method :
A direct proof shows that a conditional statement 𝑝 → 𝑞 is true by
showing that if 𝑝 is true, then 𝑞 must also be true, so that the combination
𝑝 true and 𝑞 false never occurs.
In a direct proof, we assume that 𝑝 is true and use axioms, definitions,
and previously proven theorems, together with rules of inference, to
show that 𝑞 must also be true.
Example 1: Give a direct proof of the theorem “If 𝑛 is an odd integer,
then 𝑛2 is odd.
Proof:
Let 𝑝 be the statement “𝑛 is an odd integer” and 𝑞 be “𝑛2 is odd.”
We need to prove that 𝑝 → 𝑞.
Assume that 𝑛 is odd (assume p is true)
By the definition of an odd integer, it follows that 𝑛 = 2𝑘 + 1,
where 𝑘 is some integer.
We want to show that 𝑛2 is also odd.
Consider,
𝑛2 = 2𝑘 + 1 2
= 4𝑘 2 + 4𝑘 + 1 = 2(2𝑘 2 + 2𝑘) + 1.
By the definition of an odd integer, we can conclude that 𝑛2 is an
odd integer
Consequently, we have proved that if 𝑛 is an odd integer, then 𝑛2 is
an odd integer.
2. Proof by indirect method :
Proofs by indirect method(or contraposition) make use of the fact that
the conditional statement 𝑝 → 𝑞 is equivalent to its contrapositive,
¬𝑞 → ¬𝑝.
This means that the conditional statement 𝑝 → 𝑞 can be proved by
showing that its contrapositive, ¬𝑞 → ¬𝑝, is true.
In a proof by contraposition of 𝑝 → 𝑞, we take ¬𝑞 as a premise, and
using axioms, definitions, and previously proven theorems, together with
rules of inference, we show that ¬𝑝 must follow.
Example: 1. Prove that if 𝟑𝒏 + 𝟐 is an odd integer , then n is odd.
Proof: Let 𝑝: 3𝑛 + 2 is an odd integer , q: n is odd
Assume that the conclusion of the “If 3𝑛 + 2 is odd, then n is odd” is
false; that is, assume that 𝑛 is even(~𝑞 is true).
Then, by the definition of an even integer, 𝑛 = 2𝑘 for some integer 𝑘.
Substituting 2𝑘 for 𝑛,
we get, 3𝑛 + 2 = 3(2𝑘) + 2 = 6𝑘 + 2 = 2(3𝑘 + 1).
This tells us that 3𝑛 + 2 is even (because it is a multiple of 2), and
therefore not odd(i.e., ~𝑝), which is a negation of the hypothesis.
Hence we have proved that ~𝑞 → ~𝑝.
Also we know that~𝑞 → ~𝑝 ≡ 𝑝 → 𝑞.
Hence the proof.
3. Proof by contradiction method:
Another important proof technique is proof by contradiction. This
method is based on the tautology (~𝒓 ⟶ 𝑭) → 𝒓 .
Thus the rule of inference,
~𝑟 ⟶ 𝐹
∴ 𝑟 𝑖𝑠 𝑡𝑟𝑢𝑒.
Example: Give a proof by contradiction of the theorem “If 𝟑𝒏 + 𝟐 is odd, then 𝒏 is odd.”
Solution: Let p be “3𝑛 + 2 is odd” and 𝑞 be “𝑛 is odd.”
To construct a proof by contradiction,
assume that both 𝑝 and ¬𝑞 are true.
That is, assume that 3𝑛 + 2 is odd and that 𝑛 is not odd.
Because 𝑛 is not odd, we know that it is even.
Because n is even, there is an integer 𝑘 such that 𝑛 = 2𝑘.
This implies that 3𝑛 + 2 = 3 2𝑘 + 2 = 6𝑘 + 2 = 2 3𝑘 + 1 .
Because 3𝑛 + 2 is 2𝑡, where 𝑡 = 3𝑘 + 1, 3𝑛 + 2 is even.
Note that the statement “3𝑛 + 2 is even” is equivalent to the statement
¬𝑝, because an integer is even if and only if it is not odd.
Because both 𝑝 and ¬𝑝 are true, we have a contradiction.
This completes the proof by contradiction, proving that if 3𝑛 + 2 is
odd, then 𝑛 is odd.
[Link] Indirect proof and proof by contradiction for the statement; “If m
is an even integer m+7 is odd”.
Answer: Let 𝑝: 𝑚 𝑖𝑠 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 and 𝑞 ∶ 𝑚 + 7 𝑖𝑠 𝑜𝑑𝑑
Indirect proof: Assume ~𝑞, that is 𝑞 is false or 𝑚 + 7 is not an odd
number, hence it an even number.
Then 𝑚 + 7 = 2𝑘
⇒ 𝑚 = 2𝑘 − 7 = 2𝑘 − 8 + 1 = 2 𝑘 − 4 + 1 is an odd number,
that prove that ~𝑝 is true. That is ~𝑞 ⇒ ~𝑝.
Proof by contradiction:
Assume 𝑝 is true. Also assume 𝑞 is not true, that is 𝑚 + 7 is not an
odd ( assuming ~𝑞 is true)
Then, 𝑚 + 7 = 2 ⇒ 𝑚 = 2𝑘 − 7 = 2𝑘 − 8 + 1 = 2 𝑘 − 4 + 1 is
an odd number.
Which is a contradiction to the assumption 𝑝 is true.
Thus the our assumption 𝑚 + 7 is not an odd number is wrong.
[Link] that 2 is an irrational number.
Answer: Assume that 2 is not an irrational number,
that is, 2 should is a rational number,
then there exist 2 integers 𝑎 and 𝑏 such that,
𝑎
2 = , where 𝑏 ≠ 0,
𝑏
and 𝑎 and 𝑏 have no common factors
(so that the fraction 𝑎/𝑏 is in lowest terms.)
2 𝑎2
Now, 2 =
𝑏2
⇒ 2𝑏 2 = 𝑎2
⇒ 𝑎2 is an even number and hence 𝑎 is also even number.
Say 𝑎 = 2𝑘1 , then 2𝑏 2 = 4𝑘12
⇒ 𝑏 2 𝑖𝑠 𝑎𝑙𝑠𝑜 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑛𝑢𝑚𝑏𝑒𝑟 and
hence 𝑏 is an even number. Say 𝑏 = 2𝑘2 .
𝑎 2𝑘1 𝑘1
So, = = which is contradiction to the fact 𝑎/𝑏 is
𝑏 2𝑘2 𝑘2
in lowest term. Thus our assumption 2 is rational number is wrong.
4. Proof by Mathematical induction:
Let 𝑃(𝑛) be a statement defined for all integers 𝑛 ≥ 𝑛0 , where 𝑛0
is some fixed integer.
If we can prove that
(i) 𝑃 𝑛0 is true.
(ii) If 𝑝(𝑘) is true for some 𝑘 > 𝑛0 , then 𝑝 𝑘 + 1 must also be
true.
Then 𝑃(𝑛) is true for all 𝑛 ≥ 𝑛0 .
This result is called principle of mathematical Induction.
The step (i) is called the basis step, while (ii) is called the inductive
step.
The assumption in step(ii) is also called the inductive hypothesis.
In this step, we show that the implication 𝑃(𝑘) ⟶ 𝑃 𝑘 + 1 is a
tautology, that is, if 𝑃(𝑘) is true, then 𝑃 𝑘 + 1 is also true.
Hence the conclusion 𝑃(𝑛) is true for all 𝑛 ∈ ℕ.
Ex. 1: Prove by mathematical induction that the sum of the first 𝑛 odd natural
number is 𝑛2 .
Solution: Let 𝑃 𝑛 : 1 + 3 + 5 + ⋯ + 2𝑛 − 1 = 𝑛2 for 𝑛 ≥ 1.
Clearly, 𝑃 1 = 1 = 12 is true.
Now, assume that the statement is true for 𝑛 = 𝑘, 𝑘 ≥ 1.
that is, 𝑃 𝑘 = 1 + 3 + 5 + ⋯ + 2𝑘 − 1 = 𝑘 2
Hence, 𝑃 𝑘 + 1 = 1 + 3 + 5 + ⋯ + 2𝑘 − 1 + 2𝑘 + 1
= 𝑘 2 + 2𝑘 + 1
𝑃 𝑘 + 1 = 1 + 3 + ⋯ + 2k + 1 = 𝑘 2 + 2𝑘 + 1 = 𝑘 + 1 2 ,
which shows that the statement 𝑃(𝑛) is true for 𝑛 = 𝑘 + 1.
Hence, by the principle of mathematical induction 𝑃 𝑛 ,
that is, 1 + 3 + 5 + ⋯ + 2𝑛 − 1 = 𝑛2 is true for all natural numbers n.
Ex. 2: Prove by mathematical induction that: 1 + 2 + 22 + 23 + ⋯ + 2𝑛 = 2𝑛+1 − 1
Solution: Let 𝑃 𝑛 = 1 + 2 + 22 + 23 + ⋯ + 2𝑛 = 2𝑛+1 − 1
Clearly, 𝑃 1 = 1 + 21 = 3 = 22 − 1 = 21+1 − 1. Thus, 𝑃 1 is true.
Assume that 𝑃 𝑘 is true. For 𝑘 ∈ ℕ, 𝑘 ≥ 1.
That is, 𝑃 𝑘 = 1 + 2 + 22 + 23 + ⋯ + 2𝑘 = 2𝑘+1 − 1
Now, 𝑃 𝑘 + 1 = 1 + 2 + 22 + ⋯ + 2𝑘 + 2𝑘+1 = 2𝑘+1 − 1 + 2𝑘+1 = 2.2𝑘+1 − 1
= 2𝑘+2 − 1, which shows that the statement 𝑃(𝑛) is true for 𝑛 = 𝑘 + 1.
Hence, by mathematical induction 𝑃 𝑛 is true for all natural numbers n.
3. Prove the followings by mathematical induction:
2 2 2 𝑛 𝑛+1 2𝑛+1
(i) 1 + 2 + ⋯ + 𝑛 =
6
𝑛 𝑛+1 2
3 3 3
(ii) 1 + 2 + ⋯ + 𝑛 =
2
4. Use mathematical induction to prove that the number 5𝑛 + 2. 3𝑛−1 + 1 is a multiple of 8
for every nonnegative integer n.
5. Prove by using mathematical induction that 𝑛! ≥ 2𝑛−1 for all 𝑛 ≥ 1.