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
The drive force for diffusion is 7 fick's first law can be used to solve the non-steady state diffusion. a)-true b)-false
Answers: 1
question
Engineering, 04.07.2019 18:10
The thermal expansion or contraction of a given metal is a function of the f a)-density b)-initial temperature c)- temperature difference d)- linear coefficient of thermal expansion e)- final temperature f)- original length
Answers: 2
question
Engineering, 04.07.2019 18:10
You are making beer. the first step is filling the glass carboy with the liquid wort. the internal diameter of the carboy is 15 in., and you wish to fill it up to a depth of 2 ft. if your wort is drawn from the kettle using a siphon process that flows at 3 gpm, how long will it take to fill?
Answers: 1
question
Engineering, 04.07.2019 18:10
Which of the following components of a pid controlled accumulates the error over time and responds to system error after the error has been accumulated? a)- proportional b)- derivative c)- integral d)- on/off.
Answers: 2
You know the right answer?
Implement and test the following algorithm in java which computes an optimal sequence for performing...
Questions
question
Mathematics, 16.03.2022 20:40
question
Arts, 16.03.2022 20:40