2

I was wondering if there are any calculus relationships implicit in Big-O notation.

For example, an algorithm linear according to Big-O notation reduces the size of the problem by a constant amount at each step, and also involves looking at each part of the input a constant number of times. The derivative of a linear expression is a constant expression, so there is some hint of a pattern. However, I haven't been able to figure out how to generalize these facts to other Big-O classes of algorithms.

Do derivatives/antiderivatives help in matching an algorithm's Big-O description with its behavior?

user10478
  • 129

1 Answers1

2

Nope.

Here's why. A derivative of O(n2) and O(n3) will tell you that the difference of these upper bounds is 1. The problem is I don't care about that difference. I care about the differences between O(n2) and O(n!). Neither of which I like (I like O(n*log n)) but O(n!) is nasty when n is significant (sometimes n isn't and then no one cares about any of this). O(n2) and O(n10) are close enough that I simply don't care. So no, derivatives here put emphasis on the wrong details. I'm not concerned with rates of change. I'm concerned with categories of change.

The reason why is because code in the n log n category is often as good as it gets (unless there is a trivial solution) and the others are usually leaving room for significant improvement. That is, when n is big enough that anyone cares.

In fact I have 3 categories for applied algorithms: trivial, optimized, crap.

Find a way to help me sort applied algorithms into those and I'll get you a Turing award.

candied_orange
  • 119,268