Logical (Deductive) Inference
Let KB = { S1, S2,..., SM } be the set of all sentences in our
Knowledge Base, where each Si is a sentence in Propositional Logic.
Let { X1, X2, ..., XN } be the set of all the symbols (i.e., variables)
that are contained in all of the M sentences in KB. Say we want to
know if a goal (aka query, conclusion, or theorem)
sentence G follows from KB.
Since the computer doesn't know the interpretation of these
sentences in the world, we don't know whether the constituent symbols
represent
facts in the world that are True or False. So, instead, consider all
possible combinations of truth values for all the symbols, hence
enumerating all logically distinct cases:
X1 X2 ... XN | S1 S2 ... SM | S1 ^ S2 ^...^ SM | G | (S1 ^...^ SM) => G
-------------|--------------|------------------|---|-------------------
F F ... F | | | |
F F ... T | | | |
... | | | |
T T ... T | | | |
- There are 2^N rows in the table.
- Each row corresponds to an equivalence class of worlds that,
under a given interpretation, have the truth values for the N
symbols assigned in that row.
- The models of KB are the rows where the third-to-last column is
true, i.e., where all of the sentences in KB are true.
- A sentence R is valid if and only if it is true under all
possible interpretations, i.e., if the entire column associated with
R contains all true values.
- Since we don't know the semantics and therefore whether each symbol
is True or False,
to determine if a sentence G is entailed by KB, we must
determine if all models of KB are also models of G. That is,
whenever KB is true, G is true too. In other words, whenever the
third-to-last column has a T, the same row in the second-to-last
column also has a T. But this is logically equivalent to saying
that the sentence (KB => G)
is valid (by definition of the "implies" connective). In other
words, if the last column of the table above contains only True,
then KB entails G; or conclusion G logically follows from the
premises in KB, no matter what the interpretations (i.e., semantics)
associated with all of the sentences!
- The truth table method of inference is complete for PL
(Propositional Logic) because we can always enumerate all 2^n rows
for the n propositional symbols that occur. But this is exponential
in n. In general, it has been shown that the problem of checking
if a set of sentences in PL is satisfiable is NP-complete.
(The truth table method of inference is not complete for FOL
(First-Order Logic).)