Description
ASSIGNMENT-5: PROLOG
(Read all the instructions carefully & adhere to them.)
Total Credit: 20
Instructions:
3. Proper indentation and appropriate comments are mandatory.
4. Make proper documentation of all results and observations with their analysis.
4. You should zip all the required files and name the zip file as: roll_no_of_all_group_members .zip , eg. 1501cs11_1201cs03_1621cs05.zip.
5. Upload your assignment (the zip file) in the following link:
https://www.dropbox.com/request/moo6AtWqPtMw6v48hG1D For any queries regarding this assignment you can contact:
Aizan Zafar ( aizanzafar@gmail.com ) or
Kshitij Mishra ( kmishra.kings@gmail.com )
——————————————————————————————————————————-
Questions
—————————————————————————————————————————-
1. Deduction Theorem
Given an expression, write a program to decide whether it’s a theorem or not.
Steps:
1. Write a parser to isolate the clauses around the implication in the
expressions
Test Cases :
1. (P => Q ) => ((~Q => P) => Q)
2. P => (P V Q)
3. (P ^ Q) => (P V R)
2. Prolog Programing
Q. Write a program in Prolog to represent the following knowledge and find the answer to the given questions
a. Knowledge
A, B and C belong to Himalayan club. Every member in the club is either a mountain climber or skier or both. A likes whatever B dislikes and dislikes whatever B likes. A likes rain and snow. No mountain
climber likes rain. Every skiers likes snow
Question : Is there a member who is a mountain climber but not a skier?
Reviews
There are no reviews yet.