subject
Engineering, 23.10.2019 19:50 chessacs6540

Implement and test the following algorithm in java which computes an optimal sequence for performing a set of tests that does not violate a given precedence constrains on the tests sequencing. the precedence constraints are represented by an array of disjoined linked lists of test, where the ith test in a linked list is the immediate successor of the (i-1)th test in the same linked list. for each test, , there are cost of testing i and probability of positive result . an optimal sequencing of tests is based on the minimizing the expected testing cost it has been proven that the following greedy algorithm provides an optimal sequencing of tests.

assume the array of linked lists is dented by l, where l[i][k] is the kth test in the linked list l[i] and the its immediate predecessors are l[i}{0}, l[i}[1],….l[i][k-1]. let c[i][k] and p[i][k] be the cost and probability associated with the test l[i][k]

the algorithm

1. let op denotes an optimal sequence and set it to the empty string;

2. while ( the linked lists are not completely empty), do the following four steps:

3. for each test l[i][j], compute the ratio r[i][j] as follows:

( σk_ocli][k]) r[i][i] = -。 0%=opli (k) jk_j k

4. choose the test with the smallest r ratio and has no predecessor test with the same r ratio;

5. add this test with its predecessors tests to the optimal sequence op;

6. remove this test and its predecessors from its linked list.

7.return op.

ansver
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 14:10, makaylashrout77
Amass of 1.5 kg of air at 120 kpa and 24°c is contained in a gas-tight, frictionless piston-cylinder device. the air is now compressed to a final pressure of 720 kpa. during the process, heat is transferred from the air such that the temperature inside the cylinder remains constant. calculate the boundary work input during this process.
Answers: 2
image
Engineering, 04.07.2019 16:10, Arealbot
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
image
Engineering, 04.07.2019 18:10, niicoleassssssf
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
image
Engineering, 04.07.2019 18:10, lowkeyqueenk
Apipe with an outside diameter of 15 cm is exposed to an ambient air and surrounding temperature of -20°c. the pipe has an outer surface temperature of 65°c and an emissivity of 0.85. if the rate of heat loss from the pipe surface is 0.95 kw per meter of length, the external convective heat transfer coefficient (h) is: (a) 12.5 w/m"k (b) 18.6 w/mk (c) 23.7 w/mk (d) 27.9 w/mk (e) 33.5 w/mk
Answers: 1
You know the right answer?
Implement and test the following algorithm in java which computes an optimal sequence for performing...

Questions in other subjects:

Konu
Spanish, 12.03.2020 17:33