From 419c8ddc55e399652d0f1026a886b63c8750b3ba Mon Sep 17 00:00:00 2001 From: Graham Taylor Date: Tue, 26 Jan 2021 22:40:06 -0500 Subject: [PATCH 1/5] Fix typo "to"->"too" in appA notebook --- notebooks/appA.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/appA.ipynb b/notebooks/appA.ipynb index 0b5d4d70..50e14a25 100644 --- a/notebooks/appA.ipynb +++ b/notebooks/appA.ipynb @@ -666,7 +666,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Exercise:** Go back and run `run_timing_test` with a larger value of `max_time` and see if the run time converges to the line with slope 2. Just be careful not to make `max_time` to big." + "**Exercise:** Go back and run `run_timing_test` with a larger value of `max_time` and see if the run time converges to the line with slope 2. Just be careful not to make `max_time` too big." ] }, { From 9e0133d5a128421c10c1861f2d7b5a33e66630e0 Mon Sep 17 00:00:00 2001 From: Graham Taylor Date: Tue, 26 Jan 2021 23:08:04 -0500 Subject: [PATCH 2/5] Fix pos -> positions in chap02 notebook --- notebooks/chap02.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/chap02.ipynb b/notebooks/chap02.ipynb index 1ef73a29..9ca3d92f 100644 --- a/notebooks/chap02.ipynb +++ b/notebooks/chap02.ipynb @@ -156,7 +156,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can use the keys in `pos` to add nodes to the graph." + "We can use the keys in `positions` to add nodes to the graph." ] }, { From f548b3f2e5daa2543904443572cab09b1986d584 Mon Sep 17 00:00:00 2001 From: Graham Taylor Date: Tue, 26 Jan 2021 23:12:16 -0500 Subject: [PATCH 3/5] Missing word "returns" in chap02 notebook --- notebooks/chap02.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/chap02.ipynb b/notebooks/chap02.ipynb index 9ca3d92f..33162d6b 100644 --- a/notebooks/chap02.ipynb +++ b/notebooks/chap02.ipynb @@ -332,7 +332,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The `neighbors` method the neighbors for a given node." + "The `neighbors` method returns the neighbors for a given node." ] }, { From 778e7f8685d1b8f343e68251386cea2894e0d05e Mon Sep 17 00:00:00 2001 From: Graham Taylor Date: Tue, 26 Jan 2021 23:14:02 -0500 Subject: [PATCH 4/5] Missing word "a" in chap02 notebook --- notebooks/chap02.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/chap02.ipynb b/notebooks/chap02.ipynb index 33162d6b..aff97916 100644 --- a/notebooks/chap02.ipynb +++ b/notebooks/chap02.ipynb @@ -348,7 +348,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Exercise:** Make and draw complete directed graph with 5 nodes." + "**Exercise:** Make and draw a complete directed graph with 5 nodes." ] }, { From 5644b65332d67237d08255b52e793197263bd781 Mon Sep 17 00:00:00 2001 From: Graham Taylor Date: Tue, 26 Jan 2021 23:30:18 -0500 Subject: [PATCH 5/5] Bring is_connected definition in sync with above There are two different definitions of this line in `is_connected`. This one matches the text. --- notebooks/chap02.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/chap02.ipynb b/notebooks/chap02.ipynb index aff97916..a9dfdfb6 100644 --- a/notebooks/chap02.ipynb +++ b/notebooks/chap02.ipynb @@ -789,7 +789,7 @@ "analysis, what is the order of growth for `is_connected`?\n", "\n", " def is_connected(G):\n", - " start = list(G)[0]\n", + " start = start = next(G.nodes_iter())\n", " reachable = reachable_nodes(G, start)\n", " return len(reachable) == len(G)" ]