Optimal numberings and isoperimetric problems on graphs