Sample Exam




Sample Exam










Computer Science 456: Artificial Intelligence and Expert Systems
Through PrologPractice Final Exam


Note: This practice test is intended to be a final exercise,
done just prior to your writing the final exam, and after you have
completed all units of the course. It does not count towards your mark and
is optional. As it contains questions of a similar type, content, and
level of difficulty to the final it is highly recommended that you attempt
it to gauge your readiness and help you prepare for the final exam. Your
results are not sent to your tutor.



The actual final exam consists of around 16 questions.

Develop a PROLOG program to append two lists X, Y into Z.

Develop a PROLOG program to reverse a list X into list Y.

Develop a PROLOG program that reads an integer X and a list of
integers Y, then locates the position of X into Y.

Develop a PROLOG program that reads a list of integers Y, and an
integer X and finds if X = the multiplication of elements of Y.

Develop a PROLOG program that examines if a list Y have identical
elements (i.e. all its elements are the same).

Suppose the majority of students in Athabasca University are
canadians or perminant residents, married, working, and are > 20
years of age and < 45 years. Define a PROLOG program having predicate
out-of-majority (X), which when the goal ? out_of_majority(marry) is
given, it will succeed only if 'marry' fails one of the conditions for a
student of the majority. Use the CUT to ensure that there is no
unnecessary backtracking.

Develop a PROLOG menu module that asks the user to answer T / t (for
true) or F / f (for false) and checks for the character entered. (Assume
that ASCII of 89 = T, ASCII of t = 116, ASCII of 70 = F, ASCII of 102 =
f)

Develop a PROLOG program that selects three courses names from six
at random. Program clauses include data about six courses (for each
course: number, name, instructor - you may add more characteristics if
needed by your program). The goal is to select 3 courses names at random
(i.e. goal: ? random_course(3)).

Use 'findall' (or equivalent depending on your PROLOG version -
findall is used to collect values obtained from backtracking into a
list) in a goal to calculate the average of marks of a student in some
courses. The calculation of the average should also be included in the
goal. The data about the courses and student's mark in each course are
in the program clauses (for each course you have course name and mark of
student).

Develop a PROLOG program that teaches children how to pronounce
multi-syllables words by dividing them into syllables. Your program will
deals with words of the following two sequences:
vowel consonant vowel --- >
divide the word after the first vowel.
Example: Analog --- > Ana - log
vowel consonant consonant vowel ---
>, then divide the word between the two consonants.
Example: Pumber --- > Pum - ber

Give an example to explain backward chaining and forward chaining.

Define: backtracking, heuristic search, production rules.

What does the following code do:
subset([],[]).
subset([First|Rest], [First|Sub]):-
subset(Rest,Sub).
subset([First|Rest], Sub):-
subset(Rest,Sub).

What is wrong with the following code? How to correct it?
subset([],[]).
subset([First|Rest], [First|Sub]):-
subset(first,Sub).
subset([First|Rest], Sub):-
subset(first,Sub).



This page was modified on





Course
Sample Index


Wyszukiwarka

Podobne podstrony:
sem2 sample exam 2
sem2 sample exam
Sample exam ITV23FB Englsih B based on syllabus 4 valid from May 2009 0409
clad sample exam
TOEIC Listening and Reading Sample Test
shortcuts sample
Cisco Press CCNP Routing Exam Certification Guide Appendix
Sample
Log sample
Dragonfly (sample)
3? EXAM LANGUAGE ELEMENTSfor students
baby sampler3 misiabe
KewlPack #2 Samples
First 2015 Listening sample paper
dxf sample
Condor (sample)

więcej podobnych podstron