Question: From the slides you are given the following prolog rules instructor(chan, math273) instructor(patel, ee222) instructor(grossman, cs301) enrolled(kevin, math273) enrolled(juana, ee222) enrolled(juana, cs301) enrolled(kiko, math273) enrolled(kiko,

 From the slides you are given the following prolog rules instructor(chan,
math273) instructor(patel, ee222) instructor(grossman, cs301) enrolled(kevin, math273) enrolled(juana, ee222) enrolled(juana, cs301) enrolled(kiko,

From the slides you are given the following prolog rules instructor(chan, math273) instructor(patel, ee222) instructor(grossman, cs301) enrolled(kevin, math273) enrolled(juana, ee222) enrolled(juana, cs301) enrolled(kiko, math273) enrolled(kiko, cs301). These rules are setup as Verb(A, B), but read as A verb B. So the first rule would be read as "chan instructor math273" or "Chan is the instructor for math273. The last rule would be read as a "kiko enrolled cs301" or "Kiko is enrolloed in cs301 We also have a rule teaches(P,S):- instructor(P,C), enrolled(S, C) This rule is read as P teaches S if P is instructor for course C and S is enrolled in course C Capital letters are used as variables. The:- defines the rule So your initial prolog program will look like this instructor(chan, math273) instructor(patel, ee222) instructor(grossman, cs301) enrolled(kevin, math273) enrolled(juana, ee222) enrolled(juana, cs301) enrolled(kiko, math273) enrolled(kiko, cs301). teaches(P,S) instructor(P,C), enrolled(S,c)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!