CST 370 - Module 7

 Week 7

 This module's material covers different algorithms for solving problems with graphs, and sorting.

For instance, we were introduced to non-comparison sorting such as the Counting Sort or Distribution Counting Sort, where we calculate the frequency of each value of a given list and determine distribution values via the sums of frequencies. What is interesting about Counting Sort is the fact that is stable, or the numbers with the same values stay in the same order as they do in the given list.

 A technique introduced was Dynamic Programming. One problem about using a brute force technique is that sometimes, we would use a recursive function, which depending on the problem we want to solve, can induce too many overlapped functions. Dynamic Programming will allow us to avoid this by using an array to keep solutions of sub-problems. When the solutions to the sub-problems are recorded in the array, we solve the original problem with that array.

The next two algorithms are very similar to each other and both solve problems related to graphs. Warshall's Algorithm computes the transitive closure of a directed graph, which tells us if a node is reachable from a given starting node. This uses something similar to an adjacency matrix, except instead of only having information on adjacent nodes, it has information on whether or not a node can reach another node. 

The other algorithm is Floyd's Algorithm, which determines the shortest paths between all pairs of nodes in a weighted graph. This also uses something similar to an adjacency matrix, except, instead of having information on just the neighboring nodes, it has information on both the reach-ability of the node and the shortest paths to each other.

There are more topics covered throughout the module, such as Radix Sort, solving the Coin Collecting Problem, the Greedy Technique, finding the Minimum Spanning Tree,  and Prim's Algorithm, but I leave that for you to research.

Comments

Popular posts from this blog

CST 338 - Module 4

CST 363 - Module 7

CST 363 Module - 1