Professional Documents
Culture Documents
problem solving.
We want to understand, what does it mean to think
computationally?
That leads to the philosophical question, so
what's computation?
And like a good philosophical question, that leads to
another, deeper philosophical question.
To answer that question of what's computation, let's
start by asking the question, what is knowledge?
And, as we're going to see, we can divide
knowledge up into 2 parts.
There's declarative knowledge, which we can think of the
statements of fact.
And there's imperative
knowledge, or how to's methods.
Statements of facts give us true, but, as we'll see, they
don't necessarily help us think about how to find new
information.
Imperative knowledge, how to methods or recipes, give us
ways of finding new information, and that's going
to be really valuable to us.
Now, to look at this, let's look at an example.
So, what do we mean by declarative knowledge?
Well, here's a piece of declarative knowledge.
That first statement says, the square root of a number x is a
number y such that y * y = x .
You know that's true from high school algebra.
It's a statement of truth.
It tells us something about how to decide whether a
particular number is a square root or not, but can we use
this to actually find a square root?
And the answer is no.
If we have a number x equal to 25 and we're trying to find
the square root of that, and somebody gives us a guess y =
5, we can use this statement to test to see if 5 * 5 = 25 ,
which it does.
But it doesn't tell us how to find the guess.
So declarative knowledge, which is what much of
knowledge is based on, isn't what we need.
We want a different kind of knowledge, and for that,
fortunately, we have imperative knowledge.
As we said, imperative knowledge is how to kinds of
knowledge, or methods or recipes for finding something,
and here's a recipe for deducing square root.
It's actually attributed to Heron of Alexandria, although
there's some debate as to whether he was the original
creator of this algorithm, but it dates from the first
century AD.
And you can see the description here.
Description says if I want to find the square root of some
number x, I'm going to start with a guess.
I'll call it g.
I'm going to take g and multiply it by itself and look
if that result is close enough to x.
If it is, I'm going to stop, and say that g is the answer.
Otherwise, I'm going to make a new guess by averaging g and
x/g , and using this new guess, which I will call g
again, I'm going to repeat the process until we get something
that's close enough.