ADA Syllabus
ADA Syllabus
a. Consider a network of ‘n’ systems represented as a Graph. Write a program to find the transitive
6. closure of such a network using Warshall’s algorithm. Find its time and space complexity.
b. Suppose in a network of cities, you are interested in finding shortest paths between all cities.
Design a program to implement this using Floyd’s algorithm. Find its time and space complexity.
Suppose a travel agent is interested in finding shortest path from a single city to all the other cities in a
7. network of ‘n’ cities. Write a program to implement this using Djikstra’s algorithm. Find its time and
space complexity.
Consider a Electrical layout where ‘n’ houses are connected by electrical wires. Design a program
8. using Prim’s algorithm to output a connection with minimum cost. Find its time and space
complexity.
A Government wants to construct a road network connecting ‘n’ towns. Suppose each road must
9. connect ‘2’ towns and be straight. Write a program using Kruskal’s algorithm to output the least
expensive tree of roads. Find its time and space complexity.
Consider ‘n’ patients and ‘nxn’ small rooms. Design a program to allot the patients to these rooms
10. using n-queen’s method such that no two patients are allotted rooms in same row, column or diagonal.
Find its time and space complexity.