Flow Charts
Flow chart
A visual representation of an algorithm, using symbols to show the sequence, decisions, and processes involved in solving a problem.
- Flow charts are a powerful tool for visualising algorithms.
- They use standardised symbols to represent different types of actions or decisions.
- By following the flow of the chart, you can trace how an algorithm works step by step.
- Think of a flow chart as a roadmap for an algorithm.
- Just as a map guides you through a journey, a flow chart guides you through the steps of a solution.
Flow charts are especially useful for tracing algorithms and ensuring correctness before implementation.
ExampleIn a bank, a flow chart might represent the steps for approving a loan, including checks for credit score and income verification.
Key Symbols in Flow Charts
| Symbol | Meaning |
|---|---|
| Oval | Start/End |
| Rectangle | Process (e.g., calculations, assignments) |
| Diamond | Decision (e.g., conditionals) |
| Parallelogram | Input/Output |
| Arrow | Flow of Control |

Analysis and Tracing
ExampleConsider a flow chart that calculates the sum of the first $N$ natural numbers.

Step-by-Step Analysis: