Question: Module 4.1 Guided Assignment 2: Graph Processing Code 2. Graph Processing Code Read the textbook section Undirected graph data type - API (pg 522) Typical

Module 4.1 Guided Assignment 2: Graph Processing Code

2. Graph Processing Code

  • Read the textbook section
  • Undirected graph data type - API (pg 522)
  • Typical graph processing code (pg 525-527)
  • Operations (pg 527)
  • Implement the following methods
  • Compute the degree of a vertex (0.1)
  • Compute the maximum degree in the graph (0.1)
  • Compute the minimum degree in the graph (0.1)
  • Compute the average degree in the graph (0.1)
  • Count the number of self-loops (0.1)
  • Count the number of parallel vertices(0.1)
  • Add a vertex (0.1)
  • Delete a vertex (0.1)
  • Delete an edge (0.1)
  • Check whether the graph contains the edge v-w (0.1)
  • Implement TestGraphOperationsclass that will read the description of a graph and print the detailed description (each tested method 0.1)
  • Test with tinyG.txt; mediumG.txt; largeG.txt; and random operations for each
  • Start by printing the graph (if the number of verticesis less than 20)
  • Apply all the counting operations on each graph
  • For each graph add 10 vertices, print the graphif the number of verticesis less than 30and then delete the 10 verticesin the order they were added
  • For each graph add 10random edges, print the graphif the number of verticesis less than 30,and then delete the 10edgesin the order they were added
  • For each graph test if they contain 10 randomly generated edges. Print the results.

Page 525:

Module 4.1 Guided Assignment 2: Graph Processing Code 2. Graph Processing CodeRead the textbook sectionUndirected graph data type - API (pg 522)Typical graphprocessing code (pg 525-527)Operations (pg 527)Implement the following methodsCompute the degree of

\f\f\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!