Algorithms · Animation

Dijkstra vs bi-directional Dijkstra comparison on sample US Road Network

.. under construction .. Here, we compare the progression of classical and bi-directional Dijkstra Algorithms as applied to simple 2D rectangular and hexagonal grids as well as more destructured US road network. The road network is intentionally sampled and reduced to a minimum spanning tree for easier visualization. The real connections between nodes can be… Continue reading Dijkstra vs bi-directional Dijkstra comparison on sample US Road Network

Algorithms · Animation

Prim’s Algorithm Progression Animation for randomly distributed points

For a given set of randomly distributed points in 2-dimensional space, Prim’s algorithm is utilized to find the minimum total distance from a randomly selected origin point (P_origin). Here, the progress of how the distances are selected by the algorithm at the first instant along the way to reach the minimum spanning tree (MST) is… Continue reading Prim’s Algorithm Progression Animation for randomly distributed points

Algorithms

Fast C++ Solution to Huge Fibonacci number modulo m

This is a fast solution in C++ to Huge Fibonacci number modulo m question asked in the Algorithms course in UC San Diego Coursera course on Algorithms. It first calculates the Pisano period, then utilizes it to reduce the problem to a smaller size. The code also contains iterative solver to calculate Fibonacci number modulo… Continue reading Fast C++ Solution to Huge Fibonacci number modulo m