0% found this document useful (0 votes)
34 views6 pages

Algorithms and Flowcharts Explained

The document explains algorithms as step-by-step procedures for problem-solving, emphasizing their properties and advantages, such as reduced complexity and increased flexibility. It also introduces flowcharts as graphical representations of algorithms, detailing their uses, symbols, and guidelines for drawing them. Additionally, it addresses limitations of flowcharts, including challenges in complexity and the need for redesign when changes occur.

Uploaded by

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

Algorithms and Flowcharts Explained

The document explains algorithms as step-by-step procedures for problem-solving, emphasizing their properties and advantages, such as reduced complexity and increased flexibility. It also introduces flowcharts as graphical representations of algorithms, detailing their uses, symbols, and guidelines for drawing them. Additionally, it addresses limitations of flowcharts, including challenges in complexity and the need for redesign when changes occur.

Uploaded by

aslamsaira437
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Title:

Flowcharts And Algorithms


Algorithm:
An algorithm is a step-by-step procedure to solve a problem. The process of solving a
problem becomes simpler and easier with the help of an algorithm. It is better to write an
algorithm before writing the actual computer program.

Properties Of Algorithm
Different properties of an algorithm are as follows:
The given problem should be broken down into simple and meaningful steps.
The steps should be numbered sequentially.
The steps should be descriptive and written in simple English.
Algorithms are written in a language that is similar to simple English called pseudo
Code. There is no standard to write pseud code. It is used to specify program logic in an English
like manner that is independent of any particular programming language.
Pseudo code simplifiers program development by separating it into two main parts.
1. Logical Design In this part, the logic of the program is designed. We specify different
steps required to solve the problem and sequence of these steps.
2. In this part, the algorithms is converted into a program. The steps of the algorithm are
translated into instructions of any programming language.
The use of pseudo code allows the programmer to focus on the planning of program. After the
planning is final, it can be written in any programming language.
Example :
The following algorithm inputs two numbers, calculates sum and then displays the result
on screen.
1. Start
2. Input A
3. Input B
4. Total =A+B
5. Display Total
6. Exit
Advantages of Algorithm
Some of advantages are as follows;

1 .Reduced Complexity
Writing algorithm and program separately simplifies the overall task by dividing it into
two simpler tasks. While writing the algorithm, we can focus on solving the problem instead of
concentrating on a particular language.

[Link] Flexibility
Algorithm is written so that the code may be written in any language. Using the
algorithm, the program could be written in visual Basic ,Java or C++ etc.

3. Ease of Understanding
It is not necessary to understand a particular programming language to understand an
algorithm. It is written in an English like manner.

Flowcharts:
Flowchart is a combination of two words flow and chart. A chart consists of different symbols to
display information about any program. Flow indicates the direction of processing that takes
place in the program.
Flowchart is a graphical representation of an algorithm. It is a way of visually presenting
the flow of data, operations performed on data and sequence of these operations. Flowchart is
similar to the layout plan of a building. A designer draws the layout plan of the building before
constructing it. Similarly , a programmer prefer to design the flowchart before writing the
computer program. Flowchart is designed according to the defined rules.

Uses of Flowchart
Flowchart is used fot the following reasons.
1. Flowchart is used to improve the logic for solving a problem.
2. Flowchart is used to show represent an algorithm in simple graphical manner.
3. Flowchart is used to show the steps of an algorithm in any easy way.
4. Flowchart is used to understand the flow of the program.
5. Programs can be reviewed and debugged easily.
Flowchart Symbols
The standard symbol are used to draw a flowchart. The commonly use standard
symbols to draw flowcharts are a follows:
1. Start / Terminal
Oval is used to represent the start or end of the flowchart. It is also called
terminal.

Example
The following example displays the start and end steps in the flowcharts.

Start End
2. Input / Output
Parallelogram is used to represent an input or output step in the flowchart.

Example
The following example displays the inputs and output steps in the
flowchart .

Input Marks Display Marks


3. Process
Rectangle is used to represent a
processing or computational operation in the flowchart.

Example
The following example display the processing step in the flowchart.
Sum = A +B

4. Flow Lines
Arrows are used to represent the direction of flow in the flowchart. There are four
flow lines to represent four directions.

5. Decision
Diamond symbol is used to represent decision step in the flowchart. A condition is
given in the diamond. The flow of control from diamond symbol may go in two
possible directions. It goes to one direction if the condition is TRUE or YES and to
second direction if the condition is FALSE or NO .

6. Connector
Circle symbol is used to combine different flow lines. It is used when two or more
flow symbols come from different direction and move to one direction.

7. Functional call
Rectangular symbol with the double line on left and rights sides is used to
call a function . The name of a function with parentheses is written inside
the symbol.

8. Preparation
This symbol is used with for loops to specify start and stop condition.
Guidelines for Drawing Flowchart
Different guidelines for drawing a flowchart are as follows:

1. All necessary requirements should be listed in a logical order while drawing a flowchart.
2. Flowchart should be clear, neat and easy to follow.
3. The flow of flowchart can be from left to right or top to bottom.

4. Only one flow line should enter and come out of the process symbol.
5. Only one flow line can enter a decision symbol. However, two flow lines can be out of
it.

6. Only one flow line can be used in Start and End symbols.
7. The intersection of flow lines should be avoided.
8. The comments should be written in remarks symbol.
9. The connector should be used to reduce the number of flow lines if the flowchart
become complex.
10. It is useful to ensure the validity of flowchart by testing it with sample data .

Limitations of Flowchart
The limitation of flowchart are as follows;

1. It is difficult to draw flowcharts for complex problems.


2. The flowchart has to be redesigned if any change is required.
Example 1
The following flowchart finds the total of two numbers.

Start

Input a, b

Sum = a+ b

Print sum

End

Common questions

Powered by AI

Flowcharts improve problem-solving logic by offering a visual representation of the program's flow. By mapping out the sequence of operations and data flow, they help in visually organizing information, which can lead to better understanding and debugging of the program's logic. Flowcharts use standard symbols to depict the start, process, decision points, and endpoint, thereby allowing programmers to see the logic transparently and make necessary adjustments before coding .

Algorithms and flowcharts complement each other in program development by providing a dual approach to problem-solving. Algorithms offer a textual, step-by-step representation of the solution, detailing logical operations to be performed, while flowcharts give a graphical view, mapping out the flow of data and sequences visually. Together, they provide a comprehensive understanding, facilitating both the conceptualization and implementation phases, and ensuring that the logical structure is clearly defined and easy to follow before any coding begins .

Guidelines for drawing an effective flowchart include ensuring that all necessary requirements are listed logically, maintaining clarity and neatness, ensuring flow from left to right or top to bottom, and reducing complexity by using connectors to prevent too many intersecting lines. These guidelines are important because they enhance the readability of the flowchart, make it easier to follow the logical progression of an algorithm, and improve the effectiveness of the flowchart in problem-solving and communication .

Ignoring flowchart drawing guidelines can significantly impact program development by leading to unclear, confusing, and misinterpreted representations of the program logic. Lack of standardization can result in difficulty understanding the flow, increased complexity, and errors during program execution. It can also hinder communication within the development team, complicate debugging processes, and prolong development time as developers attempt to decipher poorly constructed flowcharts .

Flow lines in a flowchart play a crucial role by indicating the direction of flow from one operation to another. They visually connect different symbols, showing the sequence of actions or decisions as the program progresses. This guidance gives a clear pathway of how data moves through processes and decisions, ensuring that the reader can easily follow the program's logic .

Flowchart symbols ensure clarity and standardization by using universally recognized shapes to represent different types of operations. An oval indicates start or end points, parallelograms denote input/output operations, rectangles signify processing steps, diamonds indicate decision points, and arrows show the direction of flow. This standardization reduces ambiguity, simplifies the representation of complex processes, and facilitates easier communication of algorithm logic across different teams and stakeholders .

Decision points in flowcharts are represented by diamond symbols and are critical for illustrating conditions that guide the flow of the process either towards one path or another. They allow for the representation of branching in algorithms, reflecting how different choices or conditions can generate alternative pathways through the program logic. By visually indicating where decisions impact flow, they provide clarity on potential outcomes and facilitate understanding of how different conditionals are handled in the algorithm .

The primary advantages of using algorithms are reduced complexity, increased flexibility, and ease of understanding. By writing an algorithm separately from the program code, the problem is simplified into digestible steps. The algorithm can be independent of any specific programming language, allowing for programming in multiple languages such as Visual Basic, Java, or C++. Additionally, because an algorithm is written in English-like pseudocode, it is easy to understand without needing knowledge of a particular programming language .

Flowcharts are limited in their ability to represent complex problems due to their static and linear nature. It is often challenging to capture intricate logic or numerous decision points graphically. Flowcharts can become unwieldy, and any change in the logic requires a complete redesign, which can be time-consuming and prone to errors. Additionally, the intersection of flow lines should be avoided, complicating the representation of multifaceted logic .

Pseudocode enhances the program development process by separating the logical design from coding concerns. It provides a straightforward, English-like description of the algorithm's logic without focusing on syntax peculiarities of a programming language. This separation allows programmers to concentrate on problem-solving and refine the logical flow before translation into code. As a result, it can reduce errors and enhance understanding and communication among team members .

You might also like