Imagine that you have a problem (mathbf{P}) that you know is (mathcal{N P})-complete. For this problem you

Question:

Imagine that you have a problem \(\mathbf{P}\) that you know is \(\mathcal{N P}\)-complete. For this problem you have two algorithms to solve it. For each algorithm, some problem instances of \(\mathbf{P}\) run in polynomial time and others run in exponential time (there are lots of heuristic-based algorithms for real \(\mathcal{N P}\)-complete problems with this behavior). You can't tell beforehand for any given problem instance whether it will run in polynomial or exponential time on either algorithm. However, you do know that for every problem instance, at least one of the two algorithms will solve it in polynomial time.

(a) What should you do?

(b) What is the running time of your solution?

(c) What does it say about the question of \(\mathcal{P}=\mathcal{N} \mathcal{P}\) if the conditions described in this problem existed?

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

Step by Step Answer:

Question Posted: