Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Algorithm for problem solving (AutoRecovered)

The document introduces algorithms as a series of sequential steps used to solve problems, emphasizing the need for clear problem definition and methodical instruction to the computer. It outlines the stages of problem solving, including understanding, analyzing, developing, and coding solutions, and describes the characteristics of effective algorithms. Additionally, it categorizes operations within algorithms into sequential, conditional, and iterative types, highlighting the importance of clarity, input/output definition, finiteness, feasibility, and independence in algorithm design.

Uploaded by

kaneno karabu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Algorithm for problem solving (AutoRecovered)

The document introduces algorithms as a series of sequential steps used to solve problems, emphasizing the need for clear problem definition and methodical instruction to the computer. It outlines the stages of problem solving, including understanding, analyzing, developing, and coding solutions, and describes the characteristics of effective algorithms. Additionally, it categorizes operations within algorithms into sequential, conditional, and iterative types, highlighting the importance of clarity, input/output definition, finiteness, feasibility, and independence in algorithm design.

Uploaded by

kaneno karabu
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Algorithm for problem solving:

An Introduction
– Properties of algorithm
- A computer is a very powerful and versatile machine capable of performing a multitude of
different tasks, yet it has no intelligence or thinking power. The intelligence Quotient
(I.Q) of a computer is zero. A computer performs many tasks exactly in the same manner as
it is told to do. This places responsibility on the user to instruct the computer in a correct and
precise manner, so that the machine is able to perform the required job in a proper way. A wrong
or ambiguous instruction may sometimes prove disastrous. In order to instruct a computer
correctly, the user must have clear understanding of the problem to be solved. A part from this he
should be able to develop a method, in the form of series of sequential steps, to solve it. Once the
problem is well-defined and a method of solving it is developed, then instructing he computer to
solve the problem becomes relatively easier task. Thus, before attempt to write a computer
program to solve a given problem. It is necessary to formulate or define the problem in a precise
manner. Once the problem is defined, the steps required to solve it, must be stated clearly in the
required order. A computer cannot solve a problem on its own. One has to provide step by step
solutions of the problem to the computer. In fact, the task of problem solving is not that of the
computer. It is the programmer who has to write down the solution to the problem in terms
of simple operations which the computer can understand and execute. In order to solve a
problem by the computer, one has to pass though certain stages or steps. They are :
1. Understanding the problem
2. Analyzing the problem
3. Developing the solution
4. Coding and implementation.

1: Here we try to understand the problem to be solved in totally. Before with the next stage or
step, we should be absolutely sure about the objectives of the given problem. 2. : After
understanding thoroughly the problem to be solved, we look different ways of solving the
problem and evaluate each of these methods. The idea here is to search an appropriate solution
to the problem under consideration. The end result of this stage is a broad overview of
the sequence of operations that are to be carries out to solve the given problem. 3: Here the
overview of the sequence of operations that was the result of analysis stage is expanded to
form a detailed step by step solution to the problem under consideration. 4. : The last stage of
the problem solving is the conversion of the detailed sequence of operations in to a language that
the computer can understand. Here each step is converted to its equivalent instruction or
instructions in the computer language that has been chosen for the implantation. A set of
sequential steps usually written in Ordinary Language to solve a given problem is called
Algorithm. It may be possible to solve to problem in more than one ways, resulting in more than
one algorithm. The choice of various algorithms depends on the factors like reliability,
accuracy and easy to modify. The most important factor in the choice of algorithm is the time
requirement to execute it, after writing code in High-level language with the help of a computer.
The algorithm which will need the least time when executed is considered the best. Steps
involved in algorithm development An algorithm can be defined as “a complete, unambiguous,
finite number of logical steps for solving a specific problem “
❖What is an algorithm? A process which involves a series of steps and instructions to solve a
problem. ➢All algorithms use 3 type of operations
1. Sequential Operations- a. It’s a single operation.
b. Individual sections c. Example: Add one cup of water to the mixture.
Set the value of x to one.
2. Conditional operations
a. Decides what the next operations should be.
b. If, then, else statements
3. Iterative operations- looping
a. Repeats operation block of instructions. It’s very important to identify how many repetitions to
operate. b. Example: Repeat, until
Characteristics of an algorithm
•An algorithm should have the following characteristics:
•Unambiguous-Each of its steps (or phases), and their inputs/outputsshould be clear and must
lead to only one meaning.
•Input-It should have 0 or more well-defined inputs.
•Output-It should have 1 or more well-defined outputs, and should match the desired output.
•Finiteness-It must terminate after a finite number of steps.
•Feasibility-Should be feasible with the available resources.
•Independent-An algorithm should have step-by-step directions, which should be independent of
any programming code.

Example
Step 1 : Start
Step 2 : Accept first number
Step 3 : Accept second number
Step 4 : Add these two numbers
Step 5 : Display result
Step 6 : Stop

You might also like