diff --git a/pretext/Graphs/AnAdjacencyList.ptx b/pretext/Graphs/AnAdjacencyList.ptx index e9a0da8d..5e19f89f 100755 --- a/pretext/Graphs/AnAdjacencyList.ptx +++ b/pretext/Graphs/AnAdjacencyList.ptx @@ -19,5 +19,8 @@ to compactly represent a sparse graph. The adjacency list also allows us to easily find all the links that are directly connected to a particular vertex.

+

+ +

diff --git a/pretext/Graphs/AnAdjacencyMatrix.ptx b/pretext/Graphs/AnAdjacencyMatrix.ptx index 213ee7c6..32e781de 100755 --- a/pretext/Graphs/AnAdjacencyMatrix.ptx +++ b/pretext/Graphs/AnAdjacencyMatrix.ptx @@ -30,5 +30,8 @@ is connected to every other vertex. There are few real problems that approach this sort of connectivity. The problems we will look at in this chapter all involve graphs that are sparsely connected.

+

+ +

diff --git a/pretext/Graphs/AnalysisofDijkstrasAlgorithm.ptx b/pretext/Graphs/AnalysisofDijkstrasAlgorithm.ptx index a5403684..957173cf 100755 --- a/pretext/Graphs/AnalysisofDijkstrasAlgorithm.ptx +++ b/pretext/Graphs/AnalysisofDijkstrasAlgorithm.ptx @@ -11,5 +11,8 @@ for loop is executed once for each edge in the graph, and within the for loop the call to decreaseKey takes time O(E\log(V)). So the combined running time is O((V+E) \log(V)).

+

+ +

diff --git a/pretext/Graphs/BreadthFirstSearchAnalysis.ptx b/pretext/Graphs/BreadthFirstSearchAnalysis.ptx index ac87520b..ed3aedba 100755 --- a/pretext/Graphs/BreadthFirstSearchAnalysis.ptx +++ b/pretext/Graphs/BreadthFirstSearchAnalysis.ptx @@ -20,5 +20,8 @@

Finally, at least for this problem, there is the time required to build the initial graph. We leave the analysis of the buildGraph function as an exercise for you.

+

+ +

diff --git a/pretext/Graphs/BuildingtheKnightsTourGraph.ptx b/pretext/Graphs/BuildingtheKnightsTourGraph.ptx index c3d859f6..58302c0e 100755 --- a/pretext/Graphs/BuildingtheKnightsTourGraph.ptx +++ b/pretext/Graphs/BuildingtheKnightsTourGraph.ptx @@ -369,5 +369,8 @@ int main() { } +

+ +

diff --git a/pretext/Graphs/BuildingtheWordLadderGraph.ptx b/pretext/Graphs/BuildingtheWordLadderGraph.ptx index e54aa9e2..147eb0be 100644 --- a/pretext/Graphs/BuildingtheWordLadderGraph.ptx +++ b/pretext/Graphs/BuildingtheWordLadderGraph.ptx @@ -248,5 +248,8 @@ int main() { constructed by the buildGraph function has exactly 53,286 edges, so the matrix would have only 0.20% of the cells filled! That is a very sparse matrix indeed.

+

+ +

diff --git a/pretext/Graphs/DepthFirstSearchAnalysis.ptx b/pretext/Graphs/DepthFirstSearchAnalysis.ptx index 9a1f4c3a..5db6548b 100755 --- a/pretext/Graphs/DepthFirstSearchAnalysis.ptx +++ b/pretext/Graphs/DepthFirstSearchAnalysis.ptx @@ -8,5 +8,8 @@ recursively if the vertex is white, the loop will execute a maximum of once for every edge in the graph or O(E). So, the total time for depth first search is O(V + E).

+

+ +

diff --git a/pretext/Graphs/DijkstrasAlgorithm.ptx b/pretext/Graphs/DijkstrasAlgorithm.ptx index 2b58ea45..4b67833c 100755 --- a/pretext/Graphs/DijkstrasAlgorithm.ptx +++ b/pretext/Graphs/DijkstrasAlgorithm.ptx @@ -196,5 +196,8 @@ def dijkstra(aGraph,start): +

+ +

diff --git a/pretext/Graphs/DiscussionQuestions.ptx b/pretext/Graphs/DiscussionQuestions.ptx index a7420105..d87d14f9 100755 --- a/pretext/Graphs/DiscussionQuestions.ptx +++ b/pretext/Graphs/DiscussionQuestions.ptx @@ -171,5 +171,8 @@ algorithm?

+

+ +

diff --git a/pretext/Graphs/GeneralDepthFirstSearch.ptx b/pretext/Graphs/GeneralDepthFirstSearch.ptx index 9f2e264e..0e922c60 100644 --- a/pretext/Graphs/GeneralDepthFirstSearch.ptx +++ b/pretext/Graphs/GeneralDepthFirstSearch.ptx @@ -344,5 +344,8 @@ main() DFS Visualization