This problem can be mapped to the Topological sorting of vertices in a graph assuming each component as the vertice in the graph and edge as the dependency indicator.For more details see the link below.
http://en.wikipedia.org/wiki/Topological_sorting
Unix have tsort program for doing the same.
For a DAG(directed acyclic graph) tsort produces a listing of the vertices so that for all edges 'a->b', 'a' comes before 'b' in the listing. This is used in MakeFile for identifying the build order of the components in a way to fulfill dependencies. This will not work when the graph have cycles. (Cyclic dependencies are not taken care).
http://en.wikipedia.org/wiki/Tsort_%28Unix%29
Categories
FollowersBlog Archive
Jobs
Find more freelance jobs
|
Tuesday, October 18, 2011Saturday, August 20, 2011Saturday, August 6, 2011Monday, January 24, 2011Very good resource for algorithms
If you are planning to learn all algorithms in a systematic way, you can visit this site.
http://www.allisons.org/ll/AlgDS/Glossary/ Good thing about this site is it outlines fundamental concept of data structure or algo with example and gives some practical use cases also.
Subscribe to:
Posts (Atom)
|
Popular Posts
|