subject
Engineering, 06.05.2020 04:28 KeyesRaveen

Imagine that you are managing a supercomputer that runs jobs for your clients. A client can submit a set of computing jobs, numbered from 1 to n, and the dependencies among them. The dependencies are expressed as pairs. For example, (1, 2) means job 2 depends on job 1, i. e. job 2 can only start after job 1 finishes. Write a program that determines if it is possible to finish all the jobs without actually running them. Below are some example inputs and their expected outputs.

Input: number of jobs = 2, dependencies = [(1, 2)]
Output: true
Explanation: We can run job 1 first followed by job 2.
Input: number of jobs = 2, dependencies = [(1, 2), (2, 1)]
Output: false
Explanation: We need job 1 to finish before we can run job 2, and job 2 to finish before we can run job 1. It is clearly impossible.

Implement the method canFinish in job. h. In the written part of your answer, state and justify both the time and space complexity of your algorithm. Submit both the modified job. h file and the written complexity analysis.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 18:20
A3-mm-thick panel of aluminum alloy (k 177 w/m-k, c 875 j/kg-k and ? = 2770 kg/m) is finished on both sides with an epoxy coating that must be cured at or above t,-150°c for at least 5 min. the production line for the curing operation involves two steps: (1) heating in a large oven with air at ts,0-175°c and a convection coefficient of h, 40 w/m2. k, and (2) cooling in a large chamber with air at 25°c and a con- vection coefficient of he 10 w/m2.k. the heating portion of the process is conducted over a time interval te which exceeds the ime required to reach 150°c by 5 min (h = r + 300 s). the coating has an emissivity of ? = 0.8, and the temperatures of the oven and chamber walls are 175 and 25°c, respectively. if the panel is placed in the oven at an initial temperature of 25°c and removed from the chamber at a safe-to-touch tempera ture of 37°c, what is the total elapsed time for the two-step curing operation?
Answers: 3
question
Engineering, 04.07.2019 18:20
Wiy doeres rere okhn a pump whon working betwon the same pressure range?
Answers: 2
You know the right answer?
Imagine that you are managing a supercomputer that runs jobs for your clients. A client can submit a...
Questions
Questions on the website: 13722363