1. A method of using pattern matching on a complex tree expression of a complex tree hierarchy, the method comprising: forming another complex tree expression for a rooted partial subtree query using, at least in part, a plurality of operations usable for determining a one-to-one association between tree hierarchies and natural numerals; forming the complex tree expression for the complex tree hierarchy using at least in part the plurality of operations usable for determining the one-to-one association between tree hierarchies and natural numerals; reducing, using at least in part a plurality of algebraic expressions, the formed complex tree expression for the complex tree hierarchy into a plurality of interrelated portions; and comparing the another complex tree expression for the rooted partial subtree query with the reduced plurality of interrelated portions for the complex tree expression.