The cluster lib/backtracking provides a useful abstraction to implement all kinds of backtracking algorithms or and/or tree explorations.
The main class, ABSTRACT_BACKTRACKING, implements the abstract algorithm that explores a virtual and/or tree. It defines the basic data used for the exploration and the way the exploration is done. The tutorial [expand_expression] shows its use.
This tutorial expands the expressions that are entered at its input. Here is a short example.
> cd expand_expression/tree > se c -clean -o ee expand_expression > ./ee the(good+bad)(boy+girl) (1) the good boy (2) the good girl (3) the bad boy (4) the bad girl
A tutorial that shows how to solve problems that sometimes are called logigrams. The logigrams are made of a set of items (persons, date, places, ...) grouped into categories and sets of true propositions about the items. From these propositions you must deduce how the given items are combined together.
Here is an example: there are 3 women, Marie, Julie and Eve of the 19th century. We know that:
The one who has no child was born in 1804 and she is not Marie.
Julie doesn't have exactly one child and has less children than Marie.
The one who has 2 children is not born in 1805 and she is not Eve.
Which woman was born in 1806? How many children did she have?
WORK IN PROGRESS NOTHING TO SEE HERE
WORK IN PROGRESS NOTHING TO SEE HERE
The cluster regular_expression uses the cluster bactracking. Just take a look at it.