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 00:29:16 -0500

A 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 04:31:32 -0500

A 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 00:29:16 -0500

Seen: 118 times

Last updated: Aug 28