In this exercise, we will use shortest path functions. You are given a directed graph as an adjacency matrix stored in '3directedgraph.csv'. The value of an entry in the $i$-th row and $j$-th column in the matrix corresponds to the length attribute of edge $(i,j)$. Your first task is to read this file and store the graph as a Networkx DiGraph. Note that the nodes must be labelled $1$ through $20$.
import numpy as np
import csv
import networkx as nx
#---------- Your code here ------------#
#--------------------------------------#
We will now use some of the shortest path algorithms in Networkx to compute the following.
#---------- Your code here ------------#
#--------------------------------------#
#---------- Your code here ------------#
#--------------------------------------#
#---------- Your code here ------------#
#--------------------------------------#
#---------- Your code here ------------#
#--------------------------------------#