Question: Programming in PROL. Consider the following PROL program: edge(X, Y) ? X = a, Y = b edge(X, Y) ? X = b, Y =
Programming in PROL. Consider the following PROL program: edge(X, Y) ? X = a, Y = b edge(X, Y) ? X = b, Y = a edge(X, Y) ? X = c, Y = c reachable(X, Y) ? X = Y reachable(X, Y) ? edge(X, Z), reachable(Z, Y) ? reachable(a, c) How does this program behave when executed? Explain its behavior.
2. Programming in PROL. Consider the following PROL program: edge(X, Y) reachable (X, Y) reachable (X, Y) = c, Y = c Y edge (X, Z), reachable (Z, Y) reachable(a, c) How does this program behave when executed? Explain its behavior. 2. Programming in PROL. Consider the following PROL program: edge(X, Y) reachable (X, Y) reachable (X, Y) = c, Y = c Y edge (X, Z), reachable (Z, Y) reachable(a, c) How does this program behave when executed? Explain its behavior
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
