You are managing the creation of a large software product. You have the followin
ID: 3842549 • Letter: Y
Question
You are managing the creation of a large software product. You have the following information:
(a) A set V of n small projects that are part of your software product.
(b) A set E of pairs of projects in V . A pair (u; v) is in E if project u must be completed before
project v is started. There are no cycles in E.
(c) For each project u 2 V , a duration tu 2 N. This is the amount of time the project will take
from start to nish.
You can do any number of projects in parallel, but you can't start a project before all of its
predecessors (according to the list E) are completed.
Given this information, you want to know two things: First, how soon can each of the projects
be completed? Second, which projects are critical? We say a project is critical if increasing its
duration by 1 would delay the completion of the entire product.
For example, in the following picture, nodes represent projects, and numbers inside nodes are
durations. Critical nodes are colored gray.
Give an algorithm that takes the inputs above and returns:
(a) For each project u 2 V , the earliest possible completion time c(v).
2
(b) A list of the critical projects.
Give the running time and space complexity for your algorithm. Prove that your algorithm is
correct. (Hint: You may want to compute the completion times c(v) rst, then look for critical
projects.)
6 4 5 3 2 2 2Explanation / Answer
A graph G is said to be hamiltonian if there exists a cycle containing every vertex of G.
Since |V1| = |V2|,every cycle in a bipartite graph is even and alternates between vertices from V1 and V2 and a Hamilton cycle uses all the vertices in V1 and V2.
Suppose that Kn,n has partite sets {u1,u2,...un}V1 and {v1,v2,...Vn}V2.
Since uivj is an edge of Kn,n for every 1<= i, j<=n, we see that u1,v1,u2,v2....un,vn is a Hamiltonian cycle.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.