Program Analysis

Abstraction and Algorithms

Abstraction and Algorithms

Learning Outcome:

  • To define and state a problem by:

- identifying the required inputs

- identifying the required outputs

- stating the processes required

  • To solve problems by decomposing them into smaller and manageable parts
  • To identify common elements (patterns) across similar problems and state generalisations

Understanding Algorithms

Suppose you have to reach the top of a flight of stairs. How can you do so? The simple solution will be to climb every step until you reach the top. We call the sequence of step-by-step instructions to solve a problem an algorithm.

Turtle Academy - Testing Algorithms

The Turtle Academy is a great place to start the basics of algorithms.

Try creating and testing an algorithm that produces the shapes shown using the Turtle Academy Playground link provided.

Click on the link below to access the Turtle Academy Playground:

Approaching Problems

  1. Identifying the Inputs (to define)
  2. Identifying the Outputs (to define)
  3. Stating the Process required (to solve)
  4. Displaying the Information in an IPO table

Problem-Solving Techniques

  1. Decomposition (Incremental / Modular)
  2. Pattern Recognition
  3. Generalisation