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/ 3
UNIVERSITY EXAMINATIONS: 2022/2023
EXAMINATION FOR THE DEGREES OF BACHELOR OF SCIENCE IN
APPLIED COMPUTING/ BACHELOR IN SOFTWARE DEVELOPMENT BAC 3102/ BSD 3102: ARTIFICIAL INTELLIGENCE PROGRAMMING FULLTIME/ PART TIME ORDINARY EXAMINATION DATE: APRIL, 2023 TIME: 2 HOURS
INSTRUCTIONS: Question ONE is COMPULSORY, Choose TWO Other Questions
QUESTION ONE (20 MARKS)
(a) Define the following terms as used in knowledge-based systems. (2 marks) (i) Knowledge (ii) Expert system (b) Write the following acronyms in full as used in AI programming. (i) PROLOG (1 mark) (ii) LISP (1 mark) (c) Explain the following terms of as used in PROLOG language (i) Predicate (2 marks) (ii) Clauses (2 marks) (iii) Goal (2 marks) (d) Give FOUR features/ characteristics of PROLOG that make it suitable for artificial intelligence programming. (4 marks) (e) Represent the following sentences in first order logic. (6 marks) i. All men are mortal ii. No man buys an expensive policy iii. Every market has a mad man QUESTION TWO (15 MARKS) (a) Using a well labeled diagram explain Expert system development team. (5 marks) (b) Write a prolog program to read and print an input item (5 marks) (c) Write a Prolog program to test the input number is odd or even (5 marks)
QUESTION THREE (15 MARKS)
(a) Distinguish between forward chaining and backward chaining. (2 marks) (b) Consider the following system of rules and facts, where the variable x stands for a patient, “red_spots(x)” stands for “patient x has red spots”, and so forth. IF: fever(x) & red_spots(x) THEN: measles(x) IF: measles(x) THEN: contagious(x) IF: runny_nose(x) THEN: cold(x) IF: cold(x) THEN: contagious(x) IF: fever(x) & stiff_neck(x) THEN: meningitis(x) IF: meningitis(x) THEN: contagious(x) IF: contagious(x) & dangerous(x) THEN: isolated(x) IF: meningitis(x) THEN: dangerous(x) Initial facts: runny_nose (mary), stiff_neck (john), fever (john), red_spots (mary), fever (mary) i) What can be derived from this knowledge base by forward reasoning? Illustrate. (6 marks) ii) Using backward chaining determine if we need to isolate John. (7 marks)
QUESTION FOUR (15 marks)
(a) Draw a semantic network for the following scenario. (10 marks) Pulco is a capulco Herb is a tuna Alahandro is a tuna All Tunas eat fishes All capulcos are cats All cats eat all types of fishes (b) Outline the components of a knowledge base. (5 marks)
QUESTION FIVE (15 marks)
(a) Using an illustration briefly explain the Turing test. (5 marks) (b) Define the term learning agents and explain the function of learning agents in education. (5 marks) (c) Write a Prolog program to print a list of characters such as list(['a','b','c'],['d','e','f']]) where the resuly is:- abcdef (5 marks)