Definition:Flow Chart
Definition
A flow chart is a graphical depiction of an algorithm in which the steps are depicted in the form of boxes connected together by arrows.
Let $F$ and $P$ be sets.
Let $C = \struct {V, E}$ be a finite digraph.
Let $V$ be divided into pairwise disjoint sets $\tuple {V_F, V_P, V_J, V_I, V_O}$.
These are assigned specific terms:
- $V_F$ are the functional boxes
- $V_P$ are the predicative boxes
- $V_J$ are the junctions
- $V_I$ are the entry points
- $V_O$ are the exit points
Let each $b \in V_F$ be assigned a unique $F_b \in F$, and each $b \in V_P$ be assigned a unique $P_b \in P$.
Suppose:
- Each $b \in V_F$ has in-degree $1$ and out-degree $1$.
- Each $b \in V_P$ has in-degree $1$ and out-degree $2$.
- Additionally, exactly one arc incident from $b$ is assigned the label $\top$, and the other is assigned the label $\bot$.
- Each $b \in V_J$ has in-degree $2$ and out-degree $1$.
- Each $b \in V_I$ has in-degree $0$ and out-degree $1$.
- Each $b \in V_O$ has in-degree $1$ and out-degree $0$.
Let $i = \size {V_I}$ and $j = \size {V_O}$.
Then, $C$ is an $\tuple {i, j}$-flow chart on $F$ and $P$.
![]() | This article is complete as far as it goes, but it could do with expansion. In particular: and improve -- there are inconsistencies in presentation You can help $\mathsf{Pr} \infty \mathsf{fWiki}$ by adding this information. To discuss this page in more detail, feel free to use the talk page. When this work has been completed, you may remove this instance of {{Expand}} from the code.If you would welcome a second opinion as to whether your work is correct, add a call to {{Proofread}} the page. |
Graphical Representation
Conventionally, the shape of the box representing a step is dependent upon the type of operation encapsulated within the step:
- Rectangular for an action, represented by a functional box.
- A different shape, conventionally a diamond, for a condition, represented by a predicative box.
On $\mathsf{Pr} \infty \mathsf{fWiki}$, the preferred shape for condition boxes is rectangular with rounded corners.
This is to maximise ease and neatness of presentation: configuring a description inside a diamond shaped boxes in order for it to be aesthetically pleasing can be challenging and tedious.
Also on $\mathsf{Pr} \infty \mathsf{fWiki}$, it is part of the accepted style to implement the entry and exit points of the algorithm using a box of a particular style, in this case with a double border.
Also known as
A flow chart is also known as a flow diagram.
Examples
Sum of Numbers
An example of a flow chart to calculate the sum of $N$ numbers is presented here:
Factorial
An example of a flow chart, which could be used to depict an algorithm to calculate a factorial, is shown below:
Also see
- Results about flow charts can be found here.
Technical Note
Flow charts on $\mathsf{Pr} \infty \mathsf{fWiki}$ have been developed using the free online tool "draw.io":
Sources
- 1971: George E. Andrews: Number Theory ... (previous) ... (next): $\text {3-5}$ The Use of Computers in Number Theory
- 1974: S. Rao Kosaraju: Analysis of Structured Programs (J. Comput. Syst. Sci. Vol. 9, no. 3: pp. 232 – 255)
- 1997: Donald E. Knuth: The Art of Computer Programming: Volume 1: Fundamental Algorithms (3rd ed.) ... (previous) ... (next): $\S 1.1$: Algorithms: Algorithm $\text{E}$
- 1998: David Nelson: The Penguin Dictionary of Mathematics (2nd ed.) ... (previous) ... (next): flow chart (flow diagram)
- 2008: David Nelson: The Penguin Dictionary of Mathematics (4th ed.) ... (previous) ... (next): flow chart (flow diagram)