
Explore graph theory fundamentals, representations like adjacency matrices and lists, and core algorithms such as BFS, DFS, and topological ordering, plus applications like web crawler and maze escape in Java.
Compare adjacency list and adjacency matrix representations for graphs with weighted edges; list excels in sparse graphs with lower space requirements, matrix enables constant-time lookups but uses V squared memory.
Study Java graph representations with a 4x4 adjacency matrix (zero means no connection, nonzero weights) and an adjacency list using a vertex class to print A-B, A-C.
Explore breadth-first search as a graph traversal that visits all vertices by using a FIFO queue, starting from a root, enqueuing unvisited neighbors, and identifying shortest paths.
Explore breadth-first search applications in pathfinding, maximum flow via Edmonds-karp, and garbage collection in Python and Java, including the Chilean algorithm's use of breadth-first search to track heap references.
Parse HTML to extract URLs and follow https links. Apply breadth-first search to crawl the web and build a directed graph of websites for indexing and ranking.
Implement a web crawler from scratch using breadth-first search in Java. The lecture builds a queue-based BFS to visit websites, parse HTML, extract URLs, and track discovered sites.
Implement depth-first search in Java using a stack, with vertex objects, adjacency lists, and visited flags to traverse all vertices, including multiple disconnected clusters.
Explore depth-first search using recursion to replace the stack-based approach, visiting graph vertices via a DFS helper, marking visited nodes, and recursively exploring neighbors for multi-component graphs.
Explore how depth-first search enables pathfinding, topological ordering, and cycle detection to prevent deadlocks, while uncovering strongly connected components used in video and social recommendations.
Explore the maze problem on an n by n grid with obstacles, from top-left to bottom-right, using backtracking and depth-first search with recursion.
Topological ordering, a depth-first search based technique, linearly orders vertices in a directed acyclic graph so that every edge u → v has u before v. It helps manage dependencies.
Implement topological ordering in Java using a dfs-based approach that pushes vertices onto a stack to produce the topological order.
Verify topological ordering on a six-vertex directed graph using Java ArrayList and List. Use dfs with a stack to reveal the order 5 4 2 3 1 0 and dependencies.
Explore shortest paths in a directed acyclic graph by building vertices and edges, obtaining a topological order via depth-first search, and updating min distance from the source to each vertex.
Explore how dynamic programming speeds solutions by eliminating overlapping subproblems. Apply topological order on directed acyclic graphs to solve dynamic programming problems, as seen in longest increasing subsequence.
Explore how cycle detection flags cycles and negative cycles in directed graphs. Use DFS and Bellman-Ford to analyze arbitrage in forex and avoid deadlocks in resource allocation graphs.
Detect cycles in a directed graph using depth first search in Java. Use two booleans, being visited and visited, plus an adjacency list to detect backward edges across clusters.
Explore the implementation of Dijkstra's shortest path algorithm in Java, building edge and vertex classes with distance initialization and comparable interface-based min-heap path search.
Implement and test Dijkstra's algorithm on a weighted graph with eight vertices, building adjacency, computing the shortest paths from A to G, and verifying the path and distances.
Discover how the critical path method uses the longest path in a directed acyclic graph to schedule project activities with precedence constraints, minimizing total duration via topological ordering or Bellman-Ford.
Compute the longest path in a directed acyclic graph by negating edge weights and applying the shortest-path method, then interpret results in positive terms for project management’s critical path.
This course is about advanced algorithms (graph algorithms) focusing on graph traversal, shortest path problems, spanning trees and maximum flow problems and a lots of its applications from Google Web Crawler to taking advantage of stock market arbitrage situations.
Section 1 - Graphs Theory Basics:
what is a G(V,E) graph
adjacency matrix representation
adjacency list representation
Section 2 - Graph Traversal (Breadth-First Search)
what is breadth-first search?
how to use BFS for WebCrawling in search engines?
Section 3 - Graph Traversal (Depth-First Search)
what is depth-first search?
how to use recursion to implement DFS
applications of DFS such as topological ordering and cycle detection
find way out of a maze with DFS
Section 4 - Topological Ordering
what is topological ordering (topological sort)
directed acyclic graphs (DAGs)
DAG shortest path and longest path
critical path methods and project management
Section 5 - Cycle Detection
what are cycles in a graph?
forward edges and backward edges
cycle detection algorithms (Tarjan's algorithm with DFS)
Section 6 - Dijkstra's Shortest Path Algorithm
what is a shortest path in a G(V,E) graph
Dijkstra's shortest path algorithm
Section 7 - Bellman-Ford Shortest Path Algorithm
Bellman-Ford algorithm
how to handle negative cycles
finding arbitrage opportunities on the FOREX
Section 8: - Spanning Trees (Kruskal and Prim's Algorithms)
what are spanning trees?
union find data structures
Kruskal's algorithm
Prim's algorithm
Section 9 - Strongly Connected Components (SCCs)
what are strongly connected components
Kosaraju's algorithm
Tarjan's algorithm
Section 10 - Maximum Flow Problem
the famous maximum flow problem
how to reduce most of the hard problems to maximum flow problem
Ford-Fulkerson algorithm
bipartite matching problem
Section 9 - Travelling Salesman Problem and Hamiltonian Cycles:
travelling salesman problem (TSP)
how to deal with NP-hard problems
what are meta-heuristics
Section 10 - Eulerian Paths
eulerian paths and eulerian cycles
Hierholzer algorithm and the Chinese Postman Problem
Section 11 - Algorithms Analysis
how to measure the running time of algorithms
running time analysis with big O (ordo), big Ω (omega) and big θ (theta) notations
complexity classes
polynomial (P) and non-deterministic polynomial (NP) algorithms
O(1), O(logN), O(N) and several other running time complexities
The course is going to take approximately 11 hours to completely but I highly suggest you typing these algorithms out several times in order to get a good grasp of it. You can download the source code of the whole course at the last lecture.
You should definitely take this course if you are interested in advanced topics concerning algorithms. There are a bunch of fields where these methods can be used: from software engineering to scientific research.
Thanks for joining the course, let's get started!