Project of my Analysis and Synthesis of Algorithms course.
Problem: Mr. João Caracol, Bananadian Prime Minister, decided to make an investment in
infrastructure in the country in order to integrate all large and medium-sized cities into one
network of air and road links. The objective is then to build airports and highways
new interconnected cities. Whereas the construction of each road and each
airport has a cost, Mr. João Caracol intends to obtain the solution that minimizes the total value
of expenditure.
In the construction of the network, it is considered that a city that has an airport can
to other cities with airports. Cities without an airport need roads to other
cities in order to stay connected. It is considered that a road connects two cities in both
the senses.
Your program should decide which roads to build and where to build airports.
so that all cities are networked, and minimizing the total cost of the works.
If there are optimal solutions with the same total cost, consider the solution that minimizes
the number of airports to be built.
gcc asa_grupo29.c
./asa_grupo29.c
C
20/20