Problem Solving

“Problem-solving concepts are extremely important in everyday life.  Virtually everything that we do either requires problem solving or else, we merely execute a procedure previously developed via problem solving.

Typically, the way we solve problems is very informal. In fact, we are rarely aware that we are solving a problem at all.  Most of the problem solving we do is at the subconscious level.

There are two basic classes of problems that we solve: problems that occur once or very infrequently, and problems that occur frequently.  In the case of problems that occur frequently, we usually develop a method (or several methods) of solution.  We then use this method to solve the problem each time it occurs.”

“The informal manner in which we solve our everyday problems is usually satisfactory for our purposes.  However, when we use a computer to execute a problem solution, it is necessary to develop a well defined, precise, unambiguous sequence of steps for our solution. This requires a more formal problem-solving process.”

“In summary, our approach to any programming problem is to

1. Analyze – We can summarize problem analysis by stating that it includes:

development of a precise definition of the problem;
decomposition of the problem into subproblems until all the subproblems are immediately solvable (executable), i.e., they are primitives;
determination of all required input;
determination of all desired output

2. Write A Plan
3. Test The Plan
4. Translate The Plan Into code
5. Test The Translation

If you have trouble at any one of the above stages, you should return to the previous stage to make sure that it has been done correctly. Most programs that don’t run as desired have been based on faulty plans; most faulty plans have been based on a poor understanding of the problem or of its solution. Therefore, each stage is important each should be done thoroughly. In the long run, programs will be written much more efficiently that way.”

 INTRODUCTION TO COMPUTER SCIENCE: PROBLEM SOLVING, G. Murphy, D. Clark, F. Grossman, ©1990.

Leave a Reply

Your email address will not be published. Required fields are marked *