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 03:10
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
question
Engineering, 04.07.2019 18:10
Steel is coated with a thin layer of ceramic to protect against corrosion. what do you expect to happen to the coating when the temperature of the steel is increased significantly? explain.
Answers: 1
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:10
An air compression refrigeration system is to have an air pressure of 100 psia in the brine tank and an allowable air temperature increase of 60°f for standard vapor compression cycle temperatures of 77 f entering the expansion cylinder and 14 f entering the compression cylinder, calculate the coefficient of performance a. 2.5 b 3.3 c. 4.0 d. 5.0
Answers: 3
You know the right answer?
Implement and test the following algorithm in java which computes an optimal sequence for performing...
Questions
question
Mathematics, 11.05.2021 23:40
question
Computers and Technology, 11.05.2021 23:40
Questions on the website: 13722362