Question: Please help 51. Consider the following university data base, which has a department relation (in, dept(hy) says that x works in department y, note that

Please help  Please help 51. Consider the following university data base, which has

51. Consider the following university data base, which has a department relation (in, dept(hy) says that x works in department y, note that joint appointments are possible), a chair relation (chairfx, y) says that y is the chair of department x), and a rank relation (rankfx, y, z) says that x has rank y, and earns salary z)-(10 pts) % newton in-dept physics % Newton is in Physics dept. % math char eular % eular is chair of the Math dept. %turing rank assist 20 % Turing is an assistant professor making 20k (only) a year in _dept(newton, physics). in_ dept(newton, math). in_dept(erdos, math). in_dept(vonNeumann, compSci) in_dept(turing, math). in_dept(turing, compsci). in_dept(babbage, compSci). in_dept(euler, math). in_dept(church, compSci). in_ dept(einstein, physics). in_dept(feynman, physics). chair(physics, newton). chair(math, euler). chair(compSci, vonNeumann). rank(newton, full, 35). rank(erdos, assoc, 25) rank(vonNeumann, full, 45). rank[turing, assist, 20). rank(babbage, assist, 23) rank[euler, assoc, 40). rank(church, assoc, 40). rank[einstein, full, 45) rank(feynman, assoc, 35). a) What are all the possible answers to the query: ?- rank(A, assoc, _), in_dept(A, math). b) The colleague relation, colleaguelky) says that x and y are in the same department. Write a rule to define the colleague (x is considered to be a colleague of x) c) The boss relation, boss(xy) says that x is the chair of the department that y is in. Write a rule to define the boss relation. e) A professor is highly paid if he earns the same or more than his chair. Write a rule to define the highlyPaid predicate. (p-) 517

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!