| Component | Focus | Example Context |
|---|---|---|
| Input | Data provided | A list of unsorted names |
| Output | Desired result | An alphabetized list |
| Constraint | Limitations | Must complete in under 50ms |
| Goal State | Success criteria | No name is out of order |
Identify Hidden Constraints: In exam scenarios, constraints are often implied rather than stated. For instance, if a problem involves 'real-time' processing, there is an implicit constraint on latency.
Verify Input/Output Compatibility: Always check if the output can logically be derived from the provided input. If the input is 'Age' and the required output is 'Full Name', the problem is poorly defined because the input lacks sufficient information.
Check for Units and Types: A common mistake is ignoring the units of the input (e.g., meters vs. kilometers) or the data type of the output (e.g., integer division vs. floating-point results).
Sanity Check: Before finalizing a problem definition, ask: 'If I gave this description to a computer, would it have enough information to reach the goal without making assumptions?'
Confusing Constraints with Steps: A constraint is a rule (e.g., 'use less than 1GB RAM'), whereas a step is an action (e.g., 'sort the list'). Students often list algorithmic steps as constraints.
Vague Output Definitions: Simply stating 'the answer' is insufficient. A proper output component defines the structure, such as 'a boolean value where True indicates the presence of a duplicate'.
Ignoring the Initial State: Failing to define the starting conditions of the data can lead to algorithms that fail when the data is already partially processed or in an unusual format.