Draw a flowchart from a structured English description

9.2 Algorithms – Translating Structured English into Flowcharts

Learning Objectives

  • Identify the components of a structured‑English description (START/END, INPUT, OUTPUT, PROCESS, DECISION, LOOP).
  • Apply the Cambridge International AS & A‑Level (9618) flowchart symbols correctly.
  • Convert structured English into a clear, well‑structured flowchart.
  • Analyse the basic time‑complexity of the resulting algorithm (Big‑O notation).
  • Evaluate alternative designs and justify the chosen solution (AO1–AO3).

1. Placement in the Cambridge Syllabus

The ability to move between natural‑language descriptions, pseudocode, and flowcharts underpins several syllabus areas. The table shows where this lesson fits in the overall scheme of work.

Syllabus Area (AS)Lesson FocusRelated A‑Level Extension
8 – AlgorithmsStructured English → Flowchart conversion, basic algorithm analysis13 – Advanced algorithms (recursion, divide‑and‑conquer)
9 – Data StructuresSequential processing (arrays, records) illustrated with flowcharts14 – Complex data structures (linked lists, trees)
10 – ProgrammingPseudocode conventions, translation to/from flowcharts15 – Object‑oriented design, exception handling
11 – Software DevelopmentDesign‑by‑decomposition, testing strategies (flowchart tracing)16 – Agile development, version control
12 – Computational ThinkingAlgorithmic efficiency (Big‑O basics)17 – Advanced complexity analysis

2. Standard Flowchart Symbols (Cambridge 9618)

SymbolNamePurpose
Start / EndMarks the entry and exit points of the algorithm.
Input / OutputShows data being read from or written to the user, file, or peripheral.
ProcessRepresents a computation, assignment, or sub‑routine call.
DecisionBoolean test with two outgoing branches (Yes / No).
ConnectorJoins flow lines on the same page or continues the flow on another page.

3. Structured English & Pseudocode Conventions (AO1)

Cambridge expects a consistent notation. The table summarises the most frequently used constructs.

ElementKeyword / SymbolTypical Structured English Form
Start / EndBEGIN / ENDBEGIN … END
InputREADREAD variable1, variable2
OutputDISPLAY / PRINTDISPLAY result
AssignmentSETSET total TO total + price
DecisionIF … THEN … ELSE … END IFIF condition THEN … ELSE … END IF
Counter LoopFOR … TO … DO … END FORFOR i FROM 1 TO n DO … END FOR
Sentinel LoopWHILE … DO … END WHILEWHILE count > 0 DO … END WHILE
Repeat‑Until LoopREPEAT … UNTIL …REPEAT … UNTIL condition

4. Step‑by‑Step Conversion Process (AO2)

  1. Locate the start and end points. Look for BEGIN and END. Place a Start/End symbol for each.
  2. Identify all input and output actions. Keywords: READ, INPUT, DISPLAY, PRINT. Use the Input/Output symbol.
  3. Extract processing statements. Assignments, arithmetic operations, and sub‑routine calls become Process symbols.
  4. Spot decision points. IF…THEN…ELSE, WHILE, REPEAT, FOR are represented by Decision symbols.
  5. Model loops correctly.

    • WHILE / REPEAT‑UNTIL: Decision (condition) with a “Yes” arrow looping back to the first Process in the body.
    • FOR: Initialise counter (Process), Decision (counter ≤ limit), body Process(es), Increment (Process), then back‑arrow to the Decision.

  6. Connect every symbol with arrows. Each symbol (except Start/End) must have at least one incoming and one outgoing arrow. Label the two branches of a Decision as “Yes” (or “True”) and “No” (or “False”).
  7. Validate the diagram.

    • Exactly one Start and one End.
    • All arrows flow in a single direction (top‑to‑bottom or left‑to‑right).
    • No “dead” symbols – every element is reachable from the Start.
    • Loop back‑arrows return to the correct Decision.

  8. Analyse efficiency (optional for AO2). Estimate how many times each Process executes in the worst case and express the running time using Big‑O notation.

5. Worked Examples

5.1 Maximum of Three Numbers (Linear Algorithm)

BEGIN

READ number1, number2, number3

SET max TO number1

IF number2 > max THEN

SET max TO number2

END IF

IF number3 > max THEN

SET max TO number3

END IF

DISPLAY max

END

Key Flowchart Points

  • Start → Input → Process (initialise max)
  • Decision: number2 > max

    • Yes → Process: SET max TO number2

  • Decision: number3 > max

    • Yes → Process: SET max TO number3

  • Output → End

Efficiency: Two comparisons → O(1).

5.2 Iterative Factorial (WHILE Loop)

BEGIN

READ n

SET factorial TO 1

WHILE n > 1 DO

SET factorial TO factorial * n

SET n TO n - 1

END WHILE

DISPLAY factorial

END

Flowchart Highlights

  • Decision symbol for the condition n > 1.
  • Two Process symbols inside the loop (multiply, decrement).
  • Back‑arrow from the “Yes” branch of the Decision to the first Process of the loop body.
  • “No” branch leads to the Output symbol.

Efficiency: Executes n‑1 times → O(n).

5.3 Linear Search (Array Traversal)

BEGIN

READ key, n

FOR i FROM 1 TO n DO

READ array[i]

END FOR

SET found TO FALSE

FOR i FROM 1 TO n DO

IF array[i] = key THEN

SET found TO TRUE

EXIT FOR

END IF

END FOR

IF found THEN

DISPLAY "Key found"

ELSE

DISPLAY "Key not present"

END IF

END

Flowchart Features

  • Two separate FOR loops – each modelled with Initialise (Process), Decision, Body, Increment (Process), and back‑arrow.
  • Decision inside the second loop with an Exit (Connector) that jumps to the final decision on found.
  • Final Decision determines which output message is displayed.

Efficiency: Worst‑case examines every element → O(n). Best‑case (first element matches) → O(1).

5.4 Recursive Factorial (A‑Level Extension)

FUNCTION Fact(k)

IF k = 0 THEN

RETURN 1

ELSE

RETURN k * Fact(k‑1)

END IF

END FUNCTION

BEGIN

READ n

DISPLAY Fact(n)

END

Flowcharts are not ideal for recursion, but a structured flowchart can still be drawn by:

  • Using a Process symbol to represent the call Fact(k).
  • Adding a self‑referencing Connector that indicates the recursive call.
  • Including a Decision for the base case (k = 0).

This example is useful for discussion: why pseudocode or actual code is usually clearer for recursive algorithms (AO3).

6. Algorithmic Efficiency (AO2)

When you finish a flowchart, add an “Efficiency Box” beside it summarising:

  1. Number of times each Process executes (worst case).
  2. Overall time‑complexity expressed in Big‑O notation.
  3. Possible improvements (e.g., using a different data structure or loop type).

7. Assessment Alignment (AO1‑AO3)

Assessment ObjectiveHow This Lesson Addresses It
AO1 – Knowledge & UnderstandingRecall of flowchart symbols, structured‑English conventions, and conversion steps.
AO2 – Application & AnalysisConvert structured English to a flowchart, trace execution, estimate time‑complexity.
AO3 – Design & EvaluationJustify algorithmic choices (iterative vs recursive), suggest improvements, evaluate efficiency.

8. Suggested Scheme of Work (30 Weeks)

WeekTopicKey Activities
1‑2Information RepresentationBinary/hex conversions, character encodings, short quizzes.
3‑4Computer ArchitectureCPU cycle diagram, simple instruction set exercises.
5‑6System Software & SecurityOS functions, basic cryptography, ethical case‑study.
7‑8Databases & Simple SQLDesign a table, write SELECT/INSERT statements.
9‑10Data Structures – Arrays & RecordsIndexing, bounds checking, flowchart representation.
11‑12Introduction to AlgorithmsLinear search, bubble sort, pseudocode practice.
13‑14Structured English → Flowchart (this lesson)Conversion steps, three worked examples, efficiency box.
15‑16Design‑by‑Decomposition & TestingModular flowcharts, trace tables, black‑box testing.
17‑18Programming Fundamentals (Python/Java)Implement the flowcharts in code, compare outputs.
19‑20A‑Level Extensions – Recursion & Exception HandlingRecursive flowcharts, try‑catch concepts.
21‑22Advanced Algorithms – Divide & ConquerMerge‑sort flowchart, complexity analysis.
23‑24Networking & ProtocolsLayered diagram, simple client‑server pseudo‑code.
25‑26Intro to AI – Search & HeuristicsFlowchart for a basic heuristic search.
27‑28Revision & Past‑Paper PracticeFull‑question simulations, marking against AO1‑AO3.
29‑30Mock Exam & FeedbackTimed exam, detailed feedback, final clarification.

9. Common Pitfalls & How to Avoid Them

  • Missing arrows. Every symbol (except Start/End) must have at least one incoming and one outgoing arrow.
  • Unlabelled decision branches. Always write “Yes” (or “True”) and “No” (or “False”) on the two arrows leaving a Decision.
  • Over‑complicating the diagram. Combine sequential processes into a single Process symbol when they share the same flow.
  • Incorrect loop direction. The back‑arrow must return to the Decision that tests the loop condition, not to the first Process inside the loop.
  • Ignoring efficiency. Forgetting to comment on time‑complexity can cost marks in AO2.
  • Attempting a full flowchart for recursion. Use pseudocode for recursive algorithms; if a flowchart is required, clearly indicate the recursive call with a connector and note its limitation.

10. Practice Exercises

Exercise 1 – Iterative Sum

BEGIN

READ m, n

SET total TO 0

FOR i FROM m TO n DO

SET total TO total + i

END FOR

DISPLAY total

END

Task: Draw the complete flowchart, label all arrows, and write the Big‑O analysis.

Exercise 2 – Sentinel Loop (Average of Positive Numbers)

BEGIN

SET sum TO 0

SET count TO 0

READ number

WHILE number > 0 DO

SET sum TO sum + number

SET count TO count + 1

READ number

END WHILE

IF count = 0 THEN

DISPLAY "No positive numbers entered"

ELSE

SET average TO sum / count

DISPLAY average

END IF

END

Task: Produce a flowchart, then trace the algorithm with the input sequence 5, 8, -3. State the efficiency.

Exercise 3 – Nested Loops (Multiplication Table)

BEGIN

READ n

FOR i FROM 1 TO n DO

FOR j FROM 1 TO n DO

DISPLAY i * j, " "

END FOR

DISPLAY NEWLINE

END FOR

END

Task: Sketch the flowchart, emphasising the two nested FOR loops, and discuss the time‑complexity.

11. Quick Self‑Audit Checklist (For Lecture‑Notes Review)

Use this checklist to verify that your teaching material aligns with the Cambridge syllabus before sending it for a detailed review.

AS Core TopicCovered? (✓ / ✗)Comments / Gaps
1 – Information Representation (binary, hexadecimal, ASCII/Unicode, two’s‑complement, overflow)
1.2 – Multimedia (bitmap vs. vector, colour depth, sampling rate, file‑size calculations)
1.3 – Compression (lossless vs. lossy, RLE, JPEG/MP3 basics)
2 – Communication & Networking (OSI model, TCP/IP basics)
3 – System Software (OS functions, basic security, ethical issues)
4 – Databases (table design, SELECT/INSERT, primary keys)
5 – Data Structures (arrays, records, simple linked list concepts)
6 – Algorithms (linear search, bubble sort, pseudocode practice)
7 – Structured English → Flowchart (this lesson)
8 – Design‑by‑Decomposition & Testing (modular flowcharts, trace tables)
9 – Programming Fundamentals (Python/Java implementation of flowcharts)
10 – A‑Level Extensions (recursion, exception handling)
11 – Advanced Algorithms (divide‑and‑conquer, merge sort)
12 – Computational Thinking (Big‑O, efficiency analysis)

12. What Is Needed for a Full Review?

To produce a side‑by‑side comparison of your lecture notes with the Cambridge 9618 syllabus and to give concrete improvement suggestions, please provide:

  • The complete set of lecture‑notes (PDF, Word, Google Doc, or slide deck).
  • A separate scheme of work or course outline if it is not already embedded in the notes.
  • Any worksheets, lab‑activity descriptions, or example problems you plan to use.
  • Sample assessment questions (including past‑paper style) and any marking rubrics.

Once these materials are available, a detailed mapping, gap analysis, and targeted recommendations can be delivered.