Suppose we have a Monte Carlo algorithm, A, and a deterministic algorithm, B, for testing if the

Question:

Suppose we have a Monte Carlo algorithm, A, and a deterministic algorithm, B, for testing if the output of A is correct. How can we use A and B to construct a Las Vegas algorithm? Also, if A succeeds with probability 1/2, and both A and B run in O(n) time, what is the expected running time of the Las Vegas algorithm that is produced?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Algorithm Design And Applications

ISBN: 9781118335918

1st Edition

Authors: Michael T. Goodrich, Roberto Tamassia

Question Posted: