Digital and Technological Solutions Syllabus and Study Material Get Now!

Algorithms and Flowcharts

0

PROBLEM-SOLVING: ALGORITHM AND FLOWCHART

Problem Solving:

A problem can be regarded as a difference between the actual and desired situations. It identifies the gap between the current state and desired state of a process or product. Problems can be of any type viz. Mathematical and scientific problems, traffic problems, COVID-19 control, Admission process in a college, Data processing, weather forecasting, disaster management, hunger, poverty, scarcity of water, unemployment, etc. A problem statement is a concise description of an issue to be addressed or a condition to be improved upon.

Computers can't solve all the problems mentioned above. Problems that can be solved through a computer may range in size and complexity. Since computers do not possess any common sense and cannot make any arbitrary decisions, the problem, whether it is simple or complex, has to be broken into a well-defined set of solution steps for the computer to implement. Thus Problem-solving is the process of solving a problem in a computer system by following a sequence of steps.

Let us consider a case, where we have to find the sum of 3 numbers.

Our simple mathematical solution will be the following steps:

1. Take the first number.
2. Take the second number.
3. Take the third number.
4. Add all the numbers.
5. This computes the required result

In computer programming, we give these instructions (steps) to a computer using any programming language that the computer understands and this ultimately solves the given problem.

Algorithms

An Algorithm is a procedure or formula for solving a problem, based on conducting a sequence of specified actions. It is a tool that provides a well-defined &t efficient computational procedure to transform your input into output. An algorithm is defined as a step-by-step procedure for solving a given problem.

The algorithm solves a given problem in three steps:

1. Input
2. Process
3. Output

Any of these steps can be a combination of two or more statements.

Let us take an example of the algorithm:

Example1

Algorithm to find the perimeter of a rectangle

1. Start
2. Input length L
3. Input breadth B
4. Perimeter=2 * (L + B)
5. Print Perimeter
6. Stop

Characteristics of an algorithm

1. Clear and Unambiguous: The algorithm should be clear and unambiguous. Each of its steps should be clear in all aspects and must lead to only one meaning.

2. Well-Defined Inputs: If an algorithm says to take inputs, it should be well-defined inputs.

3. Well-Defined Outputs: The algorithm must clearly define what output will be yielded and it should be well-defined as well.

4. Finiteness: The algorithm must be finite, i.e. it should terminate after a finite time.

5. Feasible: The algorithm must be simple, generic, and practical, such that it can be executed with the available resources. It must not contain some future technology or anything.

6. Language Independent: The Algorithm designed must be language-independent, i.e. it must be just plain instructions that can be implemented in any language, and yet the output will be the same, as expected.

Properties of an Algorithm

1. It should terminate after a finite time.
2. It should produce at least one output.
3. It should take zero or more input.
4. It should be deterministic means giving the same output for the same input case.
5. Every step in the algorithm must be effective i.e. every step should do some work.

Flowchart

The flowchart is a pictorial representation of the separate steps of a process in sequential order. It is a general tool that can be adapted for a wide variety of purposes and can be used to describe various processes, such as a computer program, manufacturing process, administrative or service process, or a project plan.

Symbols used in flowcharts :

Symbol

Name

Function

The terminator symbol marks the starting
or ending point of the system. t usually
Contains the word "Start or "End."

Start/ End

Arrow/Flow Line

An arrow from one process step to the next
is often called a "Flow Line", or simply an
"Arrow. As the names indicate, they show
the direction of process flow.

Input/output Symbol

It is used to represent the inputs given by
the user to the process and the outputs
given by the process to the user.

It represents the actions, logics and
calculations taking place in a process.

Process

Diamond or Decision Symbol It represents the condition or the decision-
making step in the flowchart. The result
of the decision is a Boolean value, which

is either true or false. Each of these values
takes the flow of the program to a certain
point, which is shown with the help of

arrows.

It is represented by a circle in a flowchart.
It represents the continuation of the flow
ot steps when a flowchart continues to the
next page.

Connector

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment

buttons=(Accept !) days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top