The mathematical model of constitutional chemistry described here is based on a concept of isomerism which has been extended from molecules to ensembles of molecules. A chemical reaction is the conversion of an ensemble of molecules into an isomeric ensemble. An ensemble of molecules is representable by an atomic vector and an associated bond and electron (BE)- matrix, and a reaction by a reaction (R)-matrix. These BE-and R-matrices serve as a basis for computer programs for the deductive solution of chemical problems. We present here algorithms and computer programs based on the theory of BE- and R-matrices. They enable the classification and documentation of structrues, substructures and reactions, the prognosis of reaction products,the design of syntheses, the construction of networks of mechanistic and synthetic pathways and the prediction of chemical reactions.