STANFORD RESEARCH INSTITUTE X

STANFORD RESEARCH INSTITUTE
—
X&^- ©irs^tritra-tlonr
Date:
From: Cordell Green
Location:
Subject: Chemistry and Quest ion-Answering Systems
Answering:
The question-answering program
QA3 (Green,
problem set used by W. S. Cooper (1964).
September 5,
1968
1968) was tested on the
The subject was simple chemistry.
For his question-answering system Cooper used a restricted English language
input
.
The statements and questions were translated by hand into first-
order logic before being given to QA3
The
.
questions, and answers are listed in this memorandum. QA3
was able to answer all 23 of the answerable questions.
Cooper's program
answered 19 of them, failing on Questions 19, 20, 22, and 23.
Slagle's
Deducom (1965) was able to answer 7 of the answerable questions, namely
Questions 1, 2, 3, 5, 6, 11, and 23.
It took about two hours to translate all the facts and questions into
logic (C. Green).
It took about two hours to type all statements and ques-
tions into the computer and receive answers (L. Chaitin)
.
The response
time of QA3 ranged from a few seconds to about a minute and a half (console
time).
(Most code interpreted, not compiled.)
longest times were 8, 9, and
There were 38
having 3 literals.
The questions requiring the
17.
translating into 38 clauses, the longest clause
There were 17 different constants, 16 different
predicate letters, and no functions.
translating into 2 clauses.
There were 24 questions, the longest
The longest clause in a question had 2 literals
The proofs were not difficult.
1
One detail should be mentioned
P's
are
Q's
Cooper interprets the sentence
"All
to mean
(3x)P(x) A (Tx)[P(y)
=> Q(y)]
to avoid the possibility that C-x)P(x) is fals§.
This explains the trans-
lations rendered for Questions 11 and 17.
The following abbreviations are used in the facts and questions :
Abbreviations of Chemical Names
Magnesium
Magnesium Oxide
Oxygen
Ferrous Sulfide
Iron
Sulfur
Nitrogen
Hydrogen
Carbon
Copper
Sulfuric Acid
Sodium Chloride
Abbreviations of Logical Connectives and Quantifiers
IMP
FA
implies
for all
there exists
EX
The facts given QA3 are listed below.
the English language representation.
The first line of each fact is
the first-order logic translation that was typed into the system.
responds with
0K
if it accepts the statement.
Facts
1.
magnesium is a metal
S (METAL MA)
0K
2
.
magnesium burns rapidly
S (BURNSRAPIDLY MA)
0K
2
"sF'
The second line, prefaced by
QA3
(All were accepted.)
is
3.
magnesium oxide is a white metallic oxide
S (AND (WHITE MAO) (METALLIC MAO) (OXIDE MAO)
0K
4
.
oxygen is a nonmetal
S (NONMETAL 0)
0K
5.
ferrous sulfide is a dark-gray compound that is brittle
S (AND (DARKGRAY FES) (COMPOUND FES) (BRITTLE FES) )
0K
6.
iron is a metal
S (METAL FE)
0K
7.
sulfur is a nonmetal
S (NONMETAL S)
0K
8.
gasoline is a fuel
S (FUEL GASOLINE)
0K
9.
gasoline is combustible
S (COMBUSTIBLE GASOLINE)
0K
10.
combustible
things burn
S (FA(X) (IMP(COMBUSTIBLE X) (BURNS X) ) )
0K
11.
fuels are combustible
S (FA(X) (IMP (FUEL X) (BURNS X) ) )
0K
12
.
ice is
a solid
S (SOLID ICE)
0K
13
.
steam is a gas
S (GAS STEAM)
0K
14.
magnesium is an
S (ELEMENT MA)
element
0K
15.
iron is an element
S (ELEMENT FE)
0K
3
16.
sulfur is an element
S (ELEMENT S)
20.
carbon is an element
S (ELEMENT C)
0K
.
21
copper is an element
S (ELEMENT CU)
0K
However, Statements 14 through 21 can be written as:
S (AND (ELEMENT MA) (ELEMENT FE) (ELEMENT S) (ELEMENT 0)
(ELEMENT N) (ELEMENT H) (ELEMENT C) (ELEMENT CU) )
0K
salt is a compound
S (COMPOUND SALT)
0K
23.
sugar is a compound
S (COMPOUND SUGAR)
0K
24
.
water is a compound
S (COMPOUND WATER)
0K
25.
sulfuric acid is a compound
S (COMPOUND H2SO4)
0K
Similarly, Statements 21 through 25 can be written as:
S (AND (ELEMENT CU) (COMPOUND SALT) (COMPOUND SUGAR)
(COMPOUND WATER) (COMPOUND H2SO4))
0K
4
26.
elements are not compounds
S (FA(X) (IMP (ELEMENT X) (NOT (COMPOUND X) ) ) )
0K
27.
salt is sodium chloride
S (IS SALT NACL)
0K
28.
sodium chloride is salt
31.
no metal is a nonmetal
S (FA (X) ( IMP (METAL X) (NOT (NONMETAL X) ) ) )
0K
32.
dark-gray things are not white
S (FA(X) (IMP(DARKGRAY X)(NOT(WHITE X) ) ) )
0K
33.
a solid is not a gas
S (FA(X) (IMP(SOLID X) (NOT (GAS X) ) ) )
0K
34.
any thing that burns rapidly burns
S (FA(X) (IMP (BURNSRAPIDLY X) (BURNS X) ) )
In addition
35.
to Cooper's axioms, QA3 required the following axioms:
ferrous sulfide is a sulfide
S (SULFIDE FES)
0K
36.
equality is reflexive
S (FA(X) (IS X X))
"is"
(The predicate
is used for equality,
following Cooper's phrasing.)
0K
37.
equality is symmetric
S (FA(X Y) (IMP(IS X Y) (IS Y X) ) )
0K
38.
equals can be substituted for equals
S (FA(X Y) (IMP(AND(IS X Y)
(COMPOUND X) ) (COMPOUND Y) ) )
0K
5
(Only one instance of this
axiom schema was needed.)
Questions and Answers
The questions and answers, along with a few proofs are listed below.
The first line of each question is the English language question.
second line, beginning with
"q",
is the first-order logic question actually
typed into QA3
.
questions are
statements requiring yes or no answers.
The answer is prefaced by an
additional information.
The
"a".
Notice that Cooper's
QA3 sometimes gives
The statistics following the proofs are incorrect.
The version of QA3 used for this problem set had bugs in both the statistics
and the proof-finding strategy.
The statistics have not been deleted from
this report since they provide an approximate indicator of the performance
of the system at this date.
1.
Magnesium is a metal
5.
magnesium is a metal that burns rapidly
Q (AND (METAL MA) (BURNSRAPIDLY MA))
A YES
6.
magnesium is magnesium
Q (IS MA MA)
A YES
7.
some oxides are white
Q (EX (X) (AND (WHITE X) (OXIDE X) ) )
A YES E.G. X = MAO
8.
no oxide is white
Q (NOT(EX(X) (AND(OXIDE X) (WHITE X) ) ) )
A N0
The proof is exhibited by typing unwind
.
UNWIND
SUMMARY
1
AXIOM
WHITE (MAO)
-WHITE (X) -OXIDE(X)
-OXIDE(MAO)
NEG 0F THM
FROM 1,2
6
4
5
OXIDE(MAO)
AXIOM
CONTRADICTION
FROM
3,4
53 CLAUSES GENERATED
39 RESOLUTIONS OUT 0F 192 TRIES
SUBSUMED 2 TIMES OUT 0F 462 TRIES
FACTORED 0 TIMES OUT OF 7 TRIES
9.
10.
oxides are not white
Q (FA(X) (IMP(OXIDE X) (NOT(WHITE X))))
A N0
magnesium oxide is an oxide
Q (OXIDE MAO)
A YES
11.
every oxide is an oxide
Q (AND(EX(X) (OXIDE X)) (FA(Y) (IMP(0XIDE Y) (OXIDE Y) ) ) )
A YES E.G. X = MAO
12.
ferrous sulfide is dark gray
Q (DARKGRAY FES)
A YES
13.
ferrous sulfide is a brittle compound
Q (AND (COMPOUND FES) (BRITTLE FES))
A YES
14.
ferrous sulfide is not brittle
Q (NOT (BRITTLE FES))
A N0
15.
some sulfides are brittle
Q (EX (X) (AND (SULFIDE X) (BRITTLE X) ) )
A YES E.G. X = FES
16.
17.
ferrous sulfide is not a compound that is not dark gray
Q (NOT(AND(COMPOUND FES) (NOT (DARKGRAY FES))))
A YES
anything that is not a compound is not ferrous sulfide
(AND (EX (X) (NOT (COMPOUND X) ) ) (FA(Y) (IMP(NOT(COMPOUND Y) )
(NOT(IS Y FES)))))
A YES E.G. X = MA
Q
The proof is given below.
Note that line 3,
~ COMPOUND (MA)
is the
resolvent of the two axioms (neither is in the set of support) in Line 1
and Line 2.
This resolvent in Line 3 is then used twice, being resolved
against Lines 4 and 7.
This example illustrates how the extended set of
support strategy in QA3 produces a useful lemma.
7
Also, the proof illustrates the use of equality axioms (Lines 9 and
11), rather than some automatic treatment of equality.
UNWIND
SUMMARY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ELEMENT (MA)
-ELEMENT (X) -COMPOUND(X)
-COMPOUND (MA)
-COMPOUND(SK42)
-COMPOUND(SK42)
COMPOUND (FES)
AXIOM
AXIOM
COMPOUND(X)
FROM
FROM
IS(SK42,FES) COMPOUND(X)
IS(SK42,FES)
-IS(X,Y) IS(Y,X)
IS(FES,SK42)
-COMPOUND(X) -IS(X,Y) COMPOUND(Y)
COMPOUND(SK42)
-COMPOUND (FES)
COMPOUND(SK42)
CONTRADICTION
1,2
NEG 0F THM
3,4
AXIOM
NEG 0F THM
FROM 3,7
AXIOM
FROM 8,9
AXIOM
FROM 10,11
FROM 6,12
FROM 5,13
18 CLAUSES GENERATED
38 RESOLUTIONS OUT 0F 79 TRIES
SUBSUMED 20 TIMES OUT 0F 214 TRIES
FACTORED 0 TIMES OUT 0F 10 TRIES
18.
no dark gray thing is a sulfide
Q (NOT (EX (X) (AND (DARKGRAY X) (SULFIDE X))))
A NO E.G. X = FES
19.
ferrous sulfide is white
Q
(WHITE FES)
A N0
20.
sodium chloride is a compound
Q (COMPOUND NACL)
A YES
UNWIND
SUMMARY
1
2
3
4
5
6
7
IS (SALT, NACL)
-COMPOUND(NACL)
-COMPOUND(X)
-IS(X,Y) COMPOUND(Y)
-IS(X,NACL)
-COMPOUND(X)
-COMPOUND(SALT)
COMPOUND(SALT)
CONTRADICTION
AXIOM
NEG 0F THM
AXIOM
FROM 2,3
FROM 1,4
AXIOM
FROM
8
5,6
9 CLAUSES GENERATED
4 RESOLUTIONS OUT 0F 6 TRIES
SUBSUMED 0 TIMES OUT 0F 22 TRIES
FACTORED 0 TIMES OUT OF 1 TRIES
21.
salt is an element
Q (ELEMENT SALT)
A N0
22.
sodium chloride is an element
Q (ELEMENT NACL)
A N0
23.
gasoline is a fuel that burns
Q (AND (FUEL GASOLINE) (BURNS GASOLINE) )
A YES
The following question is Cooper's example of an unanswerable question
24.
some oxides are not white
Q (EX(X) (AND(OXIDE X) (NOT (WHITE X) ) ) )
A NO PROOF FOUND
9
REFERENCES
1
Theorem Proving by Resolution as the Basis for a
C. C.
System,"
Question-Answering
Machine Intelligence 4, D. Michie (Ed.)
(Edinburgh University Press, to be published).
2
C
. .
C
Green and B
.
Raphael
in Question-Answering
,
'The
Systems,"
Use of Theorem-Proving Techniques
Proc
-181 (Brandon/Systems Press, Inc.,
3
W. S. Cooper,
J.
4
'
1968 ACM Nat l
.
Conf
.,
pp. 169-
1968).
Retrieval and Deductive Question Answering Systems,
Vol. 11, No. 2,
J. R. Slagle,
Comm.
"Fact
.
pp.
117-137 (April 1964).
"Experiments with
a Deductive Question-Answering Program,
Vol. 8, No. 12, pp. 792-798 (December 1965).
10
u