CSC 183 · Introduction to Problem Solving
Our notes
2 min readWhat computing is
Computing is using a machine to process information by following exact instructions. A computer is fast, accurate and tireless, but it cannot decide what to do: a person must work out the steps. That work is problem solving, and it comes before any programming.
What a problem is
A problem is a gap between where you are (the initial state) and where you want to be (the goal state), with some rules or limits on how you may get there (the constraints).
Example: you have ₦5,000 and need to buy a textbook, transport and lunch for the week (goal) without borrowing (constraint).
Kinds of problems
| Kind | Meaning | Example |
|---|---|---|
| Routine | a known method exists; apply it | finding the average of five scores |
| Non-routine | no ready method; needs thinking and creativity | planning a timetable with no clashes for 40 courses |
| Well-defined | clear start, goal and rules | sorting a list of names |
| Ill-defined | vague goal or rules | "make the hostel safer" |
Most real problems start ill-defined. Part of the skill is turning them into well-defined ones: "safer" might become "every room has a working lock and the gate is staffed at night".
Algorithms and heuristics
- An algorithm is a step-by-step procedure that always gives a correct answer in a finite number of steps (long division, sorting a list).
- A heuristic is a rule of thumb that usually gives a good answer quickly but is not guaranteed (when lost, head for the main road).
Computers mostly run algorithms; heuristics are used when an exact algorithm would take too long.
Where computers help
Computers are best for problems that are well-defined, repetitive, need many calculations or large amounts of data: payroll, results processing, bank transfers, weather forecasting, searching the web. They are poor at problems that need judgement about values or feelings unless people decide the rules first.
Exams usually ask
- Define a problem and give its parts (initial state, goal, constraints).
- Distinguish routine from non-routine problems and algorithms from heuristics, with examples.
Common mistake
Jumping straight to writing code before the problem is understood. Most failed programs solve the wrong problem.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Introduction to Computer Science, 2.1 Computational Thinking
(opens openstax.org in a new tab)
OpenStax, Introduction to Computer Science, 2.1 Computational Thinking, CC BY-NC-SA 4.0 · licence
-
Problem solving
(opens en.wikipedia.org in a new tab)
Wikipedia, Problem solving, CC BY-SA 4.0 · licence
-
Heuristic
(opens en.wikipedia.org in a new tab)
Wikipedia, Heuristic, CC BY-SA 4.0 · licence
-
OpenStax, Introduction to Computer Science (whole free textbook)
The whole book, free to read online or download as a PDF (the PDF is large: Wi-Fi).
(opens openstax.org in a new tab)
OpenStax, OpenStax, Introduction to Computer Science (whole free textbook), CC BY-NC-SA 4.0 · licence
Watch
-
Problem Solving In Programming | Problem Solving Skills For Programming | Simplilearn
8 min · ≈ 36 MB · about ₦20
(opens youtube.com in a new tab)
-
Problem-Solving for Developers - A Beginner's Guide
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
How anyone can use computer science principles to solve everyday problems | Rameez Virji | TEDxYYC
7 min · ≈ 32 MB · about ₦18
(opens youtube.com in a new tab)
-
Problem Solving Techniques - For Programming Problems & Interviews
18 min · ≈ 81 MB · about ₦45
(opens youtube.com in a new tab)
-
Computational Thinking for Problem Solving
2 min · ≈ 9 MB · about ₦5
(opens youtube.com in a new tab)
-
Lecture 1: Introduction to CS and Programming Using Python
1 h 4 min · ≈ 288 MB · about ₦162
(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.