Analysis of Algorithms Introduction

Материал готовится, пожалуйста, возвращайтесь позднее

Welcome back. Today we're going to do some math and some science. Not a lot, but we need to have a scientific basis for understanding the performance of our algorithms to properly deploy them in practise. So today we're going to talk,about how to, observe performance characteristics of algorithms. We're going to look at how to make mathematical models and how to classify algorithms according to the order of growth of their running time. We'll talk a bit about the theory of algorithms and also how to analyze memory usage. So to put this all in perspective,we're going to think about these issues from the point of view of different types of characters. So the first one is the programmer who needs to solve a problem and get it working and get it deployed. Second one is the client who wants to use the whatever program did to get the job done. Third one is the theoretician,that's somebody who really wants to understand what's going on. And, and the last one is kind of a team, this basic blocking and tackling sometimes necessary to get, you know, all these things done. So, there's a little bit of each one of these in today's lecture. And actually when you're a student you have to think that you might be playing any or all of these roles some day. So, it's pretty important to understand the different points of view. So, the key that we'll focus on is running time. And actually the idea of understanding the running time of a computation goes way back even to Babbage and probably before. And here's a quote from Babbage, "As soon as an analytical engine exists, it will necessarily guide the future course of the science. Whenever any result is sought by its aid, the question will arise by what course of calculation can these results be arrived at by the machine in the shortest time". If you look at Babbage's machine called the analytic engine, it's got a crank on it. And literally the concern that Babbage had in knowing how long a computation would take is, how m any times do we have to turn the crank. It's, it's not that different, in today's world. The crank may be something electronic that's happening a billion times a second. But still, we're looking for, how many times does some discreet operation have to be performed in order to get a computation done. So, there are lot of reasons to analyse algorithms. In the context of this course we are mainly interested in performance prediction. And we also want to compare the performance of different algorithms for the same task, and to be able to provide some guarantees on how well they perform. Along with this, is understanding some theoretical basis for how algorithms perform. But primarily, the practical reason that we want to be analyzing algorithms and understanding them is to avoid performance bugs. We want to have some confidence that our algorithms going to complete the job in the amount of time, that, that we think it will. And it's very, very frequent to see,in today's computational infrastructure, a situation where the client gets bad performance, because the programmer did not understand the performance characteristics of the algorithm. And today's lecture is about trying to avoid that. Now, we're going to focus on performance and comparing algorithms in this course. There's later courses in typical computer science curricula that have more information about the