In the examples I have seen, graph vertices in Mathematica are usually explicit small integers. However, Wolfram documentation says that vertices can be any arbitrary expression (eg., george, x^2, London, 5).
Nevertheless, it seems that vertices are always referred to by number, that is, by the position of the vertex expression in VertexList[gr]. This can be confusing. For example, if I build a graph like this, using nonconsecutive vertex numbers,
Graph[1<->2, 2<->10, 10<->3, 3<->4]
then I still have to refer to the vertices as if I had made each vertex number equal to its creation order, as if I had built the graph with strictly consecutive vertex numbers:
Graph[1<->2, 2<-3 ,3<->4, 4<->1]
Am I understanding this correctly?



