Skip to content

About

A C-based network routing simulator using Dijkstra and Bellman–Ford algorithms to compute shortest paths and routing tables in weighted graphs.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Graph-Based Network Routing Simulator

Overview

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.


Algorithms Implemented

  • Dijkstra’s Algorithm
  • Bellman–Ford Algorithm

Data Structures Used

  • Graph (Adjacency Matrix representation)
  • Arrays – distance, visited, and parent tracking
  • Recursion – path reconstruction

Features

  • 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)

🖥️ Sample Output (Conceptual)

--- 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

About

A C-based network routing simulator using Dijkstra and Bellman–Ford algorithms to compute shortest paths and routing tables in weighted graphs.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages