0% found this document useful (0 votes)
24 views8 pages

Unit 2

Uploaded by

hereisabhi4u
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views8 pages

Unit 2

Uploaded by

hereisabhi4u
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Unit 2: Algorithmic thinking

Flowcharts
A flowchart is a diagram that shows an overview of
a program. Flowcharts normally use standard symbols to
represent the different types of instructions. These symbols
are used to construct the flowchart and show the step-by-step
solution to the problem. Flowcharts are sometimes known as
flow diagrams.

Common flowchart symbols

Advantages of Flowcharts
1. Easy to make: Experts knowing flowchart
symbols can easily make the diagram without much
difficulty. Since a good diagram must simply
represent the whole process thus it is the task of an
expert to summarize and show the task in a unique
way that would help in further prompt decisions.

2. Communication becomes effective and easy to


understand: As everything is recapitulated by the
expert in such a way that the user of the flowchart
can easily understand and give possible feedback,
thus communication becomes very effective. Users
can now make further changes in the technique or
implement new ones.
3. Mistakes can be easily identified: Through the
simple structure of the flowchart it becomes easy for
users to identify the mistake in the whole process
and correct the technique or implement a new one.
The mistakes can be easily eliminated and valid or
reasonable techniques can be evolved.

4. Analysis becomes effective: with the help of


flowcharts problems on the ground can be easily
identified and analyzed in a very effective manner so
that cost reduction and time allocation can be made
in potential areas. The analysis further helps in
improvement in different areas of the process.
5. Synthesis becomes effectual: As the analysis
becomes effectual the synthesis process becomes
easy for users to make decisions without any delay.
The process involved as shown in the flowchart can
easily be put together to finalize the result.

6. Debugging becomes possible: Debugging helps in


identifying errors in the whole flowchart step by
step. As each of the steps or processes involved is
described through symbols thus it becomes easier to
identify the issue thus helping in debugging.

7. Logics can be easily interpreted: With the set of


logic using symbols, it becomes easy for the
decision-maker to interpret and show the result
thereof. The alignment of logic in each step makes it
more convenient for users to understand the
flowchart without making delay.

Disadvantages of Flowchart

1. Difficulty in presenting complex programs and


tasks: Complex tasks cannot be presented through
symbols so easily. Sometimes it becomes difficult
for even for the expert to present the program having
complicated steps. Various logics of the program are
difficult to draw in a set or already defined shapes in
a flowchart.
2. No scope for alteration or modification: If there is
any error found in the process or logic of the
flowchart, it is difficult to alter or modify the same.
This is because either we have to erase the beginning
or end of the program and the whole flowchart is
affected.

3. Reproduction becomes a problem: The flowchart


symbols cannot be drawn. We have to use different
applications like Word or Excel to draw shapes and
type words inside those symbols. This recreation
becomes difficult as they require shapes to present
the whole process.
4. It’s a time-consuming process: as we have already
seen, reproduction of flowcharts is a problem due to
the complexity of shapes and the use of no specific
application to give already set up symbols to write
the logic of the process or task. Thus it becomes a
time-absorbing task.

5. Difficult to understand for people who don’t


know flowchart symbols: Since not all are experts
in understanding the purpose and motive behind
using specific symbols in a flowchart it is not
understandable by the common people instantly.
This proper knowledge and expertise are important
to understand the flowchart. Thus communication
will become more effective.
6. No man to computer communication: A flowchart
is not meant for man to computer communication.
Only man can interpret the result of the flowchart.

Definition of Algorithm
The word Algorithm means ” A set of finite rules or
instructions to be followed in calculations or other problem-
solving operations ”
Or
” A procedure for solving a mathematical problem in a finite
number of steps that frequently involves recursive
operations”.
Therefore Algorithm refers to a sequence of finite steps to
solve a particular problem.

What is the need for algorithms?


1. Algorithms are necessary for solving complex
problems efficiently and effectively.

2. They help to automate processes and make them more


reliable, faster, and easier to perform.

3. Algorithms also enable computers to perform tasks


that would be difficult or impossible for humans to do
manually.

4. They are used in various fields such as mathematics,


computer science, engineering, finance, and many
others to optimize processes, analyze data, make
predictions, and provide solutions to problems.

What are the Characteristics of an Algorithm?

• Clear and Unambiguous: The algorithm should be


unambiguous. Each of its steps should be clear in all
aspects and must lead to only one meaning.

• Well-Defined Inputs: If an algorithm says to take


inputs, it should be well-defined inputs. It may or may
not take input.

• Well-Defined Outputs: The algorithm must clearly


define what output will be yielded and it should be
well-defined as well. It should produce at least 1
output.

• Finite-ness: The algorithm must be finite, i.e. it


should terminate after a finite time.

• 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.

• 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.
• Input: An algorithm has zero or more inputs. Each
that contains a fundamental operator must accept zero
or more inputs.

• Output: An algorithm produces at least one output.


Every instruction that contains a fundamental operator
must accept zero or more inputs.

• Definiteness: All instructions in an algorithm must be


unambiguous, precise, and easy to interpret. By
referring to any of the instructions in an algorithm one
can clearly understand what is to be done. Every
fundamental operator in instruction must be defined
without any ambiguity.
• Finiteness: An algorithm must terminate after a finite
number of steps in all test cases. Every instruction
which contains a fundamental operator must be
terminated within a finite amount of time. Infinite
loops or recursive functions without base conditions
do not possess finiteness.

•Effectiveness: An algorithm must be developed by


using very basic, simple, and feasible operations so
that one can trace it out by using just paper and
pencil.
Advantages of Algorithms:
• It is easy to understand.

• An algorithm is a step-wise representation of a


solution to a given problem.
• In an Algorithm the problem is broken down into
smaller pieces or steps hence, it is easier for the
programmer to convert it into an actual program.

Disadvantages of Algorithms:

• Writing an algorithm takes a long time so it is time-


consuming.

• Understanding complex logic through algorithms can


be very difficult.

• Branching and Looping statements are difficult to


show in Algorithms(imp).

You might also like