Okay. So now,

that we have talked about what we mean by efficiency and

that we will focus on time as a metric for efficiency how long an algorithm takes.

The next question is how do we measure efficiency?

How do we measure the amount of time an algorithm takes?

Again I remind you, that we are not talking about how much time,

this specific Python implementation of an algorithm takes.

We are talking about the algorithm given in pseudocode,

just still in theoretical terms, how long does that algorithm take?

Of course, we are not going to go into the number of seconds and number of hours, and

so on, about the algorithm, because that's not doable.

That, in order to know how many, how many seconds or

how many minutes an algorithm is going to take,

it has to be implemented, it has to be run on a specific machine, and so on.

So then, we have lots of issues that are beyond our control, and

beyond the specifications of an algorithm.

If I ask, how, how many minutes does an algorithm take,

then I'm talking about the specific implementation on a specific machine.

Once you change the computer or change the machine that you are running the algorithm

on, or the implementation on, then it's going to, the time is going to change.

So, we are not interested in that type of analysis at this point.

We are asking a question that this algorithm that we have developed, or

any algorithm we see, if we take an algorithm from a textbook, how much time,

roughly, how much time does it take?

So, the question is, what do we mean by that?

And when, the, the most important thing, or

the most crucial thing to know about running time efficiency.

And how we measure it,

is that it is all a function of the input size, the input size.

So, if I look at that algorithm and I take a certain input to that algorithm, and I

measure the size of that input, then I ask how many operations, how many operations

is that algorithm going to, they going to perform as a function of that size?

So if the size of the input is five,

whatever five means, what is the running time?

How many, how many operations is the algorithm going to execute?

Is going to execute five.

Which is equal, equal to the number to the, to the size of input.

Is it going to execute 25, which is 5 squared, or

is it going to execute 32, which is two to the five operations, for example.

So, it's all a function of the input size.

How much time or how many operations is the algorithm going to

perform as a function of the size of that input.

Now, what is the size of an input.

Now that's not the, that's not the simplest concept to introduce here.

But we will think about it in classes of algorithms, okay?

So I will think about it,

for example, what is the size of an input of an algorithm that deals with grass?

Or that deals with, with lists, or that deals with strings, or

that deals with numbers?

Okay. So,

we will see lots of algorithms in this course that deal with graphs.

The input is a graph, or two graphs, or ten graphs and so on.

What is the size of a graph?