Question
Problem Statement: Tony, Shi-Kuo and Ellen belong to the Hoofers Club. Every member of the Hoofers Club is either a skier or a mountain climber
Problem Statement: Tony, Shi-Kuo and Ellen belong to the Hoofers Club. Every member of the Hoofers Club is either a skier or a mountain climber or both. No mountain climber likes rain, and all skiers like snow. Ellen dislikes whatever Tony likes and likes whatever Tony dislikes. Tony likes rain and snow. Query: Is there a member of the Hoofers Club who is a mountain climber but not a skier?
Convert it into first order logic.
M(x) : x is member of Hoofer Club.
S(x) : x is a Skier
C(x) : x is a Mountain climber
L(x,y) : x likes y
where
x is a member of Hoofer Club
y is either "snow", "rain"
KNOWN STATEMENTS
- M(x) => S(x) V C(x)
- C(x) => ~L(x,Rain)
- S(x) => L(x,Snow)
- L(Ellen,y) <==> ~L(Tony, y)
- L(Tony, Rain)
- L(Tony, Snow)
Consider Statement 4, 5 and 6
L(Ellen,y) <==> ~L(Tony, y) AND L(Tony, Rain) AND L(Tony, Snow)
contrapositive of statement 4
L(Tony, y) <==>~L(Ellen,y)
==> 7. ~L(Ellen,Rain)
==>8. ~L(Ellen,Snow)
By modus ponen
Consider Statement 3 and 8
S(x) => L(x,Snow) and ~L(Ellen,Snow)
Taking contrapositive
~L(x,Snow) ==> ~S(x)
=>9. ~S(Ellen) // Ellen is not a skier
By modus ponen
Consider statements 2 and 5
C(x) => ~L(x,Rain)
Taking Contrapositives
L(x,Rain) => ~C(x)
and
L(Tony, Rain)
=> 10. ~C(Tony) // Tony Not A Mountain Climber
By modus ponen
Consider statements 1 and 9
M(Ellen) => S(Ellen) V C(Ellen) and ~S(Ellen)
and
M(Ellen)
=> S(Ellen) V C(Ellen) and ~S(Ellen)
=> C(Ellen) // Ellen is a Mountain Climber but not skier
Consider statements 1 and 10
M(x) => S(x) V C(x) and ~C(Tony)
and
M(Tony)
=> C(Ellen) // Ellen is a skier but not mountain climber
ANSWER : ELLEN
1.How to turn this logic into prolog and.
2. Write the prolog code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started