Computational Problem

Context: FIT1008_MOC · the input→output specification an Algorithm must satisfy · owns lower bounds

Quick Revision

  • 🎯 Objective: specify a correct input→output relationship ➔ states what is correct for any input, not how to compute it.
  • 📦 Core Components: problem (general spec) vs instance (one input) ➔ decision / search / optimisation.
  • ⚡ Key Constraint: problems own lower bounds (comparison sorting ); reductions transfer hardness.

📝 Core

1. The Problem (Spec, Not Method)

  • Definition ➔ a well-specified input→output relationshipwhat a correct answer is, not how.
  • Instance ➔ one concrete input (“find ” is the problem; an instance).
  • Correctness contract ➔ a spec is a pair; an Algorithm is correct iff every -input yields a -output.

2. Taxonomy of Problem Types

  • Decision ➔ yes/no ➔ the basis of P and NP.
  • Search / function ➔ output an object (a path, a sorted list).
  • Optimisation ➔ output the best feasible solution ➔ reduced to decision in complexity theory.

3. Intrinsic Difficulty (Lower Bounds, Reductions)

  • Lower bounds ➔ bound all algorithms (comparison sorting , see Sorting Problem).
  • Reductions transfers hardness: hard and at least as hard.

⚖️ Core Decision Matrix

TermMeaningOwns
Problemgeneral input→output specificationlower bounds
Instanceone specific input
Algorithmfinite procedure solving every instanceupper bounds

When It Flips: tractability classes — P (poly-time solvable) vs NP-hard/NP-complete (no known poly algorithm). Reductions propagate both hardness (, hard ⟹ hard) and tractability (an efficient -solver solves ).

📊 Exam Execution Trace

Manual Execution Trace

Classifying three problems:

Step / StateProblemTypeOutput
0 (Init)
1”Is 3-colourable?“decisionyes/no
2”Shortest path”searcha path object
3”Minimum spanning tree”optimisationbest feasible tree

⚠️ Common Mistakes

  • 💡 Lower bound = about the problem ➔ no algorithm beats it; an upper bound is exhibited by a specific Algorithm — matching the two proves optimal complexity.

🧠 Active Recall