Introduction
IntroductionΒΆ
In this part about algorithms and execution time analysis we want to do many things! Maybe the most important one is to expose you to how to think critically about programs. The course book asks often the question can we do better? as a way of starting a critical view on an algorithm.
Here is how we do it.
We introduce a problem to be solved computationally.
We describe an algorithm to solve the problem.
We write a program in Python to implement the algorithm.
We explore how to test that the program solves the problem.
We explore how to experiment with the execution time of the program.
We ask whether we can do better.
We show at least one more algorithm and go through all the steps again!
We introduce another problem to be solved computationally and we go through all the steps again!
Hopefully this will make you aware that
there are many different ways of solving a problem and that
it is worth knowing about techniques to come up with algorithms so that you can put them to work when you have to solve a problem.
We also hope that you begin to understand how to start with the high level and abstract description of an algorithm to write a program in Python that implements the ideas of the algorithm.
And we hope that you get curious about how to meassure and/or calculate whether a program is feasible or not.
The ideas and most of the material are taken from the books Algorithms Illuminated and Introduction to Programming in Python.