
implement a recursive dfs traversal in python using an adjacency list, with initialization of vertices and a visited array, add_edge for edges, and a test graph to demonstrate traversal.
Explore breadth first search traversal, a level-order method for graphs that visits nodes level by level from a source vertex using a queue to enqueue unvisited adjacent vertices.
Implement prim's algorithm to compute a minimum spanning tree from a graph using a selected array, selecting the minimum weight unselected neighbor until v-1 edges.
Implement Prim's algorithm in JavaScript to compute a minimum spanning tree by selecting the minimum weight edge from already selected vertices using a get mst function.
Kruskal's algorithm implemented in Python builds a minimum spanning tree by sorting edges by weight, using union-find with path compression and union by rank, iterating until v-1 edges.
Learn how the Floyd Warshall algorithm solves all-pairs shortest paths on weighted directed graphs using dynamic programming and intermediate vertices to iteratively update a distance matrix.
Johnson's algorithm computes all-pairs shortest paths by collecting edges, applying Bellman-Ford to reweight, and running Dijkstra from every vertex to update and output the shortest distances.
Master the Ford-Fulkerson algorithm for max flow by using residual graphs and augmenting paths to maximize flow from source to sink.
Learn to implement Ford-Fulkerson with breadth-first search (Edmonds-Karp) using a residual graph and augmenting paths to compute the maximum flow.
Learn to implement Tarjan's algorithm in JavaScript to identify strongly connected components in a graph, using dfs num, dfs low, and a stack to extract and print them.
Implement Kosaraju's algorithm in JavaScript to identify strongly connected components by performing dfs, reversing the graph, and running a second dfs to extract sccs.
Implement topological sort using kahn's algorithm on a directed graph with adjacency lists and indegree tracking, enqueue zero-indegree vertices, detect negative cycles, and print the final linear order.
Graphs are Amazing!
We will have a lot to cover in this course also the course is coded in Java, JavaScript & Python.
While solving graph algorithms, We may need to visit and process each node present in the graph. And for that, we must know how to traverse the graphs efficiently,
So, first, we will cover graph traversal, where we gonna see the 2 types of graph traversals, Depth First Search, and Breadth-first Search.
Then we will understand Spanning Trees and will see famous algorithms to find minimum cost spanning tree, basically, a minimum cost spanning tree is a tree from the graph connecting all the vertices with single edges each and that all
Of the lowest cost, so to minimize the cost to connect all the vertices.
For example :
Suppose, you own a telecommunication company
and you have towers that spread across the state.
You want to connect them so that data can be passed from one tower to others.
Connecting different towers involve different costs, so the problem is how will you minimize the cost. Here, comes the need of using Minimum spanning tree algorithms to find
That tree connecting all the towers with edges that have a minimum cost, so that the spanning Tree cost is minimum.
After that, we will look to Shortest Path algorithms, these are useful to find the shortest distance from of a source from all the other vertices (called single-source shortest path)
or shortest distance of each vertex with all the
Other vertices, that's called finding all pair shortest path.
For example, finding the distance of a city, let's say Istambul to all the other famous cities of turkey.
Or let's say A person who is planning a trip may need to answer questions such as, “What is the least expensive way to get from Princeton to San Jose?” A person more interested in time than in money may need to know the answer to the question “What is the fastest way to get from Princeton to San Jose?” To answer such questions, we process information about connections (travel routes) between items (towns and cities).
Then we will move to Flow network problems. These are concerned with the networks or graph, having a flow going through it.
There will be problems that ask to maximize the flow across the network or problems that ask to disconnect the source from the destination or sink in minimum cost.
After that we will discuss, algorithms to find strongly connected components in a graph.
Hope you will enjoy the course.
Happy Learning