Programming & Data Structures
Tutorial 9
Problem Solving Tutorial (well sort of)
Developing algorithms is about problem solving.
There are four phases (or steps) of
problem solving and from these we can tackle any problem. There are also several problem
solving 'paradigms'.
A paradigm is a general method for tackling a problem.
There are
many paradigms, inferencing, hill climbing, divide and conquer, working backwards etc.
We
will visit a number of these during the course.
Four Phases of Problem Solving
George Polya was a hungarian mathematician.
He was born in 1887 in Budapest and died in
1985 in California.
Worked in many areas of mathematics.
His most famous book "How To
Solve It", published early in his career and many times since, outlined 4 steps to solving
any problem.
1.
Understand the Problem
•
Step seems trivial but is extremely important.
•
Must understand problem before it can be solved.
•
How do you know when you have a solution or have reached goal? What is
unknown? data? conditions?
•
State problem in your own words.
•
Helpful Hints: Write things down. Draw a figure.
2.
Devise a Plan
•
How to get started?
•
Similar problem, smaller version of problem, look at specific examples.
•
Consider various strategies and techniques discussed below.
3.
Carrying Out the Plan
•
Check each step of your plan for correctness?
•
Test on several examples
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 JenniferChen
 How to Solve It, Divide and conquer algorithm

Click to edit the document details