1. A method comprising: representing a first graph in Euclidean space by a first model graph that includes all vertices of the first graph and all edges of the first graph and is globally rigid and has a preselected maximum clique size; and computing a mapping between vertices of the first graph and vertices of a second graph by optimizing a mapping between vertices of the first model graph and vertices of the second graph respective to a cost function; wherein the representing operations and the computing operation are performed by a digital processor.