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

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Ariver flows from north to south at 8 km/h. a boat is to cross this river from west to east at a speed of 20 km/h (speed of the boat with respect to the earth/ground). at what angle (in degrees) must the boat be pointed upstream such that it will proceed directly across the river (hint: find the speed of the boat with respect to water/river)? a 288 b. 21.8 c. 326 d. 30.2
Answers: 3
question
Engineering, 04.07.2019 18:10
Burgers vector is generally parallel to the dislocation line. a)-true b)-false
Answers: 2
question
Engineering, 04.07.2019 18:10
Courses that are developed by subject matter experts, internal or extemal to the college or university. these programs are marketed by the school (clo2) marks a)-vocational schools b)-vendor training c)-colleges & universities d)-continuing education programs
Answers: 2
question
Engineering, 04.07.2019 18:20
Along 8-cm diameter steam pipe whose external surface temperature is 900c connects two buildings. the pipe is exposed to ambient air at 70c with a wind speed of 50 km/hr blowing across the pipe. determine the heat loss from the pipe per unit length. (b) air at 500c enters a section of a rectangular duct (15 cm x 20 cm) at an average velocity of 7 m/s. if the walls of the duct are maintained at 100c. a) the length of the tube for an exit temperature of the air to be 40 0c. b)the rate of heat transfer from the air. c) the fan power needed to overcome the pressure drop in this section of the duct.
Answers: 1
You know the right answer?
Implement and test the following algorithm in java which computes an optimal sequence for performing...
Questions
question
Social Studies, 01.02.2021 15:50
question
Social Studies, 01.02.2021 15:50
question
Mathematics, 01.02.2021 15:50
question
English, 01.02.2021 15:50
Questions on the website: 13722363