UNIHIVE

Study Hub UNIPORT CSC 183

CSC 183 · Introduction to Problem Solving

Computing, problems and problem solving

What a problem is, routine and non-routine problems, and where computers help.

Our notes

2 min read

What 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

KindMeaningExample
Routinea known method exists; apply itfinding the average of five scores
Non-routineno ready method; needs thinking and creativityplanning a timetable with no clashes for 40 courses
Well-definedclear start, goal and rulessorting a list of names
Ill-definedvague 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

Watch

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.

All CSC 183 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.