Draw a graph with at least 5 nodes and 15 edges. Bonus points if you are able to come up with actual relationships to graph instead of abstract numbers. Describe your graph. Include if it is directed...

1 answer below »



  1. Draw a graph with at least 5 nodes and 15 edges. Bonus points if you are able to come up with actual relationships to graph instead of abstract numbers.




  2. Describe your graph. Include if it is directed or undirected, the number of nodes and edges, the maximum possible number of edges based on the number of nodes.




  3. Translate your graph into either a list of lists or a dictionary of lists.




  4. Translate your graph into a matrix.




  5. Bonus: Repeat exercises 1 but this time have a cost associated with each edge. Translate your graph into a dictionary of dictionaries as well as a matrix.






Homework 3 1) Draw a graph with at least 5 nodes and 15 edges. Bonus points if you are able to come up with actual relationships to graph instead of abstract numbers. 2) Describe your graph. Include if it is directed or undirected, the number of nodes and edges, the maximum possible number of edges based on the number of nodes. 3) Translate your graph into either a list of lists or a dictionary of lists. 4) Translate your graph into a matrix. 5) Bonus: Repeat exercises 1 but this time have a cost associated with each edge. Translate your graph into a dictionary of dictionaries as well as a matrix.
Answered Same DaySep 15, 2021

Answer To: Draw a graph with at least 5 nodes and 15 edges. Bonus points if you are able to come up with actual...

Rajeswari answered on Sep 15 2021
152 Votes
65387 assignment
Graph with atleast 5 nodes and 15 edges would have exactly 5 vertices but connecte
d by 15 edges.
We find that in a graph with n nodes, the undirected edges maximum can be only n(n-1)/2
Hence to have for undirected graph 30 edges, we must have atleast 6
So let us consider 6 edged graph undirected.
This is the graph undirected with 6 nodes and exactly 15 edges.
If it is directed one then we can have n(n-1) ie double of the previous because direction matters. A to B would be taken as one while B to A would be taken as another.
For undirected graph we can write list of edges as
AB, AC, AD, AE, AF, BC, BD, BE, BF, CD, CE, CF,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here