Question: Error, (in GraphTheory:-Graph) invalid vertex 0 in list of neighbors

I see that one of the parameters of the  function Graph accepts a Array of neighbors.

So I gave it a try. 

G := GraphTheory:-Graph([1,2],[[2],[1]])

G := `Graph 10: an undirected unweighted graph with 2 vertices and 1 edge(s)`

It looks pretty good. But there's something wrong with the following codes.

G := GraphTheory:-Graph([0,1],[[1],[0]])

Error, (in GraphTheory:-Graph) invalid vertex 0 in list of neighbors

G := GraphTheory:-Graph(["0","1"],[["1"],["0"]])

Error, (in GraphTheory:-Graph) cannot determine if this expression is true or false: 1" < 1 or 2 < "1
 

G := GraphTheory:-Graph(["a","b"],[["b"],["a"]])

Error, (in GraphTheory:-Graph) cannot determine if this expression is true or false: b" < 1 or 2 < "b
 

How to use  Array of neighbors in  Graph  correctly?

 

PS: The source of the problem is that I got the following list of adjacencies of a graph  in Python and I want to convert it to  a graph in Maple. Its vertices are [0,1,2, ..., 9].

[[1, 2, 3, 4, 5, 6], [0, 2, 3, 4, 7, 8],
 [0, 1, 3, 5, 7, 9], [0, 1, 2, 6, 8, 9],
 [0, 1, 5, 6, 7, 8], [0, 2, 4, 6, 7, 9], 
[0, 3, 4, 5, 8, 9], [1, 2, 4, 5, 8, 9], 
[1, 3, 4, 6, 7, 9], [2, 3, 5, 6, 7, 8]]

 

G := GraphTheory:-Graph([$0..9],[[1, 2, 3, 4, 5, 6], 
[0, 2, 3, 4, 7, 8], [0, 1, 3, 5, 7, 9],
 [0, 1, 2, 6, 8, 9], [0, 1, 5, 6, 7, 8],
 [0, 2, 4, 6, 7, 9], [0, 3, 4, 5, 8, 9],
 [1, 2, 4, 5, 8, 9], [1, 3, 4, 6, 7, 9], 
[2, 3, 5, 6, 7, 8]])

Error, (in GraphTheory:-Graph) invalid vertex 0 in list of neighbors

Please Wait...