Study Key A Content Processing Service for Students and Teachers, for Study and Evaluation
A Content Processing Service for Students and Teachers, for Study and Evaluation

Unit 3: Algorithms and Problem Solving

6 reading sections · 20 MCQs · 8 short · 5 long questions

3.1 Computational problems

A **computational problem** is a challenge that can be solved by a computational process – an **algorithm** (step-by-step instructions a computer can execute). - **Input** – data given at the start. - **Process** – the steps (the algorithm) applied to the input. - **Output** – the result produced. ## Classifying problems - **Decision problems** – the answer is yes or no (Is 17 prime?). - **Search problems** – find an item or solution that meets some criteria (Is Islamabad in this list?). - **Optimization problems** – find the *best* solution (shortest route, lowest cost). - **Counting problems** – count the number of ways a condition can be met. ## Well-defined and ill-defined problems - **Well-defined:** clear goal, input, process and output. Example: is a number even? Input an integer, check divisibility by 2, output even/odd. - **Ill-defined:** vague or ambiguous goals and requirements. Example: "How to reduce poverty in Pakistan".
Something went wrong. Reload ✕