Steps in Problem Solving
There are many ways to solve a problem but having a process to follow can help make problem solving easier. If you do not think through a problem logically, then you end up just going around in circles and never solving it. The following is just one of many Six Step Problem Solving Systems, which can be used to solve any type of problem, not just ones that will be solved on a computer. The good thing is that the system translates nicely to computer problems, which is very useful, since the focus of the book is to solve problems on a computer.
The six steps in this system are:
What is the problem
Make a model
Analyze the model
Find the solution
Check the solution
Document the solution
What is the Problem
Before you can solve a problem correctly, you have to ensure that you understand the problem thoroughly. Many times you will have to go back to the source of the problem and confirm information or ask additional questions. You might have to have them restate the problem so that it is very clear what they are asking. Here are things to remember:
What am I trying to find?
What do I know / don’t know?
State the problem in your own words.
Get them to restate the problem.
Make a Model
Making a model of a problem is a great way to see what is really going on and to lead you to a solution. It can show you patterns or you might recognize the problem from before. The model might be a drawing, picture, chart, a physical 3D scale model, or something else. Most “good” problems are too complex to be solved simply, they need to be broken down into smaller pieces, solve each of the smaller pieces and then bring all the small solutions back together to solve the original problem. Here are things to remember:
Draw or create a model.
Break the problem down into pieces.
Is there a pattern?
Have you seen something similar?
Analyze the Model
Once you have broken the problem down into more manageable pieces and made a model of the problem or the pieces of the problem, the next step is to understand what is really going on. If you do not become an expert at the problem, you might miss an important aspect. It is always a good idea to go back, not to the person that asked the question but the person that will be using the solution, to get information from them. Each piece might have a pattern that can be followed. You might have seen a solution for one of the pieces before. Here are things to remember:
Ensure the model does what you think it does.
Look for patterns you have seen before.
Go back to the user to get more information.
Find the Solution
The hard part is now to find a solution. Hopefully you are well on your way by doing the above three steps. Can you find a pattern? Do you know the solution to one of the pieces? Can you find the solution somewhere (internet!)? In the world of programming there are books like, Patterns and Practices, that are full of common problems and their solutions. Once you have all your solutions, the next step is to bring them all together to a final overall solution to the original problem. Here are things to remember:
Find a solution to each piece of the problem.
Find other people’s solutions to similar problems.
Make sure all the pieces fit back together.
Check the Solution
You now (hopefully) have a solution to the original problem that you are pretty sure works. The next step is to ensure it actually solves exactly what the problem was. You might need to go through, step by step, to ensure it works. You might need to work through the solution and confirm the answer you get is correct. You might have to work through the solution several times and ensure you always get the same (or similar) answer. Here are things to remember:
Is the answer reasonable?
Work through the solution and check for errors.
Go through the solution several times and compare results.
Document the Solution
So you have come up with a brilliant solution to a problem. If you do not share the solution with anyone, what was the point? You have to ensure that your answer is verifiable and reproducible, so anyone can use it. Here are things to remember:
Document what the problem and solution is.
Ensure anyone can follow your steps.