Computational Thinking 2

Thinking logically, thinking concurrently

The structured progamming approach aims to improve clarity an maintainability of programs using three basic structures:

  1. Sequence - one statement following another
  2. Selection - If, else, switch and case statements
  3. Iteration - while, do and for loops

To try and design an algorithm, it's good to design a flowchart or pseudocode. Usually, pseudocode is closer to the real language. Pseudocode isn't a set language, but instead just a way to write code so the meaning is clear. To test an algorithm, use a trace table. The difference between concurrent and parallel computing is that parallel requires multiple processors, while concurrent takes place while several proceses are running on one processor. A benefit of this that there is increased througbput and waiting time is used usefully but if there are a large number of processes computation might take a while. Meanwhile, parallel processing enables tasks to run simultaneously, allowing for several pages to be open at the same time, however there is an overhead in coordinating the processors.

Problem recognition

A problem is defined as computable if an algorithm can solve every instance, even if it would take incredibly long to do so. There are many methods of problem solving, like:

Problem solving

A way a problem is visualized is important. For example, a table and a graph for a binary tree are very different, as the graph is far easier to read and understand. Backtracking is used when you don't know enough information to make the best choice, so you try different sequences until you find a solution. Data mining is the process os digging through big data sets to try and find future predictions. for example, trying to find if cellphones increase cancer. Some problems are deemed intractable since even though an algorithm exists for it it would take an uncessarily long time to find a solution. Not all intractable methods are equally hard. For some, a heuristic method can be constructed like in the travelling salesman problem. Performance modelling is the process of simulating different users and systen kiads usubg a mathematical approximation, rather than actual performance testing. Pipelining is the technique of splitting tasks into smaller parts and overlapping the processes of each part.

Home