HOMEWORK ASSIGNMENTS- SPRING 2009
DUE DATE: On last day of class, Tuesday May 5 th
1. From Nikolopoulos's book, page 301: # 2,3,4,5,6.
2. Write a predicate, deleteLast, which, given a list L, returns
the list without the last element.
?-deleteLast([a,b,c,b,h], X).
X=[a,b,c,b]
?-deleteLast([], X).
X=[ ]
3. Write a predicate, subset, which when given two lists L and M,
will return True if the list L is a subset of list M.
For example:
?-subset( [a,b,n], [ z,a,g,b,v,n]).
True
?-subset( [a, b, c], [a,g,c,w]).
no
4. Write a predicate, eliminateDublicates, which, given a list L,
returns the list without any dublicate elements.
For example,
?- eliminateDublicates([a,b,b,c,a,c,g,a], X)
X= [b,c,g,a]
5. Write the predicate, commonElements, which, given two lists, returns a
list of elements that belong to both lists
For example,
?- commonElementSet([a,b,c,b,d],[b,h,c,,b,e], X).
X=[b,c]
6. From Nikolopoulos's book, Page 53, #1 and 2 .
7. From Nikolopoulos's book, page 53, # 3 and 5.
8. Write a Prolog procedure to merge two sorted lists.
?merge([2,5,7],[4,5,6,8],M).
M=[2,4,5,5,6,7,8];
no
9. Write a Prolog procedure to check if a list is in ascending or
descending order.
?ordered([3,4,7]).
yes
?ordered([6,4,2]).
yes
?ordered([2,6,4,9]).
no
========================================================================
ASSIGNMENT #2
A) This problem is a scheduling problem similar to the party guest list
problem done in class. The task is to match job applicants to a specific job.
The requirements for the job are:
At least three years' experience.
A Bachelor's and a Master's degree.
An average of two years per previous position overall to prove stability.
Willingness to work overtime or to travel. Both are not necessary.
Very good or excellent health.
Use the following data set of applicants as a test bed:
1) Name: Jones
Previous jobs, years on job:
CAT --- 5 years
IBM --- 4 years
CILCO--- 1 year
AIONICS---1 year
Degrees: BS and MS
Overtime= no, Travel =yes, Health=excellent
2) Name: smith
Previous jobs, years on job:
BORDOM ---8 years
Degrees: BS
Overtime: yes, Travel: yes, Health: good
3) Name: smart_allec
Previous jobs, years on job:
DELCO---1year
MOTOROLLA---1 year
LOGICON---1 year
Degrees: BS, MS, PHD
Overtime: no, Travel: no, Health: very good
_______________________________________________________________________
ASSIGNMENT 3
From Nikolopoulos's book, number 6 (c), page 95. (Frames using Prolog).
========================================================================
ASSIGNMENT 4
From Nikolopoulos's book, number 9, page 183 (using Prolog to implement confidence
factors approach and fuzzy logic--two programs)
_________________________________________________________________________
ASSIGNMENT 5
Using the EXSYS expert system shell implement the decision tree of page 289
from Nikolopoulos's book.
------------------------------------------------------------------------
ASSIGNMENT 6
Use the neural network package provided, to build a Multilayered,
feedforward, back propagation neural net for the data set given in class.
Experimentation will determine the best architecture for the net.
Provide hard copy listing: the architecture you used, the weight set
after training, the training and test data sets you used, and the
accuracy of your net.
Data are in here
------------------------------------------------------------------------
ASSIGNMENT 7
You are to use the JFS Fuzzy Logic System given in class to
implement a fuzzy controler which determines the amount of left
or right turn of the automobile driving wheel (in degrees),
in order for the automobile to follow a contour.
The input fuzzy variables are speed of the automobile and
the difference between the distances to the contour between the front
of the automobile and the rear.
A run by a human driver yielded these sensor measurements:
speed distance turn
10 +5 15
50 +5 30
10 +20 40
50 +20 60
15 -5 -15
50 -5 -30
15 -20 -43
50 -20 -65
You are to design the fuzzy sets, their membership functions,
and test accuracy of your system at the end.
__________________________________________________________________________