Chapter 50
Chapter 51
Chapter 52

Chapter 50

Structured approach

Improving the clarity and maintainability of programs using three basic structures:

  1. Sequence
  2. Selection
  3. Iteration

Designing algorithm

Flow diagrams and pseudocode are two methods that are used for designing algorithms

A useful strategy to test an algorithm is to draw a trace table

Thinking concurrently

Parallel computing requires multiple processors each executing different instructions simultaneously to speed up computations

Pros/cons

Concurrent processing happens when multiple processes are running with each having a slice of processor time

Pros/cons

Chapter 51

Computable problems

A problem is computable if an algorithm can solve every instance in a finite number of steps

Methods of problem solving

  1. Enumeration (trying every possible solution)
  2. Simulation (Designing a model of a real system to understand its behaviour and evaluate strategies)
  3. Theoretical approach
  4. Creative solution

Strategies for problem solving

Top-down design

Splitting into smaller tasks

Divide and conquer

Reduces the size of the problem with every iteration

Problem abstraction

Removing details of a problem until it is represented in a way that it is possible to solve

Automation

Building and putting into action models to solve problems

Take a physical world scenario and make a mathematical model then automate which reveals more about the physical world scenario

Chapter 52

Visualisation

The way a problem is presented is often important for finding solutions

Backtracking

To find a solution you might have to make a series of decisions but you might have issues like:

Backtracking is used to try different sequences until you find the solution

Data mining

Digging through big data sets to discover hidden connections and predict future trends

Intractable problems

A problem where an algorithm exists for their solution but takes an unreasonably long time

Heuristic methods

Solving a simpler/restricted version of the problem

Performance modelling

Simulating different user and system loads

Pipelining

Splitting tasks into smaller parts and overlapping the processing of each task