I tried storing my graph data in R as:
g<- graph.formula(1-2,1-3,2-3,2-4,2-7,3-4,3-6,3-7,3-8,3-9,3-10,4-8,4-9,5-6,5-7,5-8,6-7,6-8,6-9,6-10,7-8,7-9,8-9,8-10)
using the igraph package in R.
However, upon looking at the order of the vertices:
V(g)$name
It returns:
"1" "2" "3" "4" "7" "6" "8" "9" "10" "5"
May I know how would I need to input the data so that it appears in an ascending form?