2 ms·
The introductory algorithms class is much like introductory programming: it teaches you the basic tools, but it's not very practical on its own. If you are not
by jltsiren 4y ago
The introductory algorithms class is much like introductory programming: it teaches you the basic tools, but it's not very practical on its own. If you are not interested in studying algorithms further, the class may be interesting and educational but probably not very useful.
Some CS departments make the matter worse by calling the class Advanced Algorithms, which gives students a wrong impression. Students may believe that they are going to learn algorithms instead of tools for working with algorithms. I prefer the approach our mathematics department had when I was a student: they gave classes at the same level names like "Elements of Set Theory" and "Introduction to Elementary Number Theory".
Additionally, the example you used was actually pretty good. There is a parameter k that determines how easy or hard the specific instance is. The class used sorting as an example, because it's a non-trivial problem with many algorithms students are already familiar with. And the optimization target was asymptotic complexity, because it's easy to deal with without turning the assignment into a semester-long project.
If your job is designing practical algorithms (as mine is), you'll often end up in similar situations. Maybe you get the parameter k as a guarantee that allows you to use an algorithm that is faster with easy instances than the general-purpose algorithm. Or maybe you design an algorithm with its resource usage depending on k, regardless of the value. Or maybe the algorithm you already have is often faster than expected, and you want to find the parameters that determine how easy or hard an instance is. Or maybe you already have the algorithm and know the parameters, and you want to determine and log the values of the parameters in case a user reports worse than expected performance in some situations.