PROBLEM SOLVING
Module 1: Foundations of Problem Solving
Unit 1: Introduction to Problem Solving
BY
DR. JOHNWENDY C.N.
DEPARTMENT OF COMPUTER SCIENCE
NILE UNIVERSITY OF NIGERIA
4/3/2026 1
OBJECTIVES
To Understand Meaning of a problem
To Understand Meaning of problem solving
To Understand Types of problems (well-defined and ill-defined)
To Understand Importance of problem solving in computing
4/3/2026 2
INTRODUCTION
➢Problem solving is a fundamental skill in computing and everyday
life. In computing, problem solving involves identifying a problem,
understanding its requirements, and designing a logical sequence of
steps to produce a solution.
➢Computers themselves do not solve problems automatically; they rely
on humans to define the problem and design a clear set of instructions
(algorithms) that the computer can follow.
➢Therefore, a computer scientist must first understand how to think
logically and solve problems systematically before writing any
program.
4/3/2026 3
PROBLEMS IN HUMAN LIFE
➢From the moment a person is born, they begin to encounter
different kinds of challenges or needs that must be solved.
These challenges are what we generally call problems.
➢A problem arises whenever there is a difference between
the current situation and the desired situation.
4/3/2026 4
MEANING OF A PROBLEM
➢A problem is a situation where there is a gap between the
current state and the desired goal, and a solution must be
found to bridge that gap
4/3/2026 5
EXAMPLE
➢Example 1
➢Current situation:
A lecturer wants to calculate the average score of students.
➢Desired goal:
Get the correct average score.
➢Problem:
How do we compute the average correctly?
➢Solution approach:
Add all scores and divide by the number of students.
4/3/2026 6
MEANING OF PROBLEM SOLVING
➢Problem solving is the process of analyzing a problem and
developing a systematic method to arrive at a solution.
➢In computing, problem solving usually involves:
1. Understanding the problem
2. Designing a solution
3. Implementing the solution
4. Testing the solution
4/3/2026 7
IMPORTANCE OF PROBLEM SOLVING
Problem solving is important because it helps us to:
1. Develop Logical Thinking
Computer scientists must think logically to design solutions.
2. Design Efficient Programs
A good problem-solving approach leads to better algorithms and faster
programs.
3. Reduce Errors
When a problem is properly analyzed before coding, errors are minimized.
4. Solve Real-World Problems
Computers are used to solve problems in banking, healthcare, education,
agriculture, and business.
4/3/2026 8
TYPES OF PROBLEMS
1. Well-defined Problems 2. Ill-defined Problems
These problems have clear rules These problems do not have clear
and solutions. solutions.
Example: Example:
Calculate the area of a rectangle. How can traffic congestion be
Formula: reduced in a city?
Area = Length × Width This requires multiple strategies
and analysis.
4/3/2026 9
WELL DEFINED PROBLEMS
Well-defined problems follow specific rules, but they are not
usually called “static rules.” Instead, they are described by
clear and fixed characteristics that make the problem precise
and solvable.
In computing and problem-solving theory, a well-defined
problem must satisfy certain conditions.
4/3/2026 10
CHARACTERISTICS OF WELL-
DEFINED PROBLEMS
A problem is considered well-defined if it contains the following
elements:
1. Clearly Defined Inputs
The problem must specify what data is given.
Example
Problem: Calculate the area of a rectangle
Input:
Length = 10
Width = 5
4/3/2026 11
CHARACTERISTICS OF WELL-
DEFINED PROBLEMS CONTD.
2. Clearly Defined Output
The expected result must be clearly stated.
Example:
Output:
Area = 50
If the output is not clearly stated, the problem becomes
ambiguous.
4/3/2026 12
CHARACTERISTICS OF WELL-
DEFINED PROBLEMS CONTD.
3. Definite Processing Steps
There must be logical steps or rules that can transform the
input into the output.
Example:
Steps:
Multiply length by width
Display result
4/3/2026 13
CHARACTERISTICS OF WELL-
DEFINED PROBLEMS CONTD.
5. Deterministic Procedure
If the same input is given, the same result should always be
produced.
Example:
5 + 3 will always equal 8.
4/3/2026 14
CHARACTERISTICS OF AN ILL
DEFINED PROBLEMS
Ill-defined problems also have identifiable characteristics, but unlike
well-defined problems, they lack clarity and structure. These
problems are often complex and may have multiple possible solutions.
1. Unclear Problem Definition
The problem is not clearly stated, and it may be difficult to understand exactly
what needs to be solved.
Example
Problem:
“How can we improve education in a country?”
This problem is broad and vague.
4/3/2026 15
CHARACTERISTICS OF AN ILL-
DEFINED PROBLEMS CONTD
2. Uncertain or Missing Inputs
The data or information needed to solve the problem may be
incomplete, unknown, or difficult to obtain.
Example:
Improving national healthcare requires data about hospitals,
doctors, patients, funding, and policies, which may not be
fully available.
4/3/2026 16
CHARACTERISTICS OF AN ILL-
DEFINED PROBLEMS CONTD
3. No Single Correct Solution
Ill-defined problems may have many possible solutions, and
different people may suggest different approaches.
Example:
Reducing unemployment may involve:
Creating new industries
Improving education
Government policies
Entrepreneurship programs
All could be solutions.
4/3/2026 17
CHARACTERISTICS OF AN ILL-
DEFINED PROBLEMS CONTD
4. No Fixed Procedure
There is no specific algorithm or step-by-step method
guaranteed to solve the problem.
Unlike mathematical problems, these problems require
judgment, creativity, and analysis.
4/3/2026 18
CHARACTERISTICS OF AN ILL-
DEFINED PROBLEMS CONTD
5. Solutions Are Subjective
The solution may depend on opinions, perspectives, or circumstances.
Example:
"What is the best teaching method?"
Different educators may recommend different strategies.
4/3/2026 19
CHARACTERISTICS OF AN ILL-
DEFINED PROBLEMS CONTD
6. Dynamic or Changing Conditions
The problem may change over time, meaning the solution
must adapt.
Example:
Managing traffic congestion changes with population
growth, road expansion, and transportation policies.
4/3/2026 20
CHARACTERISTICS OF AN ILL-
DEFINED PROBLEMS CONTD
7. Difficult to Measure Success
It may be hard to determine when the problem is fully
solved.
Example:
“How do we eliminate poverty?”
Even if poverty is reduced, the problem may still exist.
4/3/2026 21
EXERCISES
Exercise 1 – Identify the Problem
For each scenario below, identify the problem and whether it is
well-defined or ill-defined:
A student wants to calculate their average score from five exams.
A city government wants to reduce traffic congestion.
A baby cries when it is hungry.
A company wants to decide which product will be most successful
next year.
4/3/2026 22
EXERCISES
Exercise 2 – Characteristics of Problems
For the following situations, list the input, output, and steps.
Decide if the problem is well-defined:
Calculate the total bill for a restaurant order.
Suggest ways to reduce unemployment in your community.
Determine the largest number in a set of 10 numbers.
4/3/2026 23
EXERCISES
Exercise 3 – Life Problems Mapping
Map human life problems to well-defined or ill-defined problems:
Type (Well-defined
Life Stage Problem Example Reason
/ Ill-defined)
Baby Crying for food ? ?
Child Learning to read ? ?
Student Passing an exam ? ?
Adult Choosing a career ? ?
4/3/2026 24
EXERCISES
Exercise 4 – Algorithm Design (Simple)
Write an algorithm (step-by-step instructions) for the following:
Making a cup of tea.
Calculating the average of three numbers.
Checking if a student passed a course (passing mark ≥ 50).
Hint: Use clear steps, input, and output.
4/3/2026 25
EXERCISES
Exercise 5 – Flow of Problem Solving
For each of these problems, outline the problem-solving steps
(Problem definition → Analysis → Algorithm/Steps → Solution):
A student wants to find the maximum of 5 numbers.
A family wants to plan a 7-day meal schedule.
A business wants to increase its profit next quarter.
4/3/2026 26
EXERCISES
Exercise 6 – Critical Thinking
Answer the following questions in 2–3 sentences:
Why do humans face more ill-defined problems as they grow older?
Explain the difference between a problem and a solution with a life
example.
How does understanding whether a problem is well-defined or ill-
defined help in designing computer programs?
4/3/2026 27
EXERCISES
Exercise 7 – Scenario Challenge
Read this scenario and answer the questions:
"A software company wants to design an app that helps students
improve their academic performance. The app should suggest study
schedules, track progress, and motivate users."
Identify the problem.
Classify it as well-defined or ill-defined and explain why.
Suggest at least 3 steps to begin solving the problem.
4/3/2026 28
PROBLEM SOLVING IN COMPUTING
In computing, problem solving usually involves creating:
Algorithms
Step-by-step instructions for solving a problem.
Flowcharts
Graphical representation of algorithms.
Pseudocode
Structured description of an algorithm.
These tools help programmers design solutions before writing
actual code.
4/3/2026 29
CHARACTERISTICS OF A GOOD PROBLEM
SOLVER
A good problem solver should have:
1. Analytical thinking
2. Logical reasoning
3. Creativity
4. Patience
5. Attention to detail
4/3/2026 30
STEPS IN SOLVING PROBLEMS USING
COMPUTERS
Although we will study this in detail later, the general steps include:
1. Problem Definition
2. Problem Analysis
3. Algorithm Design
4. Implementation (Programming)
5. Testing and Debugging
6. Documentation
4/3/2026 31
KEY TEACHING POINT
➢As humans grow, the problems they face become more
complex and less structured.
Computer science mainly focuses on solving well-defined
problems using algorithms and programs.
4/3/2026 32