0% found this document useful (0 votes)
47 views6 pages

Backward Reasoning: The Foundations: Logic and Proofs

The document provides an example of backward reasoning to solve a game theory problem. It shows that the first player can always win a game where two players take turns removing 1-3 stones from a pile of 15 stones by working backwards from the end state. It then discusses several rules of inference for propositional logic: modus ponens, modus tollens, hypothetical syllogism, disjunctive syllogism, and addition. Diagrams are provided to illustrate the corresponding tautologies for each rule of inference.

Uploaded by

SamJaiswal
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)
47 views6 pages

Backward Reasoning: The Foundations: Logic and Proofs

The document provides an example of backward reasoning to solve a game theory problem. It shows that the first player can always win a game where two players take turns removing 1-3 stones from a pile of 15 stones by working backwards from the end state. It then discusses several rules of inference for propositional logic: modus ponens, modus tollens, hypothetical syllogism, disjunctive syllogism, and addition. Diagrams are provided to illustrate the corresponding tautologies for each rule of inference.

Uploaded by

SamJaiswal
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
You are on page 1/ 6

8/21/2018

Backward Reasoning
Example: Suppose that two people play a game taking turns removing, 1, 2, or 3 stones at a
time from a pile that begins with 15 stones. The person who removes the last stone wins
The Foundations: Logic and Proofs the game. Show that the first player can win the game no matter what the second player
Chapter 1, Part III: Proofs-a does.
Proof: Let n be the last step of the game.
Step n: Player1 can win if the pile contains 1,2, or 3 stones.
MCA-105 Step n-1: Player2 will have to leave such a pile if the pile that he/she is faced with has 4 stones.
Step n-2: Player1 can leave 4 stones when there are 5,6, or 7 stones left at the beginning of his/her
Discrete Mathematical Structures turn.

Session: 2017-18 Step n-3: Player2 must leave such a pile, if there are 8 stones .
Step n-4: Player1 has to have a pile with 9,10, or 11 stones to ensure that there are 8 left.
Odd Semester Step n-5: Player2 needs to be faced with 12 stones to be forced to leave 9,10, or 11.
Step n-6: Player1 can leave 12 stones by removing 3 stones.
Compiled By: Now reasoning forward, the first player can ensure a win by removing 3
Dr. Sarika Jain 2
stones and leaving 12.
Most of the slides have been taken from Discrete Mathematics and its Applications, Kenneth H. Rosen, McGraw-Hill Education

Rules of Inference for Propositional


Revisiting the Socrates Example Logic: Modus Ponens
 We have the two premises:
 “All men are mortal.”
Corresponding Tautology:
 “Socrates is a man.” (p ∧ (p →q)) → q
 And the conclusion:
 “Socrates is mortal.”
 How do we get the conclusion from the premises?
Example:
Let p be “Weather is good.”
Let q be “I will study discrete math.”

“If weather is good, then I will study discrete math.”


“Weather is good.

“Therefore , I will study discrete math.”


3 4

Modus Tollens Hypothetical Syllogism

Corresponding Tautology: Corresponding Tautology:


(¬q∧(p →q))→¬p ((p →q) ∧ (q→r))→(p→ r)

Example:
Example: Let p be “it snows.”
Let p be “Weather is good. Let q be “I will study discrete math.”
Let q be “I will study discrete math.” Let r be “I will get an A.”

“If weather is good, then I will study discrete math.” “If it snows, then I will study discrete math.”
“I will not study discrete math.” “If I study discrete math, I will get an A.”

“Therefore , Weather is not good.” “Therefore , If it snows, I will get an A.”


5 6

1
8/21/2018

Disjunctive Syllogism Addition

Corresponding Tautology: Corresponding Tautology:


(¬p∧(p ∨q))→q p →(p ∨q)

Example:
Example:
Let p be “I will study discrete math.”
Let p be “I will study discrete math.”
Let q be “I will visit Las Vegas.”
Let q be “I will study English literature.”
“I will study discrete math.”
“I will study discrete math or I will study English literature.”
“I will not study discrete math.”
“Therefore, I will study discrete math or I will visit
Las Vegas.”
“Therefore , I will study English literature.”
7 8

Simplification Conjunction

Corresponding Tautology:
Corresponding Tautology: ((p) ∧ (q)) →(p ∧ q)
(p∧q) →p

Example:
Example: Let p be “I will study discrete math.”
Let p be “I will study discrete math.” Let q be “I will study English literature.”
Let q be “I will study English literature.”

“I will study discrete math and English literature” “I will study discrete math.”
“I will study English literature.”
“Therefore, I will study discrete math.”
“Therefore, I will study discrete math and I will study English
literature.”
9 10

Resolution Valid Arguments


Resolution plays an important role in AI
and is used in Prolog.
Example 1: From the single proposition
Corresponding Tautology:
((¬p ∨ r ) ∧ (p ∨ q)) →(q ∨ r)
Show that q is a conclusion.
Solution:
Example:
Let p be “I will study discrete math.”
Let r be “I will study English literature.”
Let q be “I will study databases.”

“I will not study discrete math or I will study English literature.”


“I will study discrete math or I will study databases.”

“Therefore, I will study databases or I will study English literature.”


11 12

2
8/21/2018

Valid Arguments Valid Arguments


Example 2:
 With these hypotheses:
3. Construct the Valid 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 a canoe trip.”
“If we take a canoe trip, then we will be home by sunset.”
 Using the inference rules, construct a valid argument for the conclusion:
“We will be home by sunset.”
Solution:
1. Choose propositional variables:
p : “It is sunny this afternoon.” r : “We will go swimming.” t : “We will be home by sunset.”
q : “It is colder than yesterday.” s : “We will take a canoe trip.”
2. Translation into propositional logic:

13 14

Fallacies Little Reminder


 There are three common mistakes (at least..). These are  Affirming the antecedent: Modus ponens
known as fallacies (p  (p  q))  q
1. Fallacy of affirming the conclusion  Denying the consequent: Modus Tollens
(q  (p  q))  p (q  (p  q))  p
2. Fallacy of denying the hypothesis  Affirming the conclusion (consequent): Fallacy
(p  (p  q))  q
(q  (p  q))  p
3. Circular reasoning. Here you use the conclusion as an
assumption, avoiding an actual proof  Denying the hypothesis (antecedent): Fallacy
(I know the Bible is true. Bible told me that.) (p  (p  q))  q

15 16

Universal Instantiation (UI) Universal Generalization (UG)

Example:

Our domain consists of all dogs and Fido is a dog. Used often implicitly in Mathematical Proofs.
“All dogs are cuddly.”

“Therefore, Fido is cuddly.”

17 18

3
8/21/2018

Existential Instantiation (EI) Existential Generalization (EG)

Example: Example:

“There is someone who got an A in the course.” “Michelle got an A in the class.”
“Let’s call her a and say that a got an A” “Therefore, someone got an A in the class.”

19 20

Using Rules of Inference Using Rules of Inference


Example 1: Construct a valid argument to show that Example 2: Construct a valid argument showing that the conclusion
“John Smith has two legs” “Someone who passed the first exam has not read the book.”
is a consequence of the premises:
follows from the premises
“Every man has two legs.” “John Smith is a man.”
“A student in this class has not read the book.”
Solution: Let M(x) denote “x is a man” and L(x) “ x has two legs” and
let John Smith be a member of the domain. “Everyone in this class passed the first exam.”
Valid Argument: Solution: Let C(x) denote “x is in this class,” B(x) denote “ x has read
the book,” and P(x) denote “x passed the first exam.”
First we translate the premises and conclusion
into symbolic form.

21 22

Using Rules of Inference Returning to the Socrates Example


Valid Argument:

23 24

4
8/21/2018

Solution for Socrates Example Universal Modus Ponens

Valid Argument Universal Modus Ponens combines universal


instantiation and modus ponens into one rule.

This rule could be used in the Socrates example.


25 26

Example of proof
PRACTICE  Rosen, section 1.5, question 4
 Given the hypotheses:
 “If it does not rain or if it is not foggy, (¬r  ¬f) →
then the sailing race will be held and the (s  l)
lifesaving demonstration will go on”
 “If the sailing race is held, then the trophy
will be awarded”
s→t
 “The trophy was not awarded”
 Can you conclude: “It rained”? ¬t
r
27 28

Example of proof Example


 Show that “A car in the garage has an engine problem” and “Every car in the
1. ¬t 3rd hypothesis garage has been sold” imply the conclusion “A car that has been sold has an
2. s→t 2nd hypothesis engine problem”
3. ¬s Modus tollens using steps 2 & 3  Let
4. (¬r¬f)→(sl) 1st hypothesis  G(x): “x is in the garage”
 E(x): “x has an engine problem”
5. ¬(sl)→¬(¬r¬f) Contrapositive of step 4
 S(x): “x has been sold”
6. (¬s¬l)→(rf) DeMorgan’s law and double negation law  Let UoD be the set of all cars
7. ¬s¬l Addition from step 3  The premises are as follows:
8. rf Modus ponens using steps 6 & 7  x (G(x)  E(x))

9. r Simplification using step 8  x (G(x)  S(x))

p q  The conclusion we want to show is: x (S(x)  E(x))


pq p pq pq
29 q pq p  p 30

5
8/21/2018

Solution
1. x (G(x)  E(x)) 1st premise
2. (G(c)  E(c)) Existential instantiation of (1)
3. G(c) Simplification of (2)
4. x (G(x)  S(x)) 2nd premise
5. G(c)  S(c) Universal instantiation of (4)
6. S(c) Modus ponens on (3) and (5)
7. E(c) Simplification from (2)
8. S(c)  E(c) Conjunction of (6) and (7)
9. x (S(x)  E(x)) Existential generalization of (8)

31

You might also like