[Solved]Dijkstra S Formula Python Help Directed Acyclic Graph 2 Lists X 1 1 1 2 2 2 3 3 4 Y 2 3 4 Q37243733
Dijkstra’s formula in PYTHON help (Directed Acyclic Graph)
I have 2 lists:
x = [1,1,1,2,2,2,3,3,4]
y = [2,3,4,3,4,5,4,5,5]
An edge is defined by x[ i ] to y[ i ]
I also have the amount of edges in the Directed Acyclic Graph–> ‘m’
I also have the biggest node in the list –> ‘n’
(in this case m = 9 and n = 5]
We have an n*n adjacency matrix of the data below (left to rightand up to down are 1,2,3,4,5)

I need help writing a python program that uses Dijkstra’sformula to formulate the following:
— Shortest number of paths from 1 to ‘n’
— The amount of shortest paths in total
— Longest number of paths from 1 to ‘n’
— The amount of longest paths in total
PLEASE HELP! 🙂
01110 11100 11000 10000 Show transcribed image text 01110 11100 11000 10000
Expert Answer
Answer to Dijkstra’s formula in PYTHON help (Directed Acyclic Graph) I have 2 lists: x = [1,1,1,2,2,2,3,3,4] y = [2,3,4,3,4,5,4,5,… . . .
OR

