4. Reasoning aspects of word problems

Word problem schemata

The current prototype allows to state word problems of the following form:

   John|Mary has|owns  one|two|...|seven|some fruit|apples|oranges|bananas|animals|rabbits|cows

in the languages: English, Catalan, Swedish and Spanish.

Amounts

The building block for the reasoning is the amount: a relaxed version of a set in which one does not have access to the composing elements, but can know the number of elements in it.

An amount is constructed by:

  • Giving the cardinal and the class of its elements (i. e. three oranges). Notice that the cardinal may be undefined (i. e. some oranges);

  • The own predicate binding an individual and a class (i. e. the apples that John has);

  • Disjoint unions of these constructions (three apples and two oranges)

Propositions

Available sentences express the equality between two amounts (i. e. The fruit that John has are two apples and some oranges)

The modeling process implies transforming a set of propositions into another set in which the numerical interpretation is evident.

Setting the problem model

We consider two grammars to express these facts:

  • The plain language is for direct communication with the user;

  • The core language is for the reasoner to work with.

This is how we express the amount John apples in plain (Prolog concrete):

own(john, apple)

while in core:

p(X, apple, own(john,X))

The latter is more suited to reasoning with it.

Another step into normalizing (making it core) an amount is to disaggregate sums. In this way a statement like John has three apples and six bananas is converted into: John has three apples and John has six bananas.

Another case is to convert questions as how many apples does Mary have? which are represented in plain as:

find(own(mary,apple))

into the core expression:

find(X, apple, own(mary,X))

A set of statements in core language is what is needed to process a word problem. This is what the create tool saves: A Prolog file consisting of:

  • A GF abstract tree for the plain sentence of a problem. This is written as a Prolog comment.

  • Core statements in Prolog format that correspond to the plain expression.

As an example, this is a complete problem in core Prolog clauses. The comments contain the GF abstract tree corresponding to the original plain expression:

% abs:fromProp (E1owns john (gen Fruit n7))
% Eng:John has seven fruit .
-(p(_1, fruit, own(john, _1)), *(7, unit(fruit))).
% abs:fromProp (E1owns john (aplus (ConsAmount (gen Apple n2) (BaseAmount (some Orange) (gen Banana n3)))))
% Eng:John has two apples , some oranges and three bananas .
-(p(_5, apple, own(john, _5)), *(2, unit(apple))).
-(p(_6, banana, own(john, _6)), *(3, unit(banana))).
-(p(_7, orange, own(john, _7)), some(orange)).
% abs:fromQuestion (Q1owns john Orange)
% Eng:how many oranges does John have ?
find(_19, orange, own(john, _19)).

Workflow for modeling a problem

When the model tool is started on a word problem file, the system uses the GF abstract lines to display the statement of the problem in the selected language. Now the student must go through a sequence of steps to have the problem correctly modeled:

  1. Assigning variables. At the beginnig the student must choose variables to designate unknowns that are relevant to the problem. This includes the target unknowns (they appear as arguments of find clauses) and expressions like some apples.

  2. Discovering relations. In this step the student has to combine information from different statements into new relations. For example, decomposing the fruits that John has into the apples and bananas that John has.

  3. Stating equations. In the next step, the student converts the relations uncovered in the previous step into numerical equations. This steps finishes when there are enough equations to determine the unknowns of the problem. The system checks that the student's equations are consistent equations and are entailed by the problem information.

  4. Final. At the last step, the system displays the solution for the unknowns of the problem and exits.