Abstract
Automated theorem proving in the early 1970s faced significant challenges due to the "state-space explosion" problem, where systems generated vast amounts of irrelevant data. This paper introduces the Q algorithm, a hybrid search strategy that combines semantic filtering with syntactic heuristics to streamline deductive question-answering. By utilizing real-world knowledge to prune the search space and prioritizing literals with specific constants, Q achieves orders-of-magnitude improvements in efficiency and speed compared to purely syntactic approaches.
Introduction
In the early 1970s, automated reasoning systems were often bogged down by the "memory clutter" problem. When attempting to answer questions via resolution-based theorem proving, these systems would generate thousands of intermediate logical steps, most of which were irrelevant to the final answer. Standard strategies at the time relied almost exclusively on syntactic metrics—such as clause length or proof tree depth—which failed to account for the actual meaning of the data. In large databases, this led to massive I/O overhead as the system might attempt to resolve a query about a specific relationship with every unrelated fact in the database.
The Q* Algorithm
The Q* algorithm, integrated into the Maryland Refutation Proof Procedure System (MRPPS), addresses these inefficiencies by splitting the search into two cooperating components:
- Base Clause Selection (Semantic): This component acts as a gatekeeper, deciding which axioms from the database enter the search space. It uses "spec literals" and semantic filtering to reject axioms that are syntactically compatible but semantically irrelevant (e.g., rejecting male-related axioms when searching for a "mother").
- Deduction Algorithm (Syntactic): This component manages logical manipulations using a merit function based on an "upwards diagonal" search, ordering tasks by both clause length and level.
Key innovations include the prioritization of "constant-carrying literals" (e.g., specific names like "Sally"), which serve as efficient search anchors, and the use of SL (Linear Resolution with Selection Function) to focus on one sub-goal at a time, making it easier to prune remaining search branches.
Experimental Evaluation
The system was evaluated using a custom-built genealogical database containing 295 data axioms (specific facts about individuals) and 88 general axioms (logical definitions of relationships like "grandfather"). The performance of Q* was compared against a purely syntactic search baseline (denoted as $\Sigma^*$).
Results and Discussion
The experimental results demonstrate dramatic efficiency gains provided by Q. For a simple query regarding a specific person's mother (Question 1), the syntactic baseline processed all 295 data axioms, whereas Q identified the answer using only the 4 necessary axioms.
As shown in the table above, for a more complex "grandfather" query (Question 2), the standard syntactic search ($\Sigma^*$) generated 381 axioms. In contrast, Q without semantic filtering generated only 16 axioms, and with semantic filtering, it generated just 7 axioms—nearly reaching the theoretical minimum of 6. Computation time dropped from 59 seconds for the syntactic search to less than 0.37 seconds for Q with semantics.
Conclusion and Future Work
The Q algorithm demonstrates that semantic knowledge is essential for practical deductive question-answering. By preventing the generation of irrelevant clauses rather than filtering them post-hoc, Q effectively tames the state-space explosion. Future work aims to automate semantic features like solution counting and explore parallel search techniques to further enhance performance in complex reasoning tasks.
Summary updated