Introduction to Problem-Solving I.pptx
Introduction to Problem-Solving I.pptx
COMPUTER SCIENCE
Introduction to
problem solving i
DR JEREMIAH O. BANDELE
PhD Electrical/Electronic Engineering
University of Noingham
DEPARTMENT OF
COMPUTER SCIENCE
Learning objectives
After the problem to be solved is programmed as inputs, the inputs are passed to the computer
using input devices such as keyboard, mouse, joystick and an external memory device.
How do computers solve problems ?
The computer processes the input in its central processing unit (CPU).
How do computers solve problems ?
The computer provides the result with output devices such printer, monitor, loudspeaker
and sound card.
Computational problem
● Decision problems: These are problems where the solution can either be YES
or NO
● Search problems: These are problems where the solution is a value or values
with a particular property.
Computational problem types
● Optimization problems: These are problems where the best possible solution is
accepted as the solution.
● Counting problems: These are problems where the solution is determining the
number of values with a particular property.
Four steps to problem-solving
Understand the
problem
Create a solution
step-by-step plan
Evaluate and
refactor the
solution
understanding the problem
With the help of input devices, computers will accept anything that can be converted to a
digital form as inputs. These can include the following;
● Numbers
● Letters
● Pictures
● Music
● Videos
● Sound waves
● Retinal scans
● Wi-fi signals
What can the computer accept as input?
After the CPU processes the inputs, the computer uses output devices to create various
outputs. These can include the following;
● Printed documents
● On-screen data
● Visuals
● Audio
● Digital music files
● Digitized speech
● Charts and graphs
● Images
Creating a step-by-step solution plan
After the problem is well understood, the next step is to create a step-by-step solution plan.
A step-by-step plan usually involves a process of breaking down the main problem into smaller
problems until the problems are small enough to be solved.
Solving all the small problems automatically solves the main problem
Creating a step-by-step solution plan
START
Input
G1,G2,G3,G4,G5
Grade = (G1+G2+G3+G4+G5)/5
Is Grade
> 44
Print Print
“FAIL” “PASS”
STOP
FURTHER READING RESOURCES