Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004
G = Graph({"a":["b","e"],"b":["a","c","e"],"c":["b","d"],"d":["c","e"],"e":["a","b","d"]})
G
Graph on 5 vertices
G.vertices()
['a', 'b', 'c', 'd', 'e']
G.edges(labels=false)
[('a', 'b'), ('a', 'e'), ('b', 'c'), ('b', 'e'), ('c', 'd'), ('d', 'e')]
G.neighbors("a")
['b', 'e']