Chapter 7: Algorithm Design and Problem Solving
(IGCSE Computer Science)
7.1 The Program Development Life Cycle
• Stages: Analysis, Design, Coding, Testing, Maintenance.
• Abstraction: Focus only on key details.
• Decomposition: Break a big problem into smaller ones.
• Iterative testing: test → fix → retest.
7.2 Computer Systems, Sub-systems, and Decomposition
• System → sub-systems → smaller parts (Top-down design).
• Inputs, Processes, Outputs, and Storage are identified.
• Design tools: Structure diagrams, Flowcharts, Pseudocode.
7.3 Explaining the Purpose of an Algorithm
• An algorithm is a step-by-step method to solve a problem.
• Understand purpose by tracing pseudocode or flowcharts.
7.4 Standard Methods of Solution
• Totalling, Counting, Finding max/min/average.
• Linear search and Bubble sort are common methods.
7.5 Validation and Verification
• Validation checks if data is reasonable (Range, Type, Length, Format).
• Verification ensures data is entered correctly (Double entry, Visual check).
7.6 Test Data
• Normal: valid input; Abnormal: invalid input; Extreme: smallest/largest; Boundary: edge values.
7.7 Trace Tables and Dry Runs
• Trace tables show how variables change step by step.
• Used to find logic or calculation errors (dry run).
7.8 Identifying Errors in Algorithms
• Errors arise from wrong conditions, limits, or missing steps.
• Fix using trace tables and proper initial values.
7.9 Writing and Amending Algorithms
• Steps: Understand → Decompose → Plan → Design → Write → Test → Correct → Retest.
• Use structure diagrams and meaningful variable names.
Summary Table
• 7.1 – PDLC: Analysis, Design, Testing, Maintenance
• 7.2 – Decomposition: System Breakdown and Design Tools
• 7.3 – Algorithm Purpose: Understand Logic Flow
• 7.4 – Standard Methods: Totalling, Counting, Searching
• 7.5 – Validation & Verification: Data Checks
• 7.6 – Test Data: Normal, Abnormal, Boundary
• 7.7 – Trace Tables: Step-by-step Tracking
• 7.8 – Error Identification: Logic Fixes
• 7.9 – Writing Algorithms: Clear, Tested Pseudocode