I'm meant to create a searching algorithm for a knowledge base. The KB is originally in the form of rules, for example:
a :- b, c.
a :- d
b.
d.
Which can be represented as the list [[a,b,c], [a,d], [b], [d]]. Or, it can be represented as a tree:
[a]
|
-------------
| |
[b,c] [d]
| |
[c] [ ]
However, I don't understand the reasoning behind these representations. Is this a common abstraction that is used in Prolog? (I'm still new to it). A classmate told me that it can also be looked at as a FSM, where [b,c] and [d] are final states. But this doesn't seem to make sense either, since [b,c] has no child node, whereas [d] does.
Is there some consensus as to how the knowledge base can be represented/looked at? I have trouble finding the links between each representation, and what they mean. I apologize for the vagueness of my question, but I have such little knowledge of Prolog and knowledge bases that I'm not sure how to ask this. If it helps at all, this is a AI course. Any insight is appreciated, thanks!