# Problem Solving

**Topics:**Problem solving, Programming language, Algorithm

**Pages:**5 (1251 words)

**Published:**January 19, 2014

Problem Solving

Objectives

Outline the steps in problem solving

Decompose a simple problem into its significant parts

Understand the variables, constants and data types used when solving problems on a computer. Explain and develop algorithms

Represent algorithms in pseudocode or flowcharts

Topics to be covered

Problem Solving

The Processing Cycle

Defining Diagrams

Algorithms

Pseudocode

Flowcharts

Problem Solving

We are faced with different types of problems in our everyday life. Every problem requires a solution to resolve it. There maybe more than one solution to a problem. Problem-solving involves identifying, analyzing and resolving problems using logic, reasoning skills and analytical skills. A problem is a discrepancy between what is required and what exists. Problem can be simple or complex depending on its nature. A single-task problem is usually a relatively simple problem, whereas a multi-task problem is usually more complex and may require more resources to solve. A solution is a procedure consisting of a set of instructions that, if followed in order, achieve the required result. Problem solving is the thought process that requires a critical analysis of the situation (the problem) and careful consideration of possible ways of overcoming the problem. The program development process starts with a problem and ends with a solution Steps in Problem Solving

Stage 1:Definition of the problem

The actual problem is identified. The problem must be looked at carefully and if it is not phrased properly, then it should be modified to ensure clarity. Stage 2:Analyze the problem

Identify the inputs to be used, outputs required, values to be stored (if any) and the processing that needs to be done to get the correct outputs. Inputs will be the instructions that are needed to solve the problem Processing will be working with given instructions

Output will be the expected results and

Storage will be the values that need to be stored in order to display the results. A key part of understanding and solving a complex problem is breaking the problem down into simpler sub-problems. The process of repeatedly breaking down a complex problem into a set of simple sub-problems, for which we can identify at least one solution is called top-down stepwise refinement. THE DEFINING DIAGRAM

Define the problem by constructing a defining diagram or IPO chart. A table with three columns which represents the three components: input, processing and output. E.g. A program is required to read three numbers then calculate and print the sum. Stage 3:Propose and evaluate possible solutions

Generally all problem statements have more than one option. Look at each option to decide which is best to use. Stage 4:Develop and represent an algorithm

Break down the problem into simple manageable steps, so it can be handled easily. These simple steps of a problem are called algorithm. An algorithm is a finite number of accurate, unambiguous steps that solve a problem or task. It is developed, documented and tested prior to its implementation using a programming language. This algorithm may be represented using a pseudocode or a flowchart. Stage 5: Test and validate the algorithm

Check the algorithm that was written using some values to ensure that it produces the required results. This process of desk checking allows you to solve some errors before it is converted into computer instructions. Desk checking is manually going through an algorithm with a set of different values to see if it will produce the required results. Stage 6: Implement the algorithm

Here the steps of the algorithm are written using a programming language so that a computer can operate on it. When the instructions are in a programming language, the instructions are called a program. A program is a set of instructions written in a programming language that directs the computer to solve a problem. Stage 7:Run the program...

Please join StudyMode to read the full document