Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Solving a Problem

Phase 1 Problem Definition

What is the problem?


Clear definition
Are there sub-problems? E.g, best fit given 50 seats

What are the parameters?


Number of guests?
Number of troubling guests?
Capacity

Separate important factors from fluff


Do we care about their heights?

Just like Math, we assign variables

Phase 2 Explain it to a Computer

What does a computer do?

Instructions + Input -> Solution

Phase 2 What you need

Do we know the Computers language?


Clear instructions
Are they sequential?

Formally, this is called An


Algorithm

Computer Algorithms
An Algorithm is ;

A finite number of clearly described, unambiguous doable steps

Algorithms are key

Every single program follows an algorithm


Computer Algorithms are central to computer science. They provide
step-by-step methods of computation that a machine can carry out

How we measure it?

Clock rate!
Frequency at which a CPU runs
This is only for one core
IPS (instructions per second) is a measure for a whole processor
Intel Core goes at 300000 MIPS

Phase 3 The solution

What defines a solution


Are there multiple solutions
How do we find the best of these solutions
What if theres no solution!

Todays Lesson

Computer science is about solving computational problems


Programming is only part of it, albeit important!
There is a 3 phase process for every problem
We order instructions in an algorithm
An algorithm clearly defines a sequence

You might also like