diff --git a/pretext/Graphs/AnAdjacencyList.ptx b/pretext/Graphs/AnAdjacencyList.ptx index 154fb979..e30119be 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 37022858..1a0e7197 100755 --- a/pretext/Graphs/AnAdjacencyMatrix.ptx +++ b/pretext/Graphs/AnAdjacencyMatrix.ptx @@ -92,5 +92,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 f95c9d7c..a329b0cb 100755 --- a/pretext/Graphs/BuildingtheKnightsTourGraph.ptx +++ b/pretext/Graphs/BuildingtheKnightsTourGraph.ptx @@ -369,4 +369,7 @@ int main() { } +

+ +

diff --git a/pretext/Graphs/BuildingtheWordLadderGraph.ptx b/pretext/Graphs/BuildingtheWordLadderGraph.ptx index c241d985..1dc89909 100644 --- a/pretext/Graphs/BuildingtheWordLadderGraph.ptx +++ b/pretext/Graphs/BuildingtheWordLadderGraph.ptx @@ -248,4 +248,7 @@ 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 d1221d41..b16c46e4 100755 --- a/pretext/Graphs/DijkstrasAlgorithm.ptx +++ b/pretext/Graphs/DijkstrasAlgorithm.ptx @@ -239,4 +239,7 @@ vector dijkstra(const vector>& graph, int start) { +

+ +

diff --git a/pretext/Graphs/DiscussionQuestions.ptx b/pretext/Graphs/DiscussionQuestions.ptx index 9348199a..a755a5ef 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 9800e489..37f36b50 100644 --- a/pretext/Graphs/GeneralDepthFirstSearch.ptx +++ b/pretext/Graphs/GeneralDepthFirstSearch.ptx @@ -344,5 +344,8 @@ main() DFS Visualization