Compute the modularity in the following graph. Assume the attribute of a node is its color, where there are three categories of nodes: blue, red, and green. You can use Numpy or other libraries. Show your work
2. [20 points] Compute modularity in the following graph. Assume the attribute of a node is its color i.e., there are three categories of nodes: blue, red, and green. Show your work
V8
V1
V6
V5