0% found this document useful (0 votes)
2 views2 pages

COM113 Assignment Algorithm Representation

The document outlines various methods for representing algorithms, including flowcharts, pseudocode, English natural language, data flow diagrams, and decision tables. Each method is described with its symbols and examples to illustrate how algorithms can be effectively communicated. These representations help in making algorithms understandable to different audiences, from programmers to non-programmers.

Uploaded by

umarabubakar4077
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)
2 views2 pages

COM113 Assignment Algorithm Representation

The document outlines various methods for representing algorithms, including flowcharts, pseudocode, English natural language, data flow diagrams, and decision tables. Each method is described with its symbols and examples to illustrate how algorithms can be effectively communicated. These representations help in making algorithms understandable to different audiences, from programmers to non-programmers.

Uploaded by

umarabubakar4077
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

COM113 Assignment: Methods of

Representing Algorithms
Introduction
An algorithm is a step-by-step way to solve a problem. There are different ways to show or
represent an algorithm so that others can understand it easily. The common methods
include:

1. Flowchart
A flowchart is a diagram that uses symbols (like arrows, ovals, rectangles, diamonds) to
show the steps in an algorithm.

- Oval = Start or End

- Rectangle = Process or instruction

- Diamond = Decision (Yes/No)

- Arrow = Shows the flow (direction) of steps

Example: Start → Input Numbers → Add Them → Show Result → End

2. Pseudocode
Pseudocode is a simple way of writing the algorithm using a mix of plain English and
programming-style logic.

It is not a real programming language. It uses clear and short instructions like:

Start
Input A, B
Sum = A + B
Print Sum
End

3. English Natural Language


This means writing the steps of the algorithm using normal everyday English.

It is the simplest form. Useful for explaining the logic to people who don't know
programming.

Example: "First, take two numbers from the user. Then, add the numbers. Finally, show the
result."
4. Data Flow Diagram (DFD)
A Data Flow Diagram shows how data moves through a system.

It shows input, process, and output. Symbols used:

- Circles for processes

- Arrows for data flow

- Rectangles for external entities (like users)

- Open rectangles for data stores (like files or databases)

5. Decision Table
A Decision Table is used to represent complex decision-making using a table.

Rows = Conditions and Actions


Columns = Different possible situations (rules)

Example:
| Condition 1 | Condition 2 | Action |
|-------------|-------------|--------|
| Yes | No | Do X |
| No | Yes | Do Y |

You might also like