Вы находитесь на странице: 1из 2

Department of Computer Engineering, KITRC 1710410- Introduction to Artificial Intelligence (ME-II (CSE, CE)) Practical List All programs

are to be prepared and executed in SWI prolog environment.


1. Write a program which contains three predicates: male, female, parent. Make rules for following family relations: father, mother, grandfather, grandmother, brother, sister, uncle, aunt, nephew and niece. 2. Write a program that list four addresses in a label form, each address should list a name, one-line address, city, state & pin-code. 3. Write a program for diagnosis the childhood diseases. 4. Write a program to demonstrate the effective use of Cut and Fail. 5. Write a program to find roots of quadratic equation. (consider all possible cases) 6. Write a program to find minimum & maximum from give Numbers. 7. Write a program to solve Water-Jug Problem. 8. Write a program to find factorial of given number. 9. Write a program to input user name and password from user and repeatedly asking if any one of them is wrong. 10. Write a program to implement Tower Of Hanoi Problem. 11. Write a menu driven program to display set of questions to user and give answer of selected question. For Ex. Q-1. Who likes apple? Q-2. Does anybody like apple? Q-3. Is it true that nobody likes apple? Q-4. Who likes apple as well as enjoys playing cricket and piano? Q-5. Does anybody play at least one instrument? Q-6. Who likes to play chess, drink buttermilk but does not play any instrument? Q-7. Who share at least one hobby and at least one instrument? Q-8. Who are the persons sharing common instruments but no hobbies are in common? Enter Question No For Ans :: 4. jolly false. 12. Write a program for traveling salesman problem. 13. Write a PROLOG program based on list: (a). To find the length of a list. (b). To sum all numbers of list. (c). To find whether given element is a member of a list. (d). To Append the list. (e). To Reverse the list. (f). To find the last element of a list.
Page 1 of 2

14. 15. 16. 17.

(g). To delete the first occurrence of an element from a list. (h). To delete the every occurrence of an element from a list. (i). To find Nth element from the list. (j). Given are two lists, merge the element present at odd numbered locations in given two lists into third list, and merge the element present at even numbered locations in given two lists into fourth list and display all four lists. Write a program for monkey banana problem. Write a program N-QUEEN problem. Write a program to solve classic farmer-goat-cabbage problem. Write a program to solve zebra problem.

Web Links for Prolog Help


http://www.inf.ed.ac.uk/teaching/courses/aipp/ http://www.fcss.ukma.kiev.ua/courses/IN.B.09/VIP52PE/HTML/vipexamples/pdci ndex.htm

Page 2 of 2

Вам также может понравиться