This project simulates network routing algorithms used in computer networks to determine the shortest path between nodes.
The network is modeled as a weighted graph, where nodes represent routers and edges represent communication links.
The simulator demonstrates how routing decisions are made and how shortest paths are computed using classical graph algorithms.
- Dijkstra’s Algorithm
- Bellman–Ford Algorithm
- Graph (Adjacency Matrix representation)
- Arrays – distance, visited, and parent tracking
- Recursion – path reconstruction
- User-defined number of nodes and edges
- Weighted graph input using adjacency matrix
- Shortest distance calculation from a source node
- Shortest path reconstruction for each destination
- Comparison of greedy and dynamic programming approaches
- Support for negative edge weights (Bellman–Ford)
--- Dijkstra --- Node 0 | Distance 0 | Path: 0 Node 1 | Distance 4 | Path: 0 -> 1 Node 2 | Distance 7 | Path: 0 -> 1 -> 2
--- Bellman Ford --- Node 0 | Distance 0 | Path: 0 Node 1 | Distance 4 | Path: 0 -> 1 Node 2 | Distance 7 | Path: 0 -> 1 -> 2