Question: (a) Imagine that the following PROLOG knowledge base describes a maze. The facts determine which points are connected, i.e., from which point you can get

 (a) Imagine that the following PROLOG knowledge base describes a maze.

(a) Imagine that the following PROLOG knowledge base describes a maze. The facts determine which points are connected, i.e., from which point you can get to which other point in one step. Furthermore, imagine that all paths are one-way streets, so that you can only walk them in one direction. So, you can get from point 1 to point 2, but not the other way round. connected(1,2) connected(3,4) connected(5,6) connected(7,8) connected(9,10) connected (12,13) connected(13,14) connected (15,16) connected(17,18) connected (19,20) connected(4,1) connected(6,3) connected(4,7) connected(6,11) connected(14,9) connected (11,15) connected (16,12) connected (14,17) connected (16,19) Write a predicate path/2 that tells you from which point in the maze you can get to which other point when chaining together connections given in the above knowledge base

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!