Overview
A decision problem is a computational problem whose output is typically yes or no. An optimization problem asks an algorithm to find a feasible solution that minimizes or maximizes an objective function. Many optimization problems have corresponding decision versions formed by adding a threshold to the objective.
Key concepts
name: Core idea; description: The central focus of decision and optimization problems is the capability described here: Decision problems ask whether a solution satisfying specified conditions exists, while optimization problems ask for the best solution according to an objective such as minimum cost or maximum profit. Understanding the distinction is important in algorithm design and computational complexity theory.; name: Problem context; description: Decision and Optimization Problems is relevant when a computational task requires the behavior or capability described by this topic.; name: Correct use; description: Before using decision and optimization problems, check its assumptions, input requirements, expected output, and resource constraints.
Example
scenario: Minimum-cost delivery route.; input: A weighted graph representing locations and travel costs.; decisionQuestion: Is there a route from the warehouse to the destination costing no more than 50 units?; optimizationQuestion: What is the least expensive route?; explanation: The decision version checks whether a cost threshold can be achieved. The optimization version searches for the smallest possible route cost and a route that achieves it.
Applications
Improving production reliability through careful use of decision and optimization problems.; Practising decision and optimization problems for technical interviews and programming contests.; Evaluating decision and optimization problems under realistic software workloads.
Limitations
The suitability of decision and optimization problems depends on the exact problem requirements and the assumptions made about the input.; An implementation of decision and optimization problems can fail if its boundary conditions, data representation, or required invariants are handled incorrectly.; For decision and optimization problems, evaluate representative and unusually difficult inputs; a single small demonstration is not enough to establish reliability.