Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Prolog, suppose we have a predicate supervisor ( x , Y ) that is true just when x is the direct supervisor of Y
In Prolog, suppose we have a predicate supervisor that is true just when is the direct supervisor of
a Define a predicate higherup that is true just when is above or equal to in a chain of supervisors. For example if supervisorab supervisorbc and supervisorcd are true then higherupaa higherupab higherupac and higherupad would all be true.
b Define a predicate sharedboss that is true just when is higherup than both and
c Define a predicate closestsharedboss that's true just when is a sharedboss of and and there is no distinct from such that is a shared boss of and and is higher up than
d Draw a tree diagram of a hierarchy in which supab supbc supcd supce supef are all true. Then explain how your rules for sharedboss would find all the shared bosses and Also show how your rules would find the nearest shared boss of and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started