Unit summary
- A computational problem is described by its inputs, outputs and constraints; an instance supplies actual input values.
- A special case adds restrictions to a problem, and generalization removes them.
- Problems are classified as decision, search, optimization, counting or construction according to the answer required.
- Problem analysis identifies inputs, outputs, rules and limits, and resolves unclear requirements before planning.
- An algorithm is a finite sequence of definite, effective steps that takes input and produces output.
- Correctness is judged before efficiency; efficiency is measured by how work grows with the input size n.
- A data structure organizes data so that the operations a solution needs are convenient.
- The problem-solving process has four steps: understand, plan, execute and review.
- Decomposition divides a large problem into subproblems with clear inputs and results.
- An input/output specification states the meaning, type, range and unit of each value; validation enforces it.
- A precondition must hold before an algorithm runs, and a postcondition is guaranteed after it finishes correctly.
Glossary
| Term | Meaning |
|---|---|
| Algorithm | A finite set of clear steps for solving a problem. |
| Boundary case | An instance at the limit of the allowed inputs, such as the smallest or largest valid value. |
| Classification | Grouping problems by the kind of answer they require. |
| Computational problem | A problem that can be described in terms of inputs and required outputs. |
| Constraint | A rule that limits valid inputs or acceptable results. |
| Correctness | The property of producing an acceptable result for every valid input. |
| Data structure | A way to organize data for the work a solution needs to do. |
| Decomposition | Breaking a large problem into smaller tasks. |
| Efficiency | How much time or memory a solution uses. |
| Generalization | A broader form of a problem with fewer restrictions. |
| Input | Data given to a solution. |
| Output | The result a solution must produce. |
| Postcondition | A condition that must be true after a solution step finishes correctly. |
| Precondition | A condition that must be true before a solution step begins. |
| Problem | A task with a goal that needs a solution. |
| Problem instance | One particular set of input values for a problem. |
| Requirement | A condition the solution must meet. |
| Special case | A narrower form of a problem with extra restrictions. |
| Tracing | Carrying out an algorithm by hand and recording the value of each variable. |
| Validation | Checking that input follows the stated rules. |
Question bank
Short Answer Questions (2 marks each)
- Define a computational problem.
- What is a problem instance? Give one example.
- Distinguish between a general problem and a special case.
- What is a decision problem? Give one example.
- Define an algorithm.
- List any four characteristics of an algorithm.
- What is meant by the correctness of an algorithm?
- Define a data structure.
- What is decomposition?
- Differentiate between a precondition and a postcondition.
Medium Answer Questions (5 marks each)
- Explain the difference between a problem and a problem instance with a suitable example.
- Describe the five types of computational problems with one example of each.
- Explain the steps involved in analysing a problem, using a billing task as an example.
- Write an algorithm to find the sum of three numbers and trace it for the input 4, 7, 2.
- Explain input validation. Describe type checks and range checks with examples.
- Explain how decomposition helps in solving a large problem.
Long Answer Questions (15 marks each)
- Explain the four-step problem-solving process in detail. Apply all four steps to the problem of finding the average of three test scores.
- What is an algorithm? Explain its characteristics. Discuss correctness and efficiency as measures for judging an algorithm, with an example comparing two methods.
- Explain generalization and special cases. Discuss the classification of computational problems with suitable examples and explain why classification is useful.
- Explain input/output specification, input validation, preconditions and postconditions. Illustrate each with the problem of finding the largest value in a list.
Sources
- Official BCA syllabus (NEP 2025 scheme), Problem Solving Techniques, course code 25BCA401SEC01, Unit I
