Question: #2 Suppose we know that an algorithm has 5 classes of complexity for a problem of size n. The complexities T(n) .. Ts(n) are
#2 Suppose we know that an algorithm has 5 classes of complexity for a problem of size n. The complexities T(n) .. Ts(n) are given below. Regarding probabilities, suppose that p is twice as likely as p2, P2 is twice as likely as p3,, P3 is twice as likely as p4 and p4 is twice as likely as p5. T for all instances: T(n) = n, T(n) = 2n, T3(n) =3n4, T(n) = 4n and T5(n) = 5n (a) Find all five probabilities p, P2, P3, P4, P5. [Hint: the sum of all probabilities equal 1.0] (b) Find the A(n) for the algorithm.
Step by Step Solution
3.36 Rating (143 Votes )
There are 3 Steps involved in it
a To find the probabilities P1 P2 P3 P4 P5 we can use the given information ... View full answer
Get step-by-step solutions from verified subject matter experts
