Loading...
A computational solution needs representable inputs, defined rules and an assessable output. Model the difficult parts early, while keeping the difference between a prediction and measured behaviour visible.
What you'll be able to do
Computers can apply precise rules repeatedly, store and search records, perform calculations and explore structured alternatives. A task becomes amenable to computation when relevant information can be represented and success can be assessed. Human judgement may still be required to choose goals, interpret ambiguous cases or resolve values not captured in the data.
Problem recognition identifies what must change or be found. Decomposition separates responsibilities; abstraction selects relevant information. Divide and conquer splits a suitable problem into smaller instances, solves them and combines their results, as in merge sort. Not every division of a project into files is a divide-and-conquer algorithm, and not every problem has a practical exact solution at the required scale.
Performance modelling predicts behaviour from simplified assumptions before or alongside measurement. If one worker needs 0.02 seconds per request continuously, its ideal capacity is 50 requests per second. At 60 arrivals per second, the queue grows by about ten requests per second under this steady simplified model. Two independent workers could raise compute capacity, but a shared bottleneck may limit the gain.
Pipelining overlaps different stages for different items. With independent stages taking 1,3 and 2 milliseconds, the first item takes 6 ms and the slowest stage limits sustained completions to one every 3 ms. Ten items ideally take 6+9×3=33 ms, compared with 60 ms without overlap. This assumes sufficient buffers, no additional stalls and constant stage times.
A timeline makes dependencies and idle periods visible; a graph shows connections; a state table reveals changing values. Visualisation can support a mental model of what the program will do and can expose a bottleneck or missing transition before implementation. The representation must use labels and scales that preserve the relevant meaning.
Validate predictions with representative measurements and revise assumptions when evidence differs. Real arrivals can be bursty, stage times vary, resources fail and synchronisation adds overhead. A model that predicts average capacity does not guarantee every request meets a deadline. Explain what the model includes, what it omits and which evidence would justify relying on it for the decision.
| Model | Assumptions | Prediction |
|---|---|---|
| Single worker | 0.02 s/request, steady 60 arrivals/s | 50 served/s; backlog grows about 10/s |
| Three-stage pipeline | 1,3,2 ms; independent resources and buffers | First item 6 ms; next completions every 3 ms |
| Ten-item batch | Same no-stall pipeline | 33 ms ideal total |
Attempt the task before opening its worked response. Record each change of state, explain the rule used, and check the result against the original requirements. Code examples labelled Python 3 use that language’s conventions; pseudocode states its own assumptions.
Common mistakes to avoid
Key takeaways
Test yourself
Answer a few questions, then review anything you missed.
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.