- Natália de Assis Sousa
- João Vitor Santos Tavares
- Prim Algorithm
- Ford-Fulkerson Algorithm
- Dijkstra Algorithm
- Kruskal Algorithm
Each of the implemented algorithms has its input code and .cpp in the name directory located in the algs directory.
To run this algorithm first compile the ford-fulkerson.cpp file
g++ -o prim prim.cpp
Then run the command
./prim < in
Here is a demonstration of the result of running this algorithm:
This was the input used for testing:
6 8
1 2 5
1 3 4
1 4 2
1 6 6
2 4 1
2 5 7
3 5 6
4 6 1
To run this algorithm first compile the ford-fulkerson.cpp file
g++ -o ford-fulkerson ford-fulkerson.cpp
Then run the command
./ford-fulkerson < in
Here is a demonstration of the result of running this algorithm:
This was the input used for testing:
6 8
1 2 5
1 3 4
1 4 2
1 6 6
2 4 1
2 5 7
3 5 6
4 6 1
To run this algorithm first compile the ford-fulkerson.cpp file
g++ -o dijkstra dijkstra.cpp
Then run the command
./dijkstra < in
Here is a demonstration of the result of running this algorithm:
This was the input used for testing:
6 8
1 2 5
1 3 4
1 4 2
1 6 6
2 4 1
2 5 7
3 5 6
4 6 1
To run this algorithm first compile the ford-fulkerson.cpp file
g++ -o kruskal kruskal.cpp
Then run the command
./kruskal < in
Here is a demonstration of the result of running this algorithm:
This was the input used for testing:
6 8
1 2 5
1 3 4
1 4 2
1 6 6
2 4 1
2 5 7
3 5 6
4 6 1
See you next time!