1. An information processing apparatus for defining a data structure for pattern matching comprising: a generation section configured to generate an ordered tree structure by defining transition edges between nodes using, as transition conditions, respective constraints from one or more constraint patterns each including plural constraints; a search section configured to search for a second substructure of the ordered tree structure similar to a first substructure of the ordered tree structure from a root node by determining a set relation between transition conditions of respective transition edges; a transition defining section configured to define an additional transition link from a tail node of the second substructure to a child node at a tail end of the first substructure, the additional transition link adding a constraint to be met by an indeterminant identified from the set relation; and a storage device configured to store the ordered tree structure and additional transition link as the defined data structure for pattern matching.