Structured approach
Improving the clarity and maintainability of programs using three basic structures:
- Sequence
- Selection
- 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
- Can render 3D objects quicker
- Browsers can display several pages with processors doing different tasks
- Difficult to coordinate the processors and tasks might be faster using one processor
Concurrent processing happens when multiple processes are running with each having a slice of processor time
Pros/cons
- Increased program throughput
- Less time wasted by processor
- Large amounts of users can cause heavy computation programs to take longer to complete
Computable problems
A problem is computable if an algorithm can solve every instance in a finite number of steps
Methods of problem solving
- Enumeration (trying every possible solution)
- Simulation (Designing a model of a real system to understand its behaviour and evaluate strategies)
- Theoretical approach
- 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
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:
- Not having enough information
- Each decision leads to a new set of choices
- One or more of the sequences may be a solution
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