CSC 183 · Introduction to Problem Solving
Our notes
2 min readAbstraction
Abstraction means keeping only the details that matter and ignoring the rest. A map of Port Harcourt shows roads and landmarks, not every tree. To plan the shortest route to campus, a road map is enough: the colour of the buildings does not matter.
In computing, abstraction lets us treat a complicated thing as a simple one: a "student record" holds a name, matric number and courses, not everything about the person.
Analogy
Solve a new problem by noticing it is like one you have already solved. Scheduling exams so no student has two at once is like colouring a map so neighbouring countries have different colours: the same method works for both.
Brainstorming
A group (or one person) lists as many ideas as possible, quickly, without criticising any of them at first. Then the ideas are grouped, judged and the best chosen. Rules: quantity first, no judging during the listing, build on others' ideas, welcome odd ideas.
Trial and error
Try a possible solution, see if it works, and if not try another, learning from each failure. It works when there are few possibilities or each try is cheap (finding which key opens a padlock from a bunch of five). It is slow when the possibilities are many.
Hypothesis testing
Make a guess about the cause or the answer (a hypothesis), predict what you should see if it is true, and test the prediction.
Example: "My program gives the wrong average." Hypothesis: it divides by the wrong count. Prediction: with three numbers 2, 4 and 6 it should print 4; if it prints 3, it is dividing by 4. Test it. If the prediction fails, form a new hypothesis.
Worked example: trial and error made smarter
Find a whole number whose square is 2,209.
- Pure trial from 1 upwards would take 47 tries.
- Smarter: 40² = 1,600 and 50² = 2,500, so the number is between 40 and 50. The last digit 9 means it ends in 3 or 7. Try 43² = 1,849 (too small), 47² = 2,209 ✓. Two tries.
Using what each trial tells you turns blind guessing into a method.
Exams usually ask
- Explain abstraction and analogy with examples.
- State the rules of brainstorming.
Common mistake
Judging ideas while brainstorming. It stops people suggesting the unusual idea that might be best.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Abstraction (computer science)
(opens en.wikipedia.org in a new tab)
Wikipedia, Abstraction (computer science), CC BY-SA 4.0 · licence
-
Brainstorming
(opens en.wikipedia.org in a new tab)
Wikipedia, Brainstorming, CC BY-SA 4.0 · licence
Watch
-
Best pick The Secret to Abstract Thinking | A-Level Computer Science Made Easy
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
-
Abstraction
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
-
IBDP-B1.1.2-Fundamental Concepts of Computational Thinking | Abstraction, Algorithms, Decomposition
8 min · ≈ 36 MB · about ₦20
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.