diff options
| -rw-r--r-- | assignments/2/README.md | 1 | ||||
| -rw-r--r-- | assignments/2/graph.dot | 2 | ||||
| -rw-r--r-- | assignments/2/graph.png | bin | 30506 -> 46987 bytes |
3 files changed, 3 insertions, 0 deletions
diff --git a/assignments/2/README.md b/assignments/2/README.md index 24385a1..1b37a5c 100644 --- a/assignments/2/README.md +++ b/assignments/2/README.md @@ -253,6 +253,7 @@ which is better known as Dijkstra's shortest path algorithm. - `P(<node>)`: predecessor node in the shortest path to `<node>` > b) Consider the network shown in the following diagram. With the indicated link costs, use Dijkstra's shortest path algorithm to compute the shortest path from x to all other network nodes. Show how the algorithm works by computing a table like the one above. +  ```ruby diff --git a/assignments/2/graph.dot b/assignments/2/graph.dot index 738ca8b..f2e67b5 100644 --- a/assignments/2/graph.dot +++ b/assignments/2/graph.dot @@ -1,4 +1,6 @@ strict graph { + rankdir=LR; + s -- t [label=1] s -- v [label=5] t -- s [label=1] diff --git a/assignments/2/graph.png b/assignments/2/graph.png Binary files differindex 18a820f..c7b1865 100644 --- a/assignments/2/graph.png +++ b/assignments/2/graph.png |
