Question: Consider the ( directed ) network on the left - hand side, below. We could represent this network with the set of Prolog statements on

Consider the (directed) network on the left-hand side, below. We could represent this network with the set of Prolog statements on the right-hand side, below.
1 ink (a,b).
1 ink (a,c).
1 ink (b,c).
1 ink (b,d).
link (c,d).
link (d,e).
link (d,f).
link (e,f).
link (f,g).
Now, given this network, we say that there is a connection from a node x to a node Y if we can get from x to Y via a series of links. For example, in this network, there is a connection from a to d, and a connection from c to f, etc.
s). Formulate the appropriate Prolog rule connection (x,Y) which is true if there is a connection from x to Y as described above - note that this rule will be recursive. Test this rule out on the above network, to see if it is working correctly.
Once it is working correctly, you will note that, e.g., the query connection(a,e). will give true multiple times. This means something, actually. this mean?
 Consider the (directed) network on the left-hand side, below. We could

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!