Graph matching aims to detect how similar any pair of small, labelled, directed graphs are. It achieves this by calculating how many operations are needed to fully transform one graph into another.
Conroy-Dalton R and Kirsan C. (2008). Small graph matching and building genotypes. Environment and Planning B: Planning and Design, 35 (5): 810-830.