Padova · IT
◑ GROWING NOTE algorithmscs-fundamentals

Computational Problem

A problem that can be solved by discrete computational steps specified with an algorithm.

A computational problem is a problem that can be solved by discrete computational steps specified with an Algorithm.

Formal Definition

A computational problem PP consists of:

An Algorithm AA solves PP if for every instance iIi \in I, it produces an output oOo \in O such that (i,o)R(i, o) \in R.

Problem Specifications

Every computational problem is defined by three things:

  1. Input — the set of instances or cases that are processed as inputs
  2. Constraints — conditions the input must satisfy
  3. Output conditions — what the produced output must satisfy

Example: Sorting

Types of Computational Problems

TypeDescriptionExample
DecisionYes/No answerIs nn prime?
SearchFind a solutionFind shortest path
OptimizationFind the best solutionMinimum spanning tree
CountingCount solutionsHow many valid colorings?