Steps in Problem Solving

 Steps in Problem Solving

Dr. Alok Pawar




A logical computation firstly requires defining the problem, secondly, as per the end user requirement, it needs analyzing and designing the output format. After this one can start the actual coding that is followed by testing and maintenance the next section explains all these phases.


Definition of the Problem:

When a problem is to be solved, two questions arise, first, what to do, and second, how to do it? This phase answers the first question, here the programmer has to define the task precisely and check for completeness, there should not be any ambiguity. The imprecisely or arbitrary defined problem may result in the wrong analysis and design.

For example:

“Solve the quadratic equation” this problem itself is not complete because it is not specified whether to find the value of roots of the quadratic equation or to find the nature of roots of the quadratic equation or both.

The different programmers may program this problem as per their understanding of the problem definition skill is directly proportional to the depth of understanding of the programmer.

In the problem definition phase, the programmer has to reflect on all the possibilities that need decision-making.


Problem Analysis:

This is the programmer’s talent-testing phase. A good analysis may result in good design and coding.

In this phase, ‘the programmer has to answer the second question.’ How to do?

This is the initial investigation of the problem. The programmer has to declare the computational strategies to analyze the defined problem with the help of available tools. Programming techniques like sequence, selection, and iteration can be used to develop the logic for analysis.


The primary operation that is performed on data are arithmetic, logical operations are searching, sorting inserting merging, etc.

Once we analyze the problem, the next phase is to design the problem.


Explore Solution:

When the programmer completes the analysis then he will explore (or design) the different solutions to the problem and the best and optimum solution is chosen by the development team.

The algorithm is the primary stage of the program. The correct and complete algorithm leads to correct and efficient program design. Once the program is defined and the idea of how to solve it is developed, the programmer can begin designing an algorithm.

Before starting designing, the problem must be refined step-wise. This is known as the top-down design. It is a strategy where the problem is divided into a hierarchical structure. A separate sub-program may be designed for each module.

The top-down approach provides a method of handling the inherent logical complexity. This allows the programmer to build solutions in a sup-wise manner.

Another important aspect of problem designing is the selection of a suitable data structure. This selection depends on the nature and amount of data to be sorted and the file organization.

Steps of using a computer as a problem-solving tool :

1.       Develop an algorithm and a flowchart

2.       Write the program in a computer language (i.e. C, Fortran)

3.       Enter the program into the computer

4.       Test and debug the program

5.       Run the program, input data, and get results from the computer.

The computer only understands the machine language; it is very difficult to write down the programs, so now a day’s only high-level languages are used to develop a program. But, directly writing programs in the high-level language is also tedious work as they may produce the wrong results. To overcome such a situation we need to follow a program development process called a system development life cycle. This process is distributed in 6 phases; it is also called a waterfall model which is shown in Fig. 1.4

 


Fig.  Waterfall model

  • System Requirement: In this phase first understand the problem, and think about what exactly has to be done. Gather all information that is essential to solve problems.
  • Analysis: In this phase all gathered information is analyzed by different alternatives depending upon the available resources.
  • Design: In this phase start to solve problems using various tools, that are flowcharts and algorithms. It is a very important step that helps in showing the flow of the program as well as detecting mistakes.
  • Coding:  Finally the design is to be converted into the coding (i. e. programs).
  • Testing: It is again a very important phase, which is used to test whether the output of the program is correct or not? This can be tested with various sets of inputs.
  • Maintenance: In this phase, the program is compared with the initial requirement, and as per requirements, new features are added to it.

Comments

Popular posts from this blog

Introduction to Problem Solving