Metabolism can be regarded as a network of biochemical reactions, connected via their substrates and products. A metabolic pathway is thus a coordinated series of reactions, and it is often described in symbolic terms, as a succession of transformations of a set of substrate molecules into a set of product molecules. In this paper, a set of molecules is described by the disjoint union of the chemical graphs representing them, chemical reactions are described by chemical reaction graphs, and metabolic pathways are computationally modeled by artificial chemistries. An artificial chemistry is represented as a directed graph with the chemical graphs that represent the sets of substrate and product molecules as nodes and applications of the chemical reaction graphs as arcs. We present simple algorithms for building optimal artificial chemistries, which transform a substrate chemical graph to a product chemical graph using a given set of chemical reaction graphs such that the least possible...