Ask Your Question
-1

Write a code for a tree on 9 vertices given in the set {0,1,2,3,4,5,6,7,8} and the edge set of that tree is {(6,1),(1,5),(5,0),(5,3),(3,2),(3,8),(8,4),(8,7)}.

asked 2017-08-28 07:29:16 +0100

rewi gravatar image

Write a code for a tree on 9 vertices given in the set {0,1,2,3,4,5,6,7,8} and the edge set of that tree is {(6,1),(1,5),(5,0),(5,3),(3,2),(3,8),(8,4),(8,7)}.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-28 11:31:32 +0100

rewi gravatar image

G = graphs.EmptyGraph()

G.add_edges([(6,1),(1,5),(5,0),(5,3),(3,2),(3,8),(8,4),(8,7)])

G.show()

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-08-28 07:29:16 +0100

Seen: 308 times

Last updated: Aug 28 '17