Automatic construction of a minimum size motion graph | Synapse