This repository provides an implementation of a graph data structure, graph_t
, and various algorithms related to graph theory in the C programming language.
The knowledge and code in this repository are based on the concepts covered in the course SCC0216 - Computational Modeling with Graphs - ICMC/USP, taught by Professor Maria Cristina Ferreira de Oliveira.
The repository covers the following topics:
- Adjacency Matrix
- Directed Graphs
- Non-Directed Graphs
- Weighted Graphs
- Breadth First Search (BFS)
- Depth First Search (DFS)
- Topological Sorting
- Fleury Algorithm (Eulerian Cycles)
- Welsh Powell Algorithm (Graph Coloring)
- Prim's Algorithm (Minimum Spanning Trees)
- Tarjan Algorithm (Connected/Strongly Connected Components in Non-Directed/Directed Graphs)
- Dijkstra and Bellman-Ford Algorithms (Single Source Shortest Paths)
- Floyd-Warshall Algorithm (All Pairs Shortest Paths)
These topics serve as a foundation for understanding and working with graph structures and algorithms.
Feel free to explore the code and use it as a reference or starting point for your own projects involving graphs and related computations.
To use the provided code, follow these steps:
- Clone the repository to your local machine.
- Navigate to the appropriate directory.
- Compile the C code running
make
- Run the compiled executable with
make run