Overview of Problem Solving
| Site: | Newgate University Minna - Elearning Platform |
| Course: | Problem Solving |
| Book: | Overview of Problem Solving |
| Printed by: | Guest user |
| Date: | Thursday, 26 March 2026, 8:59 AM |
What is Problem Solving
Problem solving is the process of finding solutions to difficult or complex issues. It is also the process of achieving a goal by overcoming obstacles. In computing, this is a fundamental activity. It is the act of:
a) Defining a problem;
b) Determining the cause of the problem;
c) Identifying, prioritizing, and selecting alternatives for a solution; and
d) Implementing a solution.
A computational problem is a task that can be solved by a computer. It has three key components:
Input: The data or information available at the start.
Output: The desired result or information we want to achieve.
A Clear Definition: The rules and constraints for transforming the input into the output.
The Process of Problem Solving and Data Processing
The Problem-Solving Cycle
The following steps need to be followed to solve a problem. This is often called the problem-solving cycle:
Understand the Problem: Read the problem carefully. Identify the inputs and outputs. Delete all unnecessary information to get to the core task.
Example: Calculate the floor area of the boardroom that is on the second floor of the building next to the road to Newgate Minna. The length of the room is 7 meters and the width is 4 meters. It is the largest room on the second floor.
We remove unnecessary info to get: "Calculate the floor area. Length = 7m, Width = 4m."
Devise a Plan (Make a Plan): Choose a strategy to connect the input to the output. This is where you decide how you will solve it (e.g., by writing an algorithm).
Carry Out the Plan (Execute the Plan): Implement the plan. This is where you write the code or follow the steps of your algorithm.
Look Back (Review/Reflect): Check your solution. Does it make sense? Can it be improved? This reflection is how you learn.
Understanding the Problem
When the programmer is faced with a problem to solve, the problem must be read carefully and maybe, read a number of times to be very sure that the problem is understood. It is advisable to delete all unnecessary information given in the problem statement. Example: Calculate the floor area of the boardroom that is on the second floor of the building next to the road to FUT Minna. The length of the room is 7 meters and the width is 4 meters. It is the largest room on the second floor. This problem statement can be simplified by deleting the unnecessary information as follows:
Calculate
the floor area of the boardroom that is on the second floor of the building
next to the road to FUT MInna. The length of the room is 7 meters and the
width is 4 meters. It is the largest room on the second floor.
The problem statement is now much easier to read and understand: Calculate the floor area of the board room. The length of the room is 7 meters and the width is 4 meters.
The problem statement must include enough information to enable the programmer to solve the problem. But, if some data (values) are missing, it must be of such a kind that the user will be able to supply the missing data.
Example: The sum of 2 numbers must be calculated.
The problem statement does not supply the values of the numbers, but the algorithm can ask the user to supply the value of the numbers. The most important aspect of solving a problem by using a computer is to write an algorithm to solve it. An algorithm is a set of steps that must be written in such a way that is it unambiguous and precise. The computer cannot think for itself, you as the programmer must tell the computer exactly what to do. You may never assume that the computer will do something if you have not explicitly included the specific step.
Data Processing
An algorithm to solve a computer-based problem consists of 3 phases’ i.e.
- What you have available for the algorithm to solve the problem
- How you are going to solve the problem i.e. what steps you are going to take
- What is the required result
Schematically it can be shown as follows (Figure 1-1):

Each of the figures above clearly indicates that the algorithm must receive data (input) that must be processed to render meaningful results (output or information). In other words:
- Input is processed to render meaningful output.
- Data is processed to render meaningful information
Example:
The manager of a company asks a student to do some part time work for which he will be paid per hour. The student will have to know how many hours he has to work at what rate of pay before he can calculate the final amount he will receive.
In this case the input (data) to this algorithm will be the hours and the hourly rate of pay. The input (data) must be processed to give the output (information) i.e. the amount the student will receive. It is clear that the input (data) is meaningless unless it is processed, because if the student knows how much he will receive per hour, but does not know how many hours he will work, the pay cannot be calculated! On the other hand, if the student has worked for 20 hours but the manager does not tell him how much he will receive per hour, it is also meaningless. Now it is possible to formulate the following:
- Unprocessed data is meaningless.
- Information is processed data.
- Output is processed data or processed input
Problem: Calculate the sum of 2 numbers and display the result on the screen:
Input: Not available in the problem statement. The user has to supply the numbers.
Processing: Add the 2 numbers to determine the sum.
Output: The sum as calculated in the processing phase is displayed on the screen of the computer. Note the following:
- The value of the numbers must be available before the sum can be calculated.
- It is impossible to display the sum before it has been calculated.
These two remarks indicate that the steps must always be processed in a logical order.
Writing an Algorithm
What is an Algorithm?
An algorithm is a set of sequential instructions written in a logical order to solve a problem. It is a plan. It can be defined as a set of steps that are unambiguous and precise.
Everyday Example: "I need to go to school." The algorithm could be:
1. Wake up.
2. Get out of bed.
3. Wash.
4. Put on clothes.
5. Eat.
6. Take my bag.
7. Go to school.
Properties: Some steps can be swapped (e.g., you may eat before getting dressed), but it is not possible to go to school before waking up. The order must be logical.