top | item 35287379

(no title)

nvrspyx | 2 years ago

Can't general problems be reduced to decision problems though?

discuss

order

bheadmaster|2 years ago

All I've seen pretty much can.

Each solution can be encoded as an integer, and as long as you can construct your query as "is solution less than N?", you can use binary search to solve the problem in log(n) repetitions of the query, which does not affect the complexity class.

Scea91|2 years ago

I am a bit rusty on this theory but isn't the N in your case related to the output size while you would need it to be related to input size instead?

thelastquestion|2 years ago

They can always be reduced, but sometimes with an unacceptably large (e.g., non-polynomial) increase in time complexity.

These are the complexity classes of Function P (FP) and Function NP (FNP), which are the function problem extensions of the decision problem classes, and require finding the value, not just answering yes or no.

A simple example of a decision problem in P but whose search problem is not known to be in FP: For a given integer x, “does there exist a non-trivial prime factor of x?” vs. “find a non-trivial prime factor of x”.