Introduction To Problem Solving
Introduction To Problem Solving
V I
S OL
E M
BL
RO
P
OBJECTIVES
• Define the terms: ‘problem’,’ ‘process’, problem solving’, ‘algorithm’
• Describe simple processes in everyday life
• List the steps to solve a problem
• Explain the steps involved in problem solving process
• Devise algorithms to solve real life problems
• Define the term algorithm
• Explore characteristics of a good algorithm
• Compare algorithms and select the best option
• Describe the importance of an algorithm
• Use simple algorithm to solve everyday problems
• Define the term flowchart
• Identify flowchart symbols
• Draw simple flowcharts
WHAT IS A PROBLEM?
• https://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut8_pro
bsol.htm
WHAT IS AN ALGORITHM?
The
number of Steps must
steps must be Must
be finite unambiguous terminate
Must be Must
precise have Must lead
flow to an
control output
CHARACTERISTICS OF A GOOD
ALGORITHM
• Precision — the steps are precisely stated or defined.
• Uniqueness — results of each step are uniquely
defined and only depend on the input and the result
of the preceding steps.
• Finiteness — the algorithm always stops after a
finite number of steps.
• Input — the algorithm receives some input.
• Output — the algorithm produces some output.
WAYS TO REPRESENT ALGORITHM
• Accept the price of an item. IF it is greater than 500 give a discount of 10%.
• Print Accept if the age of a party-goer is greater than 18, otherwise print Decline.
• Accept a student grade and print “You got first Honors” if the grade is 90 or more.
• Homework on Moodle
FLOWCHART
FLOWCHART
Redo all the algorithms as Flowcharts.